# 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 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 be the following:

- Replicable
- Fast
- Not have large gaps between two generated numbers
- Have a sufficiently long running period
- 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
- Presence of cyclical variations