Question
write python code. Write a program that generates random numbers using the Wichmann-Hill pseudorandom number generator. The Wichmann-Hill number generator uses three LCG (Linear Congruential
write python code.
Write a program that generates random numbers using the Wichmann-Hill pseudorandom number generator. The Wichmann-Hill number generator uses three LCG (Linear Congruential Generators) with different prime moduli (values of m) to generate random numbers. If U_1i,U_2i and U_3i are the ith numbers generated from the three LCGs respectively, then we add the 3 values together and take only the fractional part to generate U_i, the ith value of our Wichmann-Hill generator. That is: U_i = (U_1i+U_2i+U_3i) mod 1 Set the values of the parameters for the three LCGs as you wish, as long as the values of m in each of the three LCGs are prime. Your program should output 100 values generated using the Wichmann-Hill generator
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started