next up previous

Example 1 LCG (5, 1, 16, 1)

Let us consider a simple example with a = 5, c = 1, m = 16, and . The sequence of pseudorandom integers generated by this algorithm is:

1,6,15,12,13,2,11,8,9,14,7,4,5,10,3,0,1,6,15,12,13,2,11,8,9,14,

In Figure 3, we illustrate the random number cycle for this generator. We immediately observe four features:

Figure 3: Random Number Cycle for Example 1- LC(5,1,16,1).