# Mersenne Twister

A special matrix version of a Feedback Shift Register Generator, developed in 1997 by Matsumoto and Nishimura. The MT19937 version has a long period of ${2}^{19937}-1$ .

${x}_{k+n}={x}_{k+m}\mathit{\oplus}({x}_{k}^{u}|{x}_{k+1}^{l})A$

(1)

where $x$ stands for $w$ -bit integer numbers instead of single bits, exclusive-OR $\underset{}{\mathit{\oplus}}$ is executed bitwise on $w$ -bit long words and $\underset{}{1\le m\le n}$ . The matrix $A$ transforms (twists) $w$ -width words (treated as binary vectors of length $w$ ).

The twist transformation (multiplication by the matrix $A$ ) yields benefits such as reaching the maximum theoretical limit for the period of the pseudo-random number generator and better equidistribution properties in $n$ dimensions.

▲Back to this TOP