Linear Congruential Generator

See inside

This project computes pseudo-random numbers using the Linear Congruential Generator method.
The parameters (See inside) are set to the Park-Miller Minimal Standard values (see Notes and Credits).
Click on the green flag. The algorithm then generates a 2,147,483,647 sequence of pseudo-random numbers before the sequence repeats.

Notes and Credits

The random numbers generated in a computer or calculator are not truly random. They are not produced by sampling a physical process that contains a random process, such as flipping a coin or monitoring radioactive decay.
Computer and calculator-generated random numbers are produced by computing an algorithm, in this project, the LInear Congruential Generator (LCG). An algorithm, by its very nature, contains no random processes. Still, these computer-generated random numbers pass most statistical tests and are, for most (but not all) practical purposes, random. Random numbers produced by an algorithm are more accurately called pseudo-random numbers.
The most commonly used algorithm for generating psuedo-random numbers is the linear congruential generator (LCG). The defining equation for a LCG, and the variables, are shown at the top of the project screen.
In 1988 Park and Miller published a set of parameters that has become widely used in software packages for generating psuedo-random numbers. Their generator is known as the minimal standard random number generator. The parameters are a = 16807, c = 0, and m = 2147483647.
You can change the parameters to test other LCGs.

Shared: 9 Jul 2016 Modified: 10 Jul 2016
Favorite this project 7
Love this project 9
Total views 542
View the remix tree  2
More projects by popswilson