Number - Pseudo-random Numbers

1 - About

Pseudo-random Numbers is a sequence of numbers that has the following properties:

  • The sequence should never repeat itself
  • The numbers should be spread evenly across the numeric domain (for instance between 0 and 10)

Something random should be unpredictable. We shouldn’t be able to predict the next value of the sequence.

3 - Example of bad random sequence

Type Sequence Example
Uniform sequence 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
Repeated sequence 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
Too many low numbers 1 3 2 5 3 9 1 2 4 2 5 1 1 2 8 1 5 2 3 4
Too many even numbers 2 8 4 6 0 9 8 2 4 8 6 4 2 2 5 1 4 8 6 2

4 - Generator

This sequence is generated through a random generator that requires a seed value. For the same seed value, you will get the same sequence of Pseudo-random Number.

Random number generators are pseudo-random number generators because the output of a deterministic program cannot really be random. They are complex because they are deterministic programs that must give the illusion of being non-deterministic.

A random generator may be considered high-quality for simulation while being considered unacceptable for cryptography.

4.1 - With Distribution

A frequent problem in statistical simulations (the Monte Carlo method) is the generation of pseudo-random numbers that are distributed in a given way. Most algorithms are based on a pseudorandom number generator that produces numbers X that are uniformly distributed in the interval [0,1]. These random variates X are then transformed via some algorithm to create a new random variate having the required probability distribution.

data/type/number/pseudo-random.txt · Last modified: 2018/01/31 17:02 by gerardnico