pseudorandom numbers
Generated in a digital computer by a numerical algorithm^{}, pseudorandom numbers^{} are not random, but should appear to be random when used in Monte Carlo^{} calculations.
The most widely used and best understood pseudorandom generator is the Lehmer multiplicative congruential generator^{}, in which each number $r$ is calculated as a function of the preceding number in the sequence^{}
$${r}_{i}=a{r}_{i1}\phantom{\rule{veryverythickmathspace}{0ex}}(modm)$$ 
or
$${r}_{i}=a{r}_{i1}+c\phantom{\rule{veryverythickmathspace}{0ex}}(modm),$$ 
where $a$ and $c$ are carefully chosen constants, and $m$ is usually a power of two, ${2}^{k}$. All quantities appearing in the formula (except $m$) are integers of $k$ bits. The expression in brackets is an integer of length $2k$ bits, and the effect of the modulo $modm$ is to mask off the most significant part of the result of the multiplication. ${r}_{0}$ is the seed of a generation sequence; many generators allow one to start with a different seed for each run of a program, to avoid regenerating the same sequence, or to preserve the seed at the end of one run for the beginning of a subsequent one. Before being used in calculations, the ${r}_{i}$ are usually transformed to floating point numbers normalized into the range $[0,1]$. Generators of this type can be found which attain the maximum possible period of ${2}^{k2}$, and whose sequences pass all reasonable tests of “randomness”, provided one does not exhaust more than a few percent of the full period.
Multiplicative random number^{} generators have serious limitations as random number generators for many tasks, especially those that involve looking at spectra. A number of other fast random number generators exist (such as the Mersenne Twister) all with various proven good qualities.
For many scientific projects, analysis techniques are used that are extremely sensitive to patterns in the input, so when generating fake input using pseudorandom number generators, it is often necessary to use extremely good quality pseudorandom numbers. For some projects it is in fact appropriate to use a hardware device which generates truly random numbers, although even this must be scoured clean of patterns. Some computers now have hardware random number generators built in.
However, there is a completely separate category^{} of pseudorandom number generators, namely those used in cryptography. Here the goal is to make it computationally infeasible to deduce the next “random” bit in spite of knowing all preceding (and possibly many future) bits. Such pseudorandom number generators can in fact serve as cryptosystems themselves: the requirements for such a random number generator are exactly the same as those for a stream cipher. They are generally more expensive to run but produce much higher quality random numbers. To be used in a cryptographic application, they should also have a sophisticated reseeding schedule and a source of genuine randomness to provide recovery from exposure of their internal state.
References

•
Originally from The Data Analysis Briefbook (http://rkb.home.cern.ch/rkb/titleA.htmlhttp://rkb.home.cern.ch/rkb/titleA.html)
Title  pseudorandom numbers 

Canonical name  PseudorandomNumbers 
Date of creation  20130322 12:07:13 
Last modified on  20130322 12:07:13 
Owner  akrowne (2) 
Last modified by  akrowne (2) 
Numerical id  8 
Author  akrowne (2) 
Entry type  Definition 
Classification  msc 11K45 
Classification  msc 65C10 
Synonym  pseudorandom numbers 
Synonym  PRNG 
Related topic  TrulyRandomNumbers 