How maximum period for linear congruential generator works

113 Views Asked by At

I am learning about Linear Congruential Generators. I came across conditions for maximum cycle:

For Xn = (a*Xn-1+c) mod m, maximum cycle is achieved when:

  1. c is relatively prime to m
  2. m = 2b ,for some integer b
  3. a = 1 + 4*k ,for some integer k

But I don't understand how these conditions came into place. I'm finding it difficult to understand how recursive "mod" operation works. I tried to read the original paper discussing these conditions, but was not able to understand (thanks to the cryptic explanation). Can someone help me out here?