Learning by Simulations has been developed by Hans Lohninger to support both teachers and students in the process of knowledge transfer and acquisition . Click here for more information.

Share this Page: del.icio.us   Reddit   Facebook   StumbleUpon   MySpace   Digg   Twitter  

Computer languages usually offer a command to create random numbers. The generation of random numbers, however, is not an easy task for a computer, since the computer is a deterministic machine with no built-in randomness. Thus it is impossible to create true random numbers without any additional hardware.

What can be done, is to create pseudo random numbers which behave almost like random numbers but which are repeated after a fixed (mostly quite long) period. These pseudo random numbers are generated by linear congruential generators (LCG). The principle of an LCG is quite simple: a new pseudo random number is generated on the basis of the previous random number by adding a certain offset and wrapping the result if it exceeds a certain limit.

English version [327 kB]
German version [327 kB]
After downloading please unpack all files of
the zipped packages and start the executable.
The program Linear Congruential Generator allows to experiment with the parameters of an LCG and visualizes the subtle correlations between the pseudo-random numbers successively created by an LCG.

Last Update: 2006-Jul-02