Period Length
The period of a general LCG is at most m, and for some choices of a much less than that. Provided that c is nonzero, the LCG will have a full period for all seed values if and only if:
- and are relatively prime,
- is divisible by all prime factors of ,
- is a multiple of 4 if is a multiple of 4.
These three requirements are referred to as the Hull-Dobell Theorem. While LCGs are capable of producing decent pseudorandom numbers, this is extremely sensitive to the choice of the parameters c, m, and a.
Historically, poor choices had led to ineffective implementations of LCGs. A particularly illustrative example of this is RANDU which was widely used in the early 1970s and led to many results which are currently being questioned because of the use of this poor LCG.
Read more about this topic: Linear Congruential Generator
Famous quotes containing the words period and/or length:
“If there is any period one would desire to be born in, is it not the age of Revolution; when the old and the new stand side by side, and admit of being compared; when the energies of all men are searched by fear and by hope; when the historic glories of the old can be compensated by the rich possibilities of the new era?”
—Ralph Waldo Emerson (18031882)
“To find the length of an object, we have to perform certain
physical operations. The concept of length is therefore fixed when the operations by which length is measured are fixed: that is, the concept of length involves as much as and nothing more than the set of operations by which length is determined.”
—Percy W. Bridgman (18821961)