**3. RANDOM NUMBERS**

The basic requirement of random numbers is that the order in which they occur should be

independent. In simulation models, the use of [0, 1] random numbers is most preferred. In computer simulation truly random numbers cannot be generated because all computer activities are guided by algorithms which are deterministic in nature. However sequences of numbers, called pseudo-random numbers, are used as random numbers. These numbers satisfy some of the properties of random numbers. So the generation of random numbers (i.e., the pseudo-random numbers) is a fundamental step in simulation. We describe two random numbers generation technique below :

(a) Mid-Square Technique

This is the oldest technique given by Neumann which is described below :

(i) Take a number of 2d digits (called seed).

(ii) Square it.

(iii) Take the middle 2 d digit (non-zero) and it will be the first pseudo-random number.

[This technique has a drawback. We may obtain zero digits in the middle resulting a stop of this technique.]e.g., Let u_{0} = 0.0400 (seed)

Then u_{0}^{2} = 0.001 60000

=> the first pseudo-random number is u1 = 0.1 600.

Then u^{2}_{1} = 0. 02560000

=> the second pseudo-random number is u_{2} = 0.5600 and so on.

**(b) Linear Congruential Technique**

This is also known as power residual technique. This recursion formula is

X _{k} =(a x _{k} _ _{1} + c) (mod m), k = 1 , 2, . .. .

where a, c and the seed x0 are all positive integers and less than m. c is relatively prime to m. If

c = 0 then this is called multiplicative congruential technique. Again m is chosen to be 2^{b} or 10^{d}

(b = binary, d = decimals). (mod m) gives the remainder on division.

e.g., Let a= 31, c = 7, m = 1 00 and x_{0} = 21 .

Then, x_{1} = (31 x 21 + 7) (mod 1 00)

(0, = 658 (mod 1 00) = 58

=> the first (0,1 ) random number is u_{1} = x_{l} /M =0.05 - = 0.58

x_{2} = (31 x 58 + 7) (mod 1 00)

= 1 805 (mod 1 00)

= 5

=> the second (0, 1 ) random number is u2 = x2 = 0. 05

Again x_{3} = (3 1 x 5 + 7) (mod 1 00)

= 1 62 (mod 1 00)

= 62

=> the third (0, 1 ) random number is u_{3} = x_{3}/m = 0.62 m

and so on.

If the seed is changed then