Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Rules In Database Systems Third International Workshop Rids 97 Sk Vde Sweden June 26 28 1997 Proceedings Lncs 1312

Authors: Andreas Geppert ,Mikael Berndtsson

1997th Edition

3540635165, 978-3540635161

More Books

Students also viewed these Databases questions

Question

How did you feel about taking piano lessons as a child? (general)

Answered: 1 week ago