Description
50 points
NE 4499/5599
CS 4499/5599
Computational Engineering with C++
Dr. Leslie Kerby
1. Analyze your LCG from Homework 2. Find the mean after the first
a. 100 random numbers,
b. 10,000 random numbers,
c. 1,000,000 random numbers,
d. 100,000,000 random numbers.
Comment on the result. If it was a perfect pseudorandom number generator what would the mean be?
2. Create 100 equidistant bins between 0 and 1 and map each random number to its bin. Graph the histogram of how many random numbers were tallied to each bin after
a. 100 random numbers,
b. 10,000 random numbers,
c. 1,000,000 random numbers,
d. 100,000,000 random numbers.
3. Find the period of your LCG.
4. (Graduate Students only) Use a multiplier of 60 and find the period and explain what happens. Use a multiplier of 62 and find the period and explain what happens. Explain why even multipliers are never used in LCGs.
Attach your source code, screenshots of output, graphs, and header (if used) files.




Reviews
There are no reviews yet.