How Computers Generate Random Numbers - Conclusions
In this paper we have examined some probability theory, the concept of
a random sequence coming from a random process, and ways of analyzing a
sequence of numbers to determine how likely it is they came from a
random process.
We then examined the inside of a linear congruential random number
generator which is the most prevalent type of random number generator
in use today. We dissected 5 commonly found linear congruential
generators, and then analyzed them using the (chi-square, pronounced "KI-square") and KS (Kolmogorov-Smirnov) tests.
We found it was possible to detect non-randomness in each of these
generators after a few million iterations, except for the defective
RANDU generator, which failed the 3-D test after less than 800
iterations.
A technique for shuffling the random numbers was given and tested with
excellent results. Shuffling the output of any random number generator
using the technique given is therefore highly recommended.
Analysis of the Data Encryption Standard (DES) as a random number
generator was also performed. A software implementation of the Data
Encryption Standard DES was found to be too slow for any practical use
and the randomness of the results was found to be less than that
obtained by shuffling the output of a good linear congruential
generator.
Finally, a brief mathematical explanation of what an ideal random
number generator really is and how it differs from a computerized
random number generator was given. For further reading on this topic,
consult a book on Information theory and read about the different types
of information sources defined there.