List of random number generators

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

Template:SHORTDESC: Random number generators are important in many kinds of technical applications, including physics, engineering or mathematical computer studies (e.g., Monte Carlo simulations), cryptography and gambling (on game servers).

This list includes many common types, regardless of quality or applicability to a given use case.

Pseudorandom number generators (PRNGs)

[edit | edit source]

The following algorithms are pseudorandom number generators.

Generator Date First proponents References Notes
Middle-square method 1946 J. von Neumann [1] In its original form, it is of poor quality and of historical interest only.
Lehmer generator 1951 D. H. Lehmer [2] One of the earliest and most influential designs.
Linear congruential generator (LCG) 1958 W. E. Thomson; A. Rotenberg [3][4] A generalisation of the Lehmer generator. Historically, the most influential and studied generator.
Lagged Fibonacci generator (LFG) 1958 G. J. Mitchell and D. P. Moore [5]
Linear-feedback shift register (LFSR) 1965 R. C. Tausworthe [6] A hugely influential design. Also called Tausworthe generators.
Wichmann–Hill generator 1982 B. A. Wichmann and D. I. Hill [7] A combination of three small LCGs, suited to 16-bit CPUs. Widely used in many programs, e.g. it is used in at least Excel 2003 and 2007 for the Excel function RAND[8] and it was the default generator in the language Python up to version 2.2.[9]
Rule 30 1983 S. Wolfram [10] Based on cellular automata.
Inversive congruential generator (ICG) 1986 J. Eichenauer and J. Lehn [11]
Blum Blum Shub 1986 M. Blum, L. Blum and M. Shub [12] Blum-Blum-Shub is a PRNG algorithm that is considered cryptographically secure. It is based on prime numbers.
Park-Miller generator 1988 S. K. Park and K. W. Miller [13] A specific implementation of a Lehmer generator, widely used because it is included in C++ as the function minstd_rand0 from C++11 onwards.[14]
ACORN generator 1989 (discovered 1984) R. S. Wikramaratna [15][16] The Additive Congruential Random Number generator.

Simple to implement, fast, but not widely known. With appropriate initialisations, passes all current empirical test suites, and is formally proven to converge. Easy to extend for arbitrary period length and improved statistical performance over higher dimensions and with higher precision.

MIXMAX generator 1991 G. K. Savvidy and N. G. Ter-Arutyunyan-Savvidy [17] It is a member of the class of matrix linear congruential generators, a generalisation of LCGs. The conceptual framework behind the MIXMAX family of generators relies on results from ergodic theory and classical mechanics.
Add-with-carry (AWC) 1991 G. Marsaglia and A. Zaman [18] A modification of Lagged-Fibonacci generators.
Subtract-with-borrow (SWB) 1991 G. Marsaglia and A. Zaman [18] A modification of Lagged-Fibonacci generators. A SWB generator is the basis for the RANLUX generator,[19] widely used e.g. for particle physics simulations.
Maximally periodic reciprocals 1992 R. A. J. Matthews [20] A method with roots in number theory. Never used in practical applications.
KISS 1993 G. Marsaglia [21] Prototypical example of a combination generator.
Multiply-with-carry (MWC) 1994 G. Marsaglia; C. Koç [22][23]
Complementary-multiply-with-carry (CMWC) 1997 R. Couture and P. L’Ecuyer [24]
Mersenne Twister (MT) 1998 M. Matsumoto and T. Nishimura [25] Closely related with LFSRs. Its MT19937 implementation is probably the most commonly used modern PRNG. Default generator in R and the Python language starting from version 2.3.
Xorshift 2003 G. Marsaglia [26] A sub-type of LFSR generators designed to be efficiently implemented in software. Marsaglia also suggested as an improvement the xorwow generator, in which the output of a xorshift generator is added with a Weyl sequence. The xorwow generator is the default generator in the CURAND library of the nVidia CUDA application programming interface for graphics processing units.
Well equidistributed long-period linear (WELL) 2006 F. Panneton, P. L'Ecuyer and M. Matsumoto [27] A LFSR closely related with Mersenne Twister, aiming at remedying some of its shortcomings.
A small noncryptographic PRNG (JSF) 2007 Bob Jenkins [28]
Small Fast Chaotic PRNG (SFC) 2010 Chris Doty-Humphrey [29][30]
Advanced Randomization System (ARS) 2011 J. Salmon, M. Moraes, R. Dror and D. Shaw [31] A simplified version of the AES block cipher, leading to very fast performance on systems supporting the AES-NI.
Threefry 2011 J. Salmon, M. Moraes, R. Dror and D. Shaw [31] A simplified version of the Threefish block cipher, suitable for GPU implementations.
Philox 2011 J. Salmon, M. Moraes, R. Dror and D. Shaw [31] A simplification and modification of the block cipher Threefish with the addition of an S-box.
WELLDOC 2013 L. Balkova, M. Bucci, A. de Luca, J. Hladky, S. Puzynina [32] A set of periodic pseudorandom number generators based on infinite words.
SplitMix 2014 G. L. Steele, D. Lea and C. H. Flood [33] Based upon the final mixing function of MurmurHash3. Included in Java Development Kit 8 and above.
Permuted Congruential Generator (PCG) 2014 M. E. O'Neill [34] A modification of LCG.
Random Cycle Bit Generator (RCB) 2016 R. Cookman [35] RCB is described as a bit pattern generator made to overcome some of the shortcomings of the Mersenne Twister and the short periods of shift/modulo generators.
Middle-Square Weyl Sequence RNG (see also middle-square method) 2017 B. Widynski [36][37] A variation on John von Neumann's original middle-square method.
xorshiftr+ 2018 U. C. Çabuk, Ö. Aydın, and G. Dalkılıç [38] A modification of xorshift+. Significantly faster than its predecessor and passes all tests in the BigCrush suite.
Xoroshiro128+ 2018 D. Blackman, S. Vigna [39] A modification of Marsaglia's Xorshift generators. One of the fastest generators on modern 64-bit CPUs. Related generators include xoroshiro128**, xoshiro256+ and xoshiro256**.
LXM 2021 G. L. Steele, S. Vigna [40] Composite generators combining two pseudorandom sub-generators (a linear congruential and an xor-based generator) and a mixing function (the MurmurHash3 function). Several of these generator are implemented as part of Java 17.
64-bit MELG (MELG-64) 2018 S. Harase, T. Kimoto [41] An implementation of 64-bit maximally equidistributed F2-linear generators with a Mersenne prime period.
Squares RNG 2020 B. Widynski [42] A counter-based version of Middle-Square Weyl Sequence RNG. Similar to Philox in design but significantly faster.[citation needed]
Collatz-Weyl Generators 2023 Tomasz R. Działa [43] A class of chaotic counter-based generators applying a broad class of non-invertible generalized Collatz mappings and Weyl sequences, enabling the generation of multiple independent streams. Leveraging 128-bit arithmetic allows for a highly efficient implementation, especially on modern 64-bit architectures.

Cryptographic algorithms

[edit | edit source]

Cipher algorithms and cryptographic hashes can be used as very high-quality pseudorandom number generators. However, generally they are considerably slower (typically by a factor 2–10) than fast, non-cryptographic random number generators.

These include:

A few cryptographically secure pseudorandom number generators do not rely on cipher algorithms but try to link mathematically the difficulty of distinguishing their output from a `true' random stream to a computationally difficult problem. These approaches are theoretically important but are too slow to be practical in most applications. They include:

Random number generators that use external entropy

[edit | edit source]

These approaches combine a pseudo-random number generator (often in the form of a block or stream cipher) with an external source of randomness (e.g., mouse movements, delay between keyboard presses etc.).

See also

[edit | edit source]

References

[edit | edit source]
  1. ^ Some of von Neumann's 1949 papers were printed only in 1951. John von Neumann, “Various techniques used in connection with random digits,” in A.S. Householder, G.E. Forsythe, and H.H. Germond, eds., Monte Carlo Method, National Bureau of Standards Applied Mathematics Series, vol. 12 (Washington, D.C.: U.S. Government Printing Office, 1951): pp. 36–38.
  2. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  3. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  4. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  5. ^ D. E. Knuth, The Art of Computer Programming, Vol. 2 Seminumerical Algorithms, 3rd ed., Addison Wesley Longman (1998); See pag. 27.
  6. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  7. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  8. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  9. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  10. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  11. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  12. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  13. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  14. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  15. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  16. ^ Wikramaratna, R.S. Theoretical and empirical convergence results for additive congruential random number generators, Journal of Computational and Applied Mathematics (2009), Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  17. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  18. ^ a b Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  19. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  20. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  21. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  22. ^ Post by George Marsaglia on the newsgroup sci.stat.math dated 1 August 2018 with title 'Yet another RNG'.
  23. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  24. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  25. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  26. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  27. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  28. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  29. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  30. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  31. ^ a b c Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  32. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  33. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  34. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  35. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  36. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  37. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  38. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  39. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  40. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  41. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  42. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  43. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
[edit | edit source]