Simulation and modeling - Old Questions

Question Answer Details

7.  Explain the congruence method of generating random numbers.

5 marks
Asked in 2068

Answer

AI Generated Answer

AI is thinking...

Official Answer

The congruence method (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:                                        

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