Mersenne twister
Open Access
- 1 January 1998
- journal article
- research article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Modeling and Computer Simulation
- Vol. 8 (1) , 3-30
- https://doi.org/10.1145/272991.272995
Abstract
A new algorithm called Mersenne Twister (MT) is proposed for generating uniform pseudorandom numbers. For a particular choice of parameters, the algorithm provides a super astronomical period of 2 19937 −1 and 623-dimensional equidistribution up to 32-bit accuracy, while using a working area of only 624 words. This is a new variant of the previously proposed generators, TGFSR, modified so as to admit a Mersenne-prime period. The characteristic polynomial has many terms. The distribution up to v bits accuracy for 1 ≤ v ≤ 32 is also shown to be good. An algorithm is also given that checks the primitivity of the characteristic polynomial of MT with computational complexity O(p 2 ) where p is the degree of the polynomial. We implemented this generator in portable C-code. It passed several stringent statistical tests, including diehard. Its speed is comparable to other modern generators. Its merits are due to the efficient algorithms that are unique to polynomial calculations over the two-element field.Keywords
This publication has 24 references indexed in Scilit:
- Strong deviations from randomness in m -sequences based on trinomialsACM Transactions on Modeling and Computer Simulation, 1996
- Maximally equidistributed combined Tausworthe generatorsMathematics of Computation, 1996
- The k-Dimensional Distribution of Combined GFSR SequencesMathematics of Computation, 1994
- On the lattice structure of the add-with-carry and subtract-with-borrow random number generatorsACM Transactions on Modeling and Computer Simulation, 1993
- Twisted GFSR generatorsACM Transactions on Modeling and Computer Simulation, 1992
- The hierarchy of correlations in random binary sequencesJournal of Statistical Physics, 1991
- Efficient and portable combined Tausworthe random number generatorsACM Transactions on Modeling and Computer Simulation, 1991
- Factoring multivariate polynomials over finite fieldsJournal of Computer and System Sciences, 1985
- Pseudo-randomness properties of binary shift register sequences (Corresp.)IEEE Transactions on Information Theory, 1975
- An Asymptotically Random Tausworthe SequenceJournal of the ACM, 1973