Math 2.0

Numerical analysis Monte Carlo and quasi-Monte Carlo methods Object

Mersenne Twister

Description

The Mersenne Twister is a pseudorandom number generator designed by Makoto Matsumoto and Takuji Nishimura. Its standard version, MT19937, works with 3232-bit words. Its state is an array of 624624 words, that is 19โ€‰96819\,968 bits, of which 19โ€‰93719\,937 bits are effective. The transition function is linear over the field with two elements ๐”ฝ2\F_2. It combines three words of the array by shifts, masks and exclusive or, in a twisted generalised feedback shift register recurrence. The output function applies a fixed invertible linear map, the tempering, to the newest word. It fits the definition of a generator: the state space is finite, and the transition and output are fixed maps. The seed determines the initial array. Its period is 219937โˆ’12^{19937} - 1, which is a Mersenne prime; this is where the name comes from. Its outputs are 623623-dimensionally equidistributed to 3232-bit accuracy. That is, over a full period every 623623-tuple of consecutive 3232-bit outputs occurs equally often, except that the all-zero tuple occurs once less.

Remarks

Because the generator is linear over ๐”ฝ2\F_2, 624624 consecutive outputs determine the whole state, so all later outputs can be predicted. It is therefore not suitable for cryptography. Linearity also makes it fail some statistical tests based on linear complexity, although these rarely matter in simulation. The large state means it can take many steps to recover from a seed with mostly zero bits.

Further reading

  1. Web https://en.wikipedia.org/wiki/Mersenne_Twister
About this page
TagYVEA283NZW
URIm2://YVEA283NZW
Kindobject
WritingW0 stub
MSC65C10, 11K45
Instance ofPseudorandom number generator
Same as

Markdown ยท JSON ยท Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.