Random is not that random

“Anyone who considers arithmetical methods of producing random digits is, of course, in a state of sin” – John Von Newman

I have been reading “The art of computer programming vol 2” by Donald Knuth for quite sometime now. This book masterfully depicts how important it is to generate random numbers, and how difficult it is, to do so! Random numbers find their use in a variety of applications, including simulation, sampling, numerical analysis, computer programming, decision-making, aesthetics, recreation- the list is endless, actually. For thousands of years mathematicians have tried to develop an algorithm to generate perfect random numbers. Maintaining a table in computer’s memory seems to be the obvious solution, but it wastes a lot of resources.

John Von Newman suggested the middle square method. For example- if our previous number was 5772156649, we square it to get 33317792380594909201; the next number in the series is 7923805949. It is to be noted here that the numbers it generates are not actually random. They just seem to be. If X(n+1) is dependent on X(n), it does not stay a random sequence. Moreover, if zero creeps into the middle of the squared number, the entire method tends to break down; it exhibits cyclic nature. There are several other methods, equally fascinating but outside the scope of this post. We are yet to discover the perfect method for generating a series of random numbers. An amazing area to work upon!


Speak up!

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s