The pseudorandom number generator
The generation of real random sequences using deterministic algorithms is impossible: at most, pseudorandom sequences can be generated. These are, apparently, random sequences that are actually perfectly predictable and can be repeated after a certain number of extractions. A pseudorandom number generator (PRNG) is an algorithm designed to output a sequence of values that appear to be generated randomly.
The pros and cons of a random number generator
A random number generation routine must have the following attributes:
- Be replicable
- Be fast
- Not have large gaps between two generated numbers
- Have a sufficiently long-running period
- Be able to generate numbers with statistical properties that are as close as possible to ideal ones
The most common cons of random number generators are as follows:
- Numbers not uniformly distributed
- Discretization of the generated numbers
- Incorrect mean or variance ...