Engineering-Computation Homework 3 Solved

30.00 $

Description

Rate this product
  1. Analyze your LCG from Homework 2. Find the mean after the first
    1. 100 random numbers,
    2. 10,000 random numbers,
    3. 1,000,000 random numbers,
    4. 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
    1. 100 random numbers,
    2. 10,000 random numbers,
    3. 1,000,000 random numbers,
    4. 100,000,000 random numbers.

      Comment on your result. If it was a perfect pseudorandom number generator what would your graph look like? (You may use Excel or Google Sheets or any other program you’d like for the graph, by printing the 100 bin tallies to the screen and copying them in—or some other method.)

  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.

  • HW3-5greqb.zip