Pseudorandom Number Generators. A random selection of a number from a set or range of numbers is one in which each number in the range is equally likely to be selected. Random Number - Definition. Cryptography, games, and many statistical models rely on random numbers.
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Example from cryptography – keys for encryption of data.
Example from games – the behavior of a computer-controlled character.
Example from statistics - the Monte Carlo method.Applications of Random Numbers
Generation of random numbers by observation of physical events can be slow and impractical.Random Numbers
These numbers are inherently nonrandom because they are generated by deterministic mathematical processes.
“Anyone who considers arithmetical methods of producing random digits is, of course, in a state of sin.” – John von Neumann
Hence, these numbers are known as pseudorandom numbers.
The algorithms used to generate them are called pseudorandom number generators.Pseudorandom Numbers
Therefore, different PRNG’s are suitable for different applications.
For example, a generator that produces unpredictable but not uniformly distributed number sequences may be useful in cryptography but not in the Monte Carlo method.Pseudorandom Number Generators
John von Neumann
Square the seed and a leading zero to obtain 04165681.
Take the middle four digits, 1656 as the next random number.
Repeat to get the following sequence:
2041,1656, 7423, 1009, 180, 324, 1049, 1004, 80, 64, 40,16, 2, 0, 0, 0, 0, 0…Middle-Square Method - Example
7600^2= 57,760,000, so the next number is also 7600. If this is repeated, the same number will be obtained indefinitely.
This example illustrates the importance of choosing good seed values (and good parameters in general) for pseudorandom number generators.Middle-Square Method - Example
The linear congruence method provides more reliable results.
Derrick H. Lehmer developed this method in 1951. Since then, it has become one of the most commonly used PRNG’s.Linear Congruence Method
Issues arise from the easily detectable statistical interdependence of the members of sequences generated with this method. For example, it makes the method unsuitable for cryptography.
The correlation of members of the sequences results in the uneven distribution of points generated in greater than 2 dimensions.
Ordered triples of numbers generated by the algorithm lie on a finite number of planes.Linear Congruence Method - Flaws
3000 triples generated by RANDU.
The Mersenne Twister was developed by mathematicians Makoto Matsumoto and Takuji Nishimura in 1997.
The generator runs faster than all but least statistically sound PRNG’s.
It is distributed uniformly in 623 dimensions.
The generator passes numerous tests for randomness.
The Mersenne Twister gets its name from its huge period of 2^19937-1. This number is a Mersenne prime.
It would probably take longer to cycle than the entire future existence of humanity (and, perhaps, the universe.)Recent PRNG’s – Mersenne Twister
The Mersenne Twister is, therefore, not suitable in cryptography.
This illustrates the fact that no single PRNG is the best choice for all applications.Mersenne Twister
PRNG’s are useful in game design, cryptography, and statistical modeling.
Different PRNG’s are suitable for different applications.
It is important to choose a good set of parameters for a PRNG.
The middle-square method uses the middle digits of the square of the nth term to generate the (n+1)th term.
The linear congruence method is defined by the recursive formula Xn+1 = (a * Xn + b) mod cSummary
"Hardware random number generator." Wikipedia, The Free Encyclopedia. 15 Jul 2006, 04:50 UTC. Wikimedia Foundation, Inc. 17 Jul 2006
Hutchinson, Mark. “An Examination of Visual Basic’s Random Number Generation.” 15Seconds. 14 Jul 2006
"Mersenne twister." Wikipedia, The Free Encyclopedia. 12 Jul 2006, 18:46 UTC. Wikimedia Foundation, Inc. 17 Jul 2006
"Middle-square method." Wikipedia, The Free Encyclopedia. 5 May 2006, 05:06 UTC. Wikimedia Foundation, Inc. 17 Jul 2006
“Pseudorandom number generator." Wikipedia, The Free Encyclopedia. 11 Jul 2006, 07:22 UTC. Wikimedia Foundation, Inc. 17 Jul 2006
"RANDU." Wikipedia, The Free Encyclopedia. 11 May 2006, 11:06 UTC. Wikimedia Foundation, Inc. 17 Jul 2006