Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a pseudo-random number generator simple enough to do in your head?

Are there are any pseudo-random number generators that are easy enough to do with mental arithmetic, or mental arithmetic plus counting on your fingers. Obviously this limits to fairly simple math - it needs to be something someone of average mathematical ability can do, or maybe average ability for a programmer, not a math prodigy.

The simplest I have found is the Middle square method, but not only is it known to be a poor source of randomness, it still looks too complex to do without pencil and paper.

If the only way to do this is by limiting the range, like maybe it only can output 8 bit numbers, that is fine. I suspect one of the standard PRNG algorithms would be simple enough in an 8 bit version, but I don't know enough to simplify any of them from the 32 bit version to an 8 bit version. (All the ones I looked at depend on specially picked seed numbers that are different depending how many bits you are working with, and usually only 32 and 64 bit examples are given.)

like image 664
LeBleu Avatar asked Oct 12 '10 22:10

LeBleu


People also ask

Can human brain generate random number?

The human brain does not do as well as a computer when asked to generate true random numbers. Randomness in the brain means something different – it is born from neurons that spike spontaneously or as a response to stimuli. It turns out that spiking behavior of neurons is very noisy, and somewhat unpredictable.

How do you randomize something in your head?

You can't do random in your head. Your brain is packed with biases, so you need an algorithm. No finite, effective, deterministic algorithm is random. You simply cannot do it.

Can pseudo random numbers be predicted?

The outcome of the research confirms the possibility that machine learning algorithms can be trained to predict certain PRNGs. Even when trained with a small amount of data, there is evidence that machine learning algorithms can be used to predict the values created by pseudorandom number generators.


1 Answers

Pseudo-random (according to Dilbert):

Dilbert Cartoon of 2001-10-25

like image 122
Margus Avatar answered Nov 07 '22 10:11

Margus