Linear Congruential Generator - Period Length

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:

  1. and are relatively prime,
  2. is divisible by all prime factors of ,
  3. 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:

    The easiest period in a crisis situation is actually the battle itself. The most difficult is the period of indecision—whether to fight or run away. And the most dangerous period is the aftermath. It is then, with all his resources spent and his guard down, that an individual must watch out for dulled reactions and faulty judgment.
    Richard M. Nixon (1913–1995)

    An ... important antidote to American democracy is American gerontocracy. The positions of eminence and authority in Congress are allotted in accordance with length of service, regardless of quality. Superficial observers have long criticized the United States for making a fetish of youth. This is unfair. Uniquely among modern organs of public and private administration, its national legislature rewards senility.
    John Kenneth Galbraith (b. 1908)