In: Computer Science
Why are random numbers generated with linear congruential
methods not truly random? Describe
the properties of the sequence of numbers these types of methods
will produce.
A linear congruential generator (LCG) is an algorithm that produces a series of pseudo-randomized numbers calculated using a linear discontinuous linear equation. The technique reflects one of the oldest and best-known pseudorandom number generator algorithms. The concept behind them is comparatively simple to comprehend, and they are readily applied and quick, particularly on computer hardware that can provide storage-bit truncation modulo arithmetic.
The generator is defined by recurrence relation:
Xn+1 = a (Xn + d) mod m
where {\displaystyle X}X is the sequence of pseudorandom values, and
{\displaystyle m,\,0<m}m, 0 < m — the "modulus"
a,{\displaystyle a,\,0<a<m} 0 < a < m— the "multiplier"
d, 0 ≤ d < m{\displaystyle c,\,0\leq c<m} — the "increment"
{\displaystyle X_{0},\,0\leq X_{0}<m}X0, 0 ≤ X0 < m — the "seed" or "start value"
As we can see the method of generation is already known and we can predict the whole sequence if we know d, m and X0 therefore random numbers generated by LCG are not random.
Properties of Numbers generated by LCG