It is high time we let go of the Mersenne Twister

📅 2019-10-14
🏛️ arXiv.org
📈 Citations: 11
Influential: 0
📄 PDF
🤖 AI Summary
The Mersenne Twister (MT) pseudorandom number generator, though widely adopted, suffers from severe statistical flaws—including low-bit correlation, poor dimensional equidistribution, high memory overhead, and decades of pervasive misuse. Method: This work presents the first systematic, non-specialist-oriented survey of MT’s long-overlooked deficiencies over the past two decades, introducing a comprehensive analytical framework grounded in linear complexity analysis, multidimensional uniformity testing, low-bit correlation assessment, and empirical evaluation via TestU01. It further constructs novel, intuitive counterexamples to illustrate these flaws. Contribution/Results: The study rigorously establishes that MT is unsuitable for general-purpose randomness applications, advocating its deprecation in mainstream programming languages. It also delivers actionable guidance for RNG selection—offering theoretically sound yet practically viable criteria and concrete alternative generators—to support developers and language implementers in making robust, evidence-based decisions.
📝 Abstract
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.
Problem

Research questions and friction points this paper is trying to address.

Identifies severe defects in Mersenne Twister PRNG
Challenges its suitability as general-purpose random generator
Provides evidence-based guidance for users and implementers
Innovation

Methods, ideas, or system contributions that make the work stand out.

Surveying Mersenne Twister defects comprehensively
Providing new simple understandable defect examples
Guiding users on Mersenne Twister alternatives
🔎 Similar Papers
No similar papers found.