Simulation and modeling - Old Questions
Question Answer Details
8. Use the linear congruential method to generate a sequence of three two-digit random integers. Let X0=29, α=9, c=49 and m=100.
Answer
AI Generated Answer
AI is thinking...
Official Answer
Given,
X0 = 29,
α = 9,
c= 49 &
m=100
We have,
Xi+1 = (α Xi + c) mod m
The sequence of random integers are calculated as follows:
X0 = 29
X1 = (α X0 + c) mod m = (9*29+49) mod 100 = 310 mod 100 = 10
X2 = (α X1 + c) mod m = (9*10+49) mod 100 = 139 mod 100 = 39
X3 = (α X2 + c) mod m = (9*39+49) mod 100 = 400 mod 100 = 0
Therefore, the sequence of two-digit random integers are 29, 10, 39, 00.