Skip to main content Skip to navigation

Random Numbers

Random Numbers on Your Computer

Random numbers are needed by computers for games and effects involving chance; also, more seriously, they are needed for real-world mathematical models which involve probability and statistics. Therefore, are computers secretly tossing coins or rolling dice ? No ! I shall explain why in this talk. Computer generated random numbers actually come from mathematical equations and hence are really deterministic - so how can they be random ? This is the enigma to be explained. I shall take the so-called congruential method, based on an equation of the form

xi=(axi-1 + b)Mod(m), i=1,2,?,N

with explanation and discussion. Warnings about the choice of a and b and m are needed, and a plug for theorems from number theory will be given. The requirement of an even lattice structure will be illustrated and emphasised. Illustrations of awful generators from computer manufacturers who did not know the mathematical theory will be given.