0% found this document useful (0 votes)
18 views4 pages

Random Number Generation

The document discusses the Linear Congruential Method for generating random numbers, detailing its recursive formula and components such as the seed, multiplier, increment, and modulus. It distinguishes between mixed and multiplicative forms based on the value of the increment. An example is provided to illustrate the generation of a sequence of random numbers using specific parameters.

Uploaded by

Dr. Vijay Gadakh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views4 pages

Random Number Generation

The document discusses the Linear Congruential Method for generating random numbers, detailing its recursive formula and components such as the seed, multiplier, increment, and modulus. It distinguishes between mixed and multiplicative forms based on the value of the increment. An example is provided to illustrate the generation of a sequence of random numbers using specific parameters.

Uploaded by

Dr. Vijay Gadakh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Techniques for Generating Random Numbers:

➢ Linear Congruential Method

▪ The linear congruential method, initially proposed by Lehmer


[1951], produces a sequence of integers, X1, X2, ... between zero
and m -1, according to the following recursive relationship:
Xi+1 = (a Xi + c) mod m, i = 0,1, 2, ...

▪ The initial value X0 is called the seed, a is called the constant


multiplier, c is the increment, and m is the modulus.

Moelling and Simulation (302529)


▪ If c ≠ 0 in the previous equation, the form is called the mixed
congruential method. When c = 0, the form is known as the
multiplicative congruential method.

▪The selection of the values for a, c, m and X0 drastically


affects the statistical properties and the cycle length.

Moelling and Simulation (302529)


EXAMPLE:
Use the linear congruential method to generate a sequence of
random numbers with X0 = 27, a= 17, c = 43, and m = 100.
Here, the integer values generated will all be between zero
and 99 because of the value of the modulus. These random
integers should appear to be uniformly distributed the integers
zero to 99. Random numbers between zero and 1 can be
generated by:
Ri = Xi / m, i= 1,2,....

Moelling and Simulation (302529)


The sequence of Xi and subsequent Ri values is computed as
follows:

X0 = 27
X1 = (17.27 + 43) mod 100 = 502 mod 100 = 2
R1 = 2 / 100 = 0. 02
X2 = (17 • 2 + 43) mod 100 = 77 mod 100 = 77
R2 = 77 / 100 = 0. 77
X3 = (17•77+ 43) mod 100 = 1352 mod 100 = 52
R3 = 52 / 100 = 0. 52

Moelling and Simulation (302529)

You might also like