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:

    Of all the barbarous middle ages, that
    Which is most barbarous is the middle age
    Of man! it is—I really scarce know what;
    But when we hover between fool and sage,
    And don’t know justly what we would be at—
    A period something like a printed page,
    Black letter upon foolscap, while our hair
    Grows grizzled, and we are not what we were.
    George Gordon Noel Byron (1788–1824)

    Twenty-four-hour room service generally refers to the length of time that it takes for the club sandwich to arrive. This is indeed disheartening, particularly when you’ve ordered scrambled eggs.
    Fran Lebowitz (b. 1950)