Linear Congruent Random Number Generator Model
written by Wolfgang Christian
The Linear Congruent Number Generator Model generates a sequence of integers x[i] over the interval [0, m-1] by the recurrence relation
x[i+1] = (a*x[i]+c) mod m
where the modulus m is greater than zero, the multiplier a is greater than zero and less than m, and the increment c is greater than zero and less than m. All numbers are integers and all arithmetic is integer arithmetic. The initial value x is known as the seed.
The Linear Congruent Number Generator Model was created using the Easy Java Simulations (EJS) modeling tool. It is distributed as a ready-to-run (compiled) Java archive. Double clicking the ejs_math_RandomLCG.jar file will run the program if Java is installed.
Please note that this resource requires at least version 1.5 of Java.
1 source code document is available
The source code zip archive contains an XML representation of the EJS Linear Congruent Number Generator Model. Unzip this archive in your Ejs workspace to compile and run this model using Ejs.
download 121kb .zip
Last Modified: June 17, 2010
ComPADRE is beta testing Citation Styles!
Disclaimer: ComPADRE offers citation styles as a guide only. We cannot offer interpretations about citations as this is an automated procedure. Please refer to the style manuals in the Citation Source Information area for clarifications.
Citation Source Information
The APA Style presented is based on information from APA Style.org: Electronic References.
The Chicago Style presented is based on information from Examples of Chicago-Style Documentation.
The MLA Style presented is based on information from the MLA FAQ.
Linear Congruent Random Number Generator Model:
Is Based On Easy Java Simulations Modeling and Authoring Tool
The Easy Java Simulations Modeling and Authoring Tool is needed to explore the computational model used in the Linear Congruent Number Generator.relation by Bruce Mason
Know of another related resource? Login to relate this resource to it.