Prime modulus multiplicative linear congruential generator: Difference between revisions

From SklogWiki
Jump to navigation Jump to search
Line 23: Line 23:
#[http://dx.doi.org/10.1145/769800.769827 G. Marsaglia, "Seeds for Random Number Generators",Communications of the ACM, '''46''' pp. 90-93 (2003)]
#[http://dx.doi.org/10.1145/769800.769827 G. Marsaglia, "Seeds for Random Number Generators",Communications of the ACM, '''46''' pp. 90-93 (2003)]
#[http://dx.doi.org/10.1090/S0025-5718-99-00996-5 Pierre L'Ecuyer, "Tables of linear congruential generators of different sizes and good lattice structure", Mathematics of Computation, '''68''' pp. 249 - 260  (1999)]
#[http://dx.doi.org/10.1090/S0025-5718-99-00996-5 Pierre L'Ecuyer, "Tables of linear congruential generators of different sizes and good lattice structure", Mathematics of Computation, '''68''' pp. 249 - 260  (1999)]
#[http://dx.doi.org/10.1016/S0010-4655(97)00052-0  Iosif G. Dyadkin and Kenneth G. Hamilton "A study of 64-bit multipliers for Lehmer pseudorandom number generators", Computer Physics Communications  pp. 103-130 (1997)]


#[CPC_1997_103_0103]
[[Category: Random numbers]]
[[Category: Random numbers]]

Revision as of 15:23, 2 March 2007

The parameter should be prime and as large as possible without causing a numerical overflow on the computer that it is running on. For example, for a 32-bit (31 bit + 1 sign bit) word size then the logical choice of is the Mersenne prime

,

with (a positive primitive root of see Ref.s 1 and 2), and . With these parameters one is able to generate a series of pseudo-random numbers from one seed value. For an interesting discussion on how to choose an initial seed value see Ref. 3. For a list of other values of and see Ref.4 and for its use on 64-bit computers see Ref. 5.

References

  1. D. W. Hutchinson, "A New Uniform Pesudorandom Number Generator", Communications of the ACM, 9 pp. 432-433 (1966)
  2. P. A. W. Lewis and A. S. Goodman and J. M. Miller, "A pseudo-random number generator for the System/360", IBM Systems Journal 2 pp. 136 (1969)
  3. G. Marsaglia, "Seeds for Random Number Generators",Communications of the ACM, 46 pp. 90-93 (2003)
  4. Pierre L'Ecuyer, "Tables of linear congruential generators of different sizes and good lattice structure", Mathematics of Computation, 68 pp. 249 - 260 (1999)
  5. Iosif G. Dyadkin and Kenneth G. Hamilton "A study of 64-bit multipliers for Lehmer pseudorandom number generators", Computer Physics Communications pp. 103-130 (1997)