next up previous

Exercise 10: Explore LFGs visually.

Use the code ranlf.f to generate random numbers. Modify the code to print out pairs of random numbers on [0,1) and display them as points as vs. for 4,095 points (4,096 random numbers).

(a) Using (n varies from 0 to 16), and k = 12, select a subtractive generator. Use an initial seed of 37 to generate the initial state. Compare the display to those of Figures 6a-f in Section 4 which were generated using LCG generators.

(b) Select different values for k, but keep fixed at 17. Use the parameters as in (a) above. Generate plots as above in (a). What do you observe about the uniformity of the random numbers and their correlation?