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:
“His singing carried me back to the period of the discovery of America ... when Europeans first encountered the simple faith of the Indian. There was, indeed, a beautiful simplicity about it; nothing of the dark and savage, only the mild and infantile. The sentiments of humility and reverence chiefly were expressed.”
—Henry David Thoreau (18171862)
“Punishment followed on a grand scale. For ten days, an unconscionable length of time, my father blessed the palms of his childs outstretched, four-year-old hands with a sharp switch. Seven strokes a day on each hand; that makes one hundred forty strokes and then some. This put an end to the childs innocence.”
—Christoph Meckel (20th century)