Professional Documents
Culture Documents
www.naruto.com
Outline:-
What is Random number?
Application of Random number
True Random numbers
True Random numbers generation
Pseudo random numbers
Pseudo random numbers generation
Mid Square algorithom
What is Random number
A random number is a number generated by a process, whose outcomes
is unpredictable, and which cannot be subsequentially reliably reproduced.
• Mid-Square algoritham
• linear Congruetial Generation(LCG)
Mid Square method(PRNG)
It was given by John Von Neumann and Metropolis in 1940s.
Algoritham:
Take any integer (seed) of say a two-digit number.
Square it and pick the middle two digit and discard the rest.
Now again square the selection middle two digits in the previous step.
Repeat.
Example:
linear Congruetial Generation(LCG)