Simulation and modeling - Old Questions

Question Answer Details

2.  Describe the linear congruential method for random number generation. Use the Multiplicative congruential method to generate a sequence of four-three digit random integers, with seed = 117, constant multiplier = 43 and modulus = 1000.  [4+6]

10 marks
Asked in 2070

Answer

AI Generated Answer

AI is thinking...

Official Answer

The linear congruential method produces a sequence of integers X1, X2, X3,.......between zero and m-1 according to the following recursive relationship:

\\begin{displaymath}X_{i+1} = (a X_i + c) ~ {\\rm mod} ~ m, ~~~~~~ i = 0, 1, 2, ... \\end{displaymath}

  • The initial value X0 is called the seed;
  • a is called the constant multiplier;
  • c is the increment
  • m is the modulus

The selection of a, c, m and X0 drastically affects the statistical properties such as mean and variance, and the cycle length.

Case 1:

     When $ c \\ne 0$, the form is called the mixed congruential method.

Case 2:
    When c = 0, the form is known as the multiplicative congruential method.

Case 3:

    When a = 1, the form is known as additive congruential method.


The random numbers corresponding to each random integer can be obtained as:                                        

          R= Xi/m, for i = 0, 1, 2, 3, …………..

Now,

Given,

    X117

    α = 43,

    m=1000

We have,

For multiplicative congruential method:

        Xi+1 = (α X) mod m

The sequence of random integers are calculated as follows:

X= 117

X1 = (α X0) mod m = (43*117) mod 1000 = 5031 mod 1000 = 031

X2 = (α X1) mod m = (43*31) mod 1000 = 1333 mod 1000 = 333

X3 = (α X2) mod m = (43*333) mod 1000 = 14319 mod 1000 = 319

X4(α X3 ) mod m = (43*319) mod 1000 = 13717 mod 1000 = 717

Therefore,
The sequence of random integers are 117, 031, 333, 319, 717