Main Page | See live article | Alphabetical index

# Random number generator

A random number generator is a computational or physical device designed to generate a sequence of numbers that does not have any easily discernable pattern, so that the sequence can be treated as being random.

## Computational versus physical random number generators

A computational random number generator is more accurately called a "pseudorandom" number generator, since the sequence is generated by a specific algorithm, which can be replicated exactly to yield an identical sequence. A numeric value, called a seed, is used in the algorithm to produce the random number. This seed is often based on the computer's local time at the moment the computer code is executed, thus reducing the probability of producing the same starting sequence twice.

A physical random number generator is based on an essentially random atomic or subatomic physical phenomenon. Examples of such phenomena include radioactive decay and thermal noise.

SGI has patented a method called lavarand for generating random numbers using digital snapshots of lava lamps (patent #5,732,138). LavaRnd has improved and generalized this method using various physical chaotic processes as sources. Their algorithm has been placed in the public domain.

## Implications and applications

Random number generators have several important applications. Random number generators were originally constructed to carry out computer simulation of physical phenomena, specifically the simulation of neutron transport in nuclear fission. Random number generation is also important in modern cryptography, and is sometimes used in parapsychology as a test of precognition.

Every modern electronic casino game contains one or more random number generators that decide the outcome of a trial in the game. Even in slot machines where mechanical reels appear to spin randomly, the reels are actually spinning for entertainment value and eventually stop exactly where the machine's random number generators decided they would stop when the handle was first pulled.

## Low-discrepancy sequences

Some computations that make use of a random number generator can be summarized as the computation of a total or average value, such as the computation of integrals by the Monte Carlo method. For such problems, it may be possible to find a more accurate solution by the use of so-called low-discrepancy sequences, also called quasirandom numbers. Such sequences have a definite pattern that fills in gaps evenly, qualitatively speaking; a truly random sequence usually leaves larger gaps.