Last time we took a look at pseudo random number generators, being entirely deterministic sequences of numbers that pass many of the tests that we might use to try to identify truly random sequences.
Specifically, we considered congruential generators which, starting from an initial value of x0, known as the seed, follow the rule
xi+1 = (a × xi + c) % m
wherex % m is the remainder of integer division of x by m, a is known as the multiplier, c as the increment and m as the modulus.
We saw that we needed to be careful with our choices of the values of a, c, m and x0 if we wished to construct sequences that approximate randomness, not least that we should choose values for a, c and x0 that are strictly less than m, and the easiest way to do so is to simply copy those that have stood the test of time.
Specifically, we considered congruential generators which, starting from an initial value of x0, known as the seed, follow the rule
xi+1 = (a × xi + c) % m
where
We saw that we needed to be careful with our choices of the values of a, c, m and x0 if we wished to construct sequences that approximate randomness, not least that we should choose values for a, c and x0 that are strictly less than m, and the easiest way to do so is to simply copy those that have stood the test of time.
Full text...