Parallel Random Numbers Generation Assignment due on April 24, 2003. Prepared by Ahmet Duran. duran@cis.udel.edu Reading List: 1. 10.2 Parallel Random Numbers, Designing and Building Parallel Programs, by Ian Foster 2. The presentation slides. Question 1. Construct a linear congruential generator having maximal period for m = 32768. Why does your linear congruential generator has maximal period? Hint: Use the Theorem on the presentation slides. Question 2. Apply "replicated approach" for parallel random number generation by using the linear congruential generator X_k+1 = (7 * X_k + 11) mod 18 X_0 = 5 Take the number of the tasks as 4. You should generate one million random numbers. i) Measure the time for the sequential generator to generate the million numbers. ii) Measure the time for the "replicated approach" to generate totally one million numbers. What is the speed up T_seq / T_par ? Please print the first 40 random numbers for i) and the first 40 by each processor for ii). Each generator should use a different seed, derived from the task identifier for the "replicated approach". Please, hand in your code. Note: You may use any parallelism tool such as MPI, cilk, OpenMP, or pthreads.