It is high time we let go of the Mersenne Twister

When the Mersenne Twister made his first appearance in 1997 it was a powerful example of how linear maps on $\mathbf F_2$ could be used to generate pseudorandom numbers. In particular, the easiness with which generators with long periods could be defined gave the Mersenne Twister a large following, in spite of the fact that such long periods are not a measure of quality, and they require a large amount of memory. Even at the time of its publication, several defects of the Mersenne Twister were predictable, but they were somewhat obscured by other interesting properties. Today the Mersenne Twister is the default generator in C compilers, the Python language, the Maple mathematical computation system, and in many other environments. Nonetheless, knowledge accumulated in the last $20$ years suggests that the Mersenne Twister has, in fact, severe defects, and should never be used as a general-purpose pseudorandom number generator. Many of these results are folklore, or are scattered through very specialized literature. This paper surveys these results for the non-specialist, providing new, simple, understandable examples, and it is intended as a guide for the final user, or for language implementors, so that they can take an informed decision about whether to use the Mersenne Twister or not.

[1]  G. Marsaglia,et al.  Matrices and the structure of random number sequences , 1985 .

[2]  Makoto Matsumoto,et al.  SIMD-Oriented Fast Mersenne Twister: a 128-bit Pseudorandom Number Generator , 2008 .

[3]  H. Niederreiter Quasi-Monte Carlo methods and pseudo-random numbers , 1978 .

[4]  Sebastiano Vigna,et al.  Scrambled Linear Pseudorandom Number Generators , 2018, ACM Trans. Math. Softw..

[5]  Bruce Schneier,et al.  Practical cryptography , 2003 .

[6]  Jerome Spanier,et al.  Dynamic creation of pseudorandom number generators , 2000 .

[7]  Richard P. Brent The myth of equidistribution for high-dimensional simulation , 2010, ArXiv.

[8]  C. F. Chong,et al.  Tuning the Collision Test for Power , 2004, ACSC.

[9]  L. Devroye Non-Uniform Random Variate Generation , 1986 .

[10]  Alan M. Ferrenberg,et al.  Monte Carlo simulations: Hidden errors from "good" random number generators. , 1992, Physical review letters.

[11]  Pierre L'Ecuyer,et al.  Fast random number generators based on linear recurrences modulo 2: overview and comparison , 2005, Proceedings of the Winter Simulation Conference, 2005..

[12]  Pierre L'Ecuyer,et al.  Beware of linear congruential generators with multipliers of the form a = ±2q ±2r , 1999, TOMS.

[13]  Paul Erdös,et al.  On random graphs, I , 1959 .

[14]  Pierre L'Ecuyer,et al.  Improved long-period generators based on linear recurrences modulo 2 , 2004, TOMS.

[15]  H. Niederreiter Pseudo-random numbers and optimal coefficients☆ , 1977 .

[16]  Harald Niederreiter,et al.  On the distribution of pseudo-random numbers generated by the linear congruential method. II , 1972 .

[17]  Takuji Nishimura,et al.  A Nonempirical Test on the Weight of Pseudorandom Number Generators , 2002 .

[18]  Sebastiano Vigna,et al.  An Experimental Exploration of Marsaglia's xorshift Generators, Scrambled , 2014, ACM Trans. Math. Softw..

[19]  Fred Piper,et al.  Stream Ciphers , 1982, EUROCRYPT.

[20]  Pierre L'Ecuyer,et al.  F2-Linear Random Number Generators , 2009 .

[21]  A. Compagner The hierarchy of correlations in random binary sequences , 1991 .

[22]  Sebastiano Vigna,et al.  Further scramblings of Marsaglia's xorshift generators , 2014, J. Comput. Appl. Math..

[23]  Takuji Nishimura,et al.  Mersenne twister: a 623-dimensionally equidistributed uniform pseudo-random number generator , 1998, TOMC.

[24]  Maurice G. Kendall,et al.  Randomness and Random Sampling Numbers , 1938 .

[25]  Glyn Carter,et al.  Aspects of local linear complexity , 1989 .

[26]  Mutsuo Saito,et al.  A PRNG Specialized in Double Precision Floating Point Numbers Using an Affine Transition , 2009 .

[27]  Harald Niederreiter,et al.  Random number generation and Quasi-Monte Carlo methods , 1992, CBMS-NSF regional conference series in applied mathematics.

[28]  Pierre L'Ecuyer,et al.  TestU01: A C library for empirical testing of random number generators , 2006, TOMS.

[29]  Donald E. Knuth,et al.  The art of computer programming. Vol.2: Seminumerical algorithms , 1981 .

[30]  Shin Harase,et al.  On the F2-linear relations of Mersenne Twister pseudorandom number generators , 2013, Math. Comput. Simul..

[31]  Mark A. Moraes,et al.  Parallel random numbers: As easy as 1, 2, 3 , 2011, 2011 International Conference for High Performance Computing, Networking, Storage and Analysis (SC).