Linear Congruential Pseudo Random Number Generators

LCPRNG is a class of PseudoRandomNumberGenerator defined by the form:

X(n+1) = A*X(n) + B (mod M)

To be effective, B and M must be RelativelyPrime?, A-1 must be congruent to 1 mod 4, and all factors of M should be factors of A-1.


The proliferation of this sort of prng is a crime upon humanity. They are well known to suffer from various defects. One such defect is known as the MarsagliaEffect?, after GeorgeMarsaglia?. If graphed in high enough dimensions, linear generators will show a regular lattice pattern that is easily seen. Even MersenneTwister suffers from this effect, though you need super-spiffy 623 dimensional graph paper to see it.

Another defect: the lower order bits tend to go on short, repeated and highly predictable cycles. See http://www.alife.co.uk/nonrandom/.


EditText of this page (last edited September 29, 2014) or FindPage with title or text search