next up previous

Exercise 4: Establish all cycles in LCGs when m = p, at a prime.

Consider linear, congruential random number generators. If c=0, it is obvious that is not a good candidate integer for the initial seed because it maps to itself. In fact, if m = p, a prime, then there is always a number which maps to itself (a constant sequence), even if . Prove this by finding the integer which maps to itself, and which does not appear in the full period sequence of length m-1 for the following linear, congruential generators: