In computational number theory, Marsaglia's theorem connects modular arithmetic and analytic geometry to describe the flaws with the pseudorandom numbers resulting from a linear congruential generator. As a direct consequence, it is now widely considered that linear congruential generators are weak for the purpose of generating random numbers. Particularly, it is inadvisable to use them for simulations with the Monte Carlo method or in cryptographic settings, such as issuing a public key certificate, unless specific numerical requirements are satisfied. Poorly chosen values for the modulus and multiplier in a Lehmer random number generator will lead to a short period for the sequence of random numbers. Marsaglia's result may be further extended to a mixed linear congruential generator. [1]
For example, with RANDU, we have
m=232
floor((231 x 3!)1/3)=2344
k=65539
Consider a Lehmer random number generator with
ri+1\equivkri\modm
for any modulus
m
k
0<ri<m
u1=
r1 | |
m, |
u2=
r2 | |
m, |
u3=
r3 | |
m |
,\ldots
Define the points
\pi1=(u1,\ldots,un),\pi2=(u2,\ldots,un+1),\pi3=(u3,\ldots,un+2),\ldots
on a unit
n
u
n
(n!m)1/n
c1,c2,\ldots,cn
c1+c2k+c
2 | |
3k |
+ … +cnkn-1\equiv0\modm,
there are at most
|c1|+|c2|+ … +|cn|
n