AArticle
Entropy of Mersenne-Twisters
Fabien Le Floc’h * Correspondence: [email protected]
Abstract:
The Mersenne-Twister is one of the most popular generators of uniform pseudo-random numbers.It is used in many numerical libraries and software. In this paper, we look at the Komolgorov entropy of theoriginal Mersenne-Twister, as well as of more modern variations such as the 64-bit Mersenne-Twisters, theWell generators, and the Melg generators.
1. Introduction
The Mersenne-Twister [Matsumoto and Nishimura 1998] is one of the most popular generators of uniformpseudo-random numbers. It is used in many numerical libraries and software.Several variant have been developed over the years, to accommodate some limitations of the originalalgorithm.It has been enhanced to work directly with 64-bit numbers in [Nishimura 2000]. The same paper alsodescribe a variant which increases the number of non-zero terms in the characteristic polynomial. Althoughrarely adopted in software, the latter has the tremendous advantage to escape much faster from zeroland.Indeed, the original Mersenne-Twister may require more than 700000 numbers to escape from a state with allbits set to zero, except for one. Although a good initialization scheme helps to minimize the issue, the issue maystill unexpectedly appear. We give an example of innocuous initialization array, with many ones and zeros.Panneton et al. [2006] propose a more general algorithm, based on the same underlying principles, butusing more internal block matrices, while keeping a similar performance profile. This allows for maximalequidistribution properties, a feature not possible in the original design. It also permit the use of non Mersenneprime periods.More recently, the algorithm has been slightly modified to obtain a maximally equidistributed variant over64-bit numbers, by using a lung, but otherwise staying close to the (second) 64-bit Mersenne-Twister variant[Harase and Kimoto 2018].While introducing his Mixmax random number generator, Savvidy [2015] discusses two properties ofthe original MT: a low entropy and eigenvalues falling on the unit circle, both of which are detrimental torandomness.In this paper, we start by verifying the claims of Savvidy. We in fact find a larger entropy than stated in[Savvidy 2015]. We then compute the eigenvalues and the associated entropy of the different variants of theMersenne-Twister and discuss their associated properties.
2. Measuring entropy
In [Savvidy 2015], the Kolmogorov entropy is defined as h = − (cid:88) k : | λ |< ln | λ k | , (1)where ( λ k ) are the eigenvalues of the state transition matrix.For a k-mixing system,the auto-correlation decay time τ is related to the entropy as τ ≤ h . It is thusdesirable that most of the eigenvalues of the matrix should lie as far as possible away from it. Without involving a r X i v : . [ c s . D S ] J a n of 14 the theory around Komolgorov entropy, it is intuitive that randomness will increase as the eigenvalues of thelinear system spread out.An (cid:70) -linear generator may be defined though its state transition matrix by the relation [Panneton et al.2006] x i = Bx i − mod 2, y i = Cx i mod 2. where x i = ( x i , k − ,..., x i ,0 ) T ∈ (cid:70) k and y i = ( y i , w − ,..., y i ,0 ) T ∈ (cid:70) w are respectively the k -bit state and the w -bitoutput vector at step i , B and C are a w × k transition matrix and a w × k output transformation matrix withelements in (cid:70) , k and w are positive integers.In the Mersenne-twister, the output transformation takes the first word ( x i , k − ,.., x i , k − − w ) of the state, andeventually tempers it to improve equidistribution properties.For the original Mersenne-twister MT19937 [Matsumoto and Nishimura 1998], the matrix B of size ( nw − r × nw − r ) is expressed in terms of word vectors x wj (instead of bits) as follows x i = ( x wi , n − , x wi , n − ,..., x wi ,0 ) = ( x wi − n − , x wi − n − ,..., x wi − ) B T (2)where x wi , j , represents the w − r most significant x wi , j . The matrix B reads, B T = I w I w I w ... I w − r S , with n = m = w = r = , and S = (cid:195) I r I w − r (cid:33) A . The matrix A is defined as A = ... a w − a w − ... ... a , with a = ( a w − , a w − ,..., a ) = .Thus, in the MT19937 generator, we have x wi , j = x wi − j + for j = n − (3)This property is however not true in general for the other variants.The transition matrix defines the iteration, and is thus the relevant one for the study of entropy. For (cid:70) -lineargenerators, the eigenvalues of the transition matrix correspond to the roots of its characteristic polynomial in (cid:90) . In particular, those are different from the eigenvalues of the characteristic polynomial commonly used forskipping ahead, or verifying primitivity, which is stated in (cid:70) . For the original Mersenne-Twister, we give thepolynomial in (cid:90) in Appendix B. of 14 In practice however, we will not use the characteristic polynomial but work directly from the state transitionmatrix. For an (cid:70) -linear generator, the matrix can be recovered by seeding the standard basis successively, andfetching the state of the generator after one iteration as described in Algorithm 1. Algorithm 1
Print the state transition matrix for Mersenne-Twister generators i ← n ∗ w − while i ≥ do i ndi cator is an array of n integers, each of w -bit size, initialized to zero k ← i / w i ndi cator [ k ] ← << ( i mod w ) {set the i -th bit to one} initialize the random number generator with the state i ndi cator compute the next random number for k ← to n − do i ndi cator [ k ] ← st ate [ k + n ] {copy the new state to the array i ndi cator with the correctindexing} end for for k ← n − to , j ← w − to do if i ndi cator [ k ]&(1 << j ) (cid:54)= then print else print end if end for print new line end while For the Melg generators of Harase and Kimoto [2018], the lung is always the last element of the state anddoes not move around. For the Well generators, the convention of the state matrix described in [Panneton et al.2006] is to use the most significant bits of each word first. The algorithm is reversed, from I = to N ∗ w − (lines 1 and 2), K and J are reversed in similar fashion. This leads to Algorithm 2 in Appendix C.Working directly with the state transition matrix avoids the numerical issues of the characteristicpolynomial approach, which arise because of the large degrees involved.
3. Results
The eigenvalues of the original version of Mersenne-Twister, with a period of − , all fall close to unitcircle (Figure 1). The modulus of the smallest eigenvalue is 0.99806, and the modulus of the largest eigenvalueis 1.00246. While Savvidy [2015] finds an entropy of 4.8, we measure an entropy of 10.49. We double checkedour results by solving the roots of the characteristic polynomial with a robust polynomial roots solver [Aurentzet al. 2018] and quadruple precision arithmetic.If we look at the eigenvalues of other (cid:70) -linear generators, we notice that for a very large period of − ,and thus a characteristic polynomial degree of 19937, the eigenvalues always tend to be very close to the circle(see Figure A1 in Appendix E), even though the entropy increases substantially for some and may be close to theentropy of the generators with a smaller period. For example, the ID3 version of the 64-bit Mersenne-Twister(named MT19937x64ID3 thereafter) has twice the entropy of the ID1 version of the 64-bit Mersenne-Twister.With a large characteristic polynomial degree, the eigenvalues are likely to be very close to the unit circle: for avalue strongly greater than one, the polynomial value explodes because of the dominant term of degree 19937.In reality, only 32 bits (or 64 bits for the 64-bit generators) are produced by one application of the statetransition matrix B . In order to be comparable to the Mixmax generator of Savvidy [2015], one would need of 14 .
998 0 .
999 1 .
000 1 .
001 1 . | λ | c o un t − . − . . . . − . − . . . . Figure 1.
Eigenvalues of the transition matrix for the 32-bit Mersenne-Twister: histogram (left) and complexplane representation (right). to consider n applications of the matrix, where n = for the 32-bit Mersenne-Twister as the state of theMersenne-Twister is composed of 624 words. And then, we would see much larger eigenvalues, since theeigenvalues of B n are simply the n -th power of the eigenvalues of B (Figure 2). For the 32-bit and 64-bitMersenne-Twisters, the n -th power is not merely the matrix to skip to the n -th point in the sequence, becausethe n − previous numbers x wn − ,..., x w are also in the output vector, as consequence of Equation 3. This ishowever not true any more for the Melg and Well generators, we believe however that the eigenvalues for the n -th power are still representative of the entropy of the n -dimensional output. | λ | c o un t − . − . . . . − − Figure 2.
Eigenvalues of the transition matrix to the power 624 for the 32-bit Mersenne-Twister: histogram (left)and complex plane representation (right).
For the same reason, (cid:70) -linear generators working on 64-bit words have twice the entropy of the onesworking on 32-bit words. If we want to compare the two kinds of generator, a more relevant measure is theentropy per bit of random number generated (of size one word).From Table 1, we notice that the entropy per bit is the highest for the Well generators. In particular, Well607bhas the largest entropy per bit. There seems to be a direct relationship with the blocks in the first block columnof the transition matrix and the entropy. The MT19937 has two non-zero blocks of dimension w × w . The64-bit version MT19937x64ID1 has the same configuration, but where w is twice the length, and this producesapproximately twice the entropy. The version MT19937x64ID3 has four non-zero blocks (so another factortwo), and leads to four times this entropy. Similarly, the Melg generators have four non-zero blocks, and the of 14 Table 1.
Entropy of the different random number generators. The performance is normalized towards the 32-bitMersenne-Twister MT19937. MT19937 took 3.8ms to output one million double floating point numbers on anAMD Ryzen 1700 processor running OpenJDK 15 under Linux.Generator word size w Entropy Entropy per bit N PerformanceMT19937 32 10.49 0.32 135 1.00MT19937-64ID1 64 20.75 0.32 285 0.87MT19937-64ID3 64 40.05 0.63 5795 0.49Well19937a 32 23.58 0.74 8585 0.68Well1024a 32 25.79 0.81 407 1.06
Well607b
32 26.66
313 0.83Melg607 64 42.83 0.67 313 0.85Melg19937 64 41.63 0.65 9603 0.85
Well generators have four to five non-zero blocks. We notice a linear relationship between the entropy and thenumber of non-zero blocks in the first block-column (also taking there size into account).On Figure 3, we look at the state matrix, raised to the power 312, for the 64-bit Mersenne-TwistersMT19937x64ID1 and MT19937x64ID3. It corresponds to a full update of the state vector. As expected, the larger . . . . − − −
500 0 500 1000 − − − Figure 3.
Eigenvalues of the transition matrix to raised to the power 312 for the 64-bit Mersenne-Twisters: ID1(left) and ID3 (right). entropy translates to a pronounced increase of the spread between eigenvalues. The axis scale is multiplied bya factor larger than two hundred between the ID1 and the ID3 versions.Regarding performance, the Well1024a is the fastest at generating one million random numbers in Java,closely followed by the 32-bit MT19937. The MT19937-64ID3 is the slowest, and the Melg generators are betterperforming alternative 64-bit generators, with good entropy properties.
4. Reaching and escaping zeroland
Following the methodology of Panneton et al. [2006], we consider the initial states filled with zero bits,except for one bit, and measure the number iterations it takes to reach a state with a balanced number of zeroand one bits. There are k such states, and we we let y ( j ) i be the output vector y i at iteration i for a given initialstate x = e j where e j is the j -th unit vector, for j = k . Let H ( x ) be the Hamming weight of a bit vector x ,i.e., the number of bits set to 1, the moving average γ n , p is defined by γ n , p = pkw n + p − (cid:88) i = n k (cid:88) j = H (cid:179) y ( j ) i (cid:180) . (4) of 14 Under the null hypothesis, γ n , p should be approximately normally distributed with mean and variance pkw ) .On Figure 4(a), we plot γ n ,100 as a function of n . In order to compare 32-bit with 64-bit generators, wenormalized the number of iterations n according to the size of one word: one iteration of a 64-bit generatorcounts for two iterations of a 32-bit generator. Similarly p is halved for 64-bit generators. Well19937a requiresaround 730 iterations to reach a balanced state, while Melg19937 requires × iterations, even though itscharacteristic polynomial has a larger number of ones ( N in Table 1). Even without normalization, the Melggenerator requires more iterations than the Well generator. The measure of entropy per bit is however consistentwith this result: it it higher for Well19937a than for Melg19937. . . . . . . n a v e r ag e Well19937aMelg19937 (a) γ n ,100 , starting from unit vectors ( k = ) . . . . . . n a v e r ag e Well19937aMelg19937 (b) γ n ,624 , starting from a bad seed ( k = ) Figure 4.
Hamming weight after n iterations. Of course, in practice, the random number generators will not be used with such a state. A good seedinitialization procedure, such as the one used in the Melg generators, provides a simple remedy. The referenceimplementations of Well generators do not include such an initialization procedure, and this sometimes leadsto artificially bad results in papers, which study the behaviour of random number generators with close seedssuch as [Bhattacharjee et al. 2018]. A real world implementation will however implement a good initializationprocedure.With a good initialization, even if the probability is then very low, it is never fully guaranteed that,accidentally, some seed will lead to a unfavorable state. We give an example of an random looking seed,which could well be the produce of a good initialization procedure as an illustration in Appendix D. In orderto find this special seed, we simply jump-ahead close to the end of the period, starting with a seed composedof one non-zero bit. Figure 4(b) shows an example of special seed, where γ n ,624 nearly reaches zero after 3500iterations. There is less difference between the Well and the Melg generators on this particular example, but thiscould be because we only look at a specific seed, instead of an average over many seeds.The equidistribution properties of the generators guarantee that those awkward states, with a very largepercentage of zeros, are present in a period. In order to find a good initial seed, a good alternative may be tostart with a seed composed of one non-zero bit, and jump-ahead sufficiently far away, but not too far. Then wemay obtain a good starting point as many of the bad states are in the relatively recent past.The issue is nearly invisible for generators with a smaller state such as Well607b: they escape zerolandafter less than 50 iterations: too quickly to matter statistically.
5. Conclusion
The entropy reveals some properties of the (cid:70) linear generators. In a similar fashion as the number ofnon-zero bits in the characteristic polynomial, a low entropy is related to a low mixing of bits. Entropy however of 14 reveals more about the underlying generator as it seems linearly linked to the number of non-zero blocks in thefirst block row of the transition matrix.The Well generators have the largest entropy per bit among the studied generators. Funding:
This research received no external funding.
Conflicts of Interest:
The authors declare no conflict of interest.
Acknowledgments:
Fruitful conversations with K. Savvidy.
Aurentz, Jared L, Thomas Mach, Leonardo Robol, Raf Vandebril, and David S Watkins. 2018. Fast and backward stablecomputation of roots of polynomials, part ii: backward error analysis; companion matrix and companion pencil.
SIAMJournal on Matrix Analysis and Applications 39 (3), 1245–1269.Bhattacharjee, Kamalika, Krishnendu Maity, and Sukanta Das. 2018. A search for good pseudo-random number generators:Survey and empirical studies. arXiv preprint arXiv:1811.04035 .Harase, Shin and Takamitsu Kimoto. 2018. Implementing 64-bit maximally equidistributed f2-linear generators withmersenne prime period.
ACM Transactions on Mathematical Software (TOMS) 44 (3), 1–11.Matsumoto, Makoto and Yoshiharu Kurita. 1992. Twisted gfsr generators.
ACM Transactions on Modeling and ComputerSimulation (TOMACS) 2 (3), 179–194.Matsumoto, Makoto and Takuji Nishimura. 1998. Mersenne twister: a 623-dimensionally equidistributed uniformpseudo-random number generator.
ACM Transactions on Modeling and Computer Simulation (TOMACS) 8 (1), 3–30.Nishimura, Takuji. 2000. Tables of 64-bit mersenne twisters.
ACM Transactions on Modeling and Computer Simulation(TOMACS) 10 (4), 348–357.Panneton, François, Pierre L’ecuyer, and Makoto Matsumoto. 2006. Improved long-period generators based on linearrecurrences modulo 2.
ACM Transactions on Mathematical Software (TOMS) 32 (1), 1–16.Savvidy, Konstantin G. 2015. The mixmax random number generator.
Computer Physics Communications 196 , 161–165.
Appendix A Twisted GFSR characteristic polynomial
We consider the ( nw × nw ) -matrix B defined as B = I w I w I w ... I w S , where, I w is the identity matrix of size w , in the first block column, the first row of I w is at the row position (( n − − m ) w + in B .In [Matsumoto and Kurita 1992, Appendix A.1], it is proven that, for the case r = , the characteristicpolynomial φ B ( t ) = det( t I nw − B ) of B is φ B ( t ) = φ S ( t n + t m ), where φ S is the characteristic polynomial of the ( w , w ) -matrix S .This is true in (cid:70) but not in the general case. The correct formula is φ B ( t ) = φ S ( t n − t m ), (A1) of 14 Proof.
We have φ B ( t ) = det( t I nw − r − B ) = det t I w − I w t I w − I w − I w t I w ... t I w − r − I w − r − S t I w . The determinant stays unchanged by linear combinations of columns. We add second block column times t tofirst column to obtain φ B ( t ) = det − I w t I w t I w − I w ... t I w − I w ... ... t I w − I w − S t I w . Then then we continue with t k times ( k + -th block column, until line ( n − − m ) w + , we obtain φ B ( t ) = det − I w t I w − I w ... t I w t n − m I w − I w ... ... t I w − r − I w − S t I w . We now subtract t k ( t n − m − times the ( n − m ) + k -th block column, until line ( n − w + : φ B ( t ) = det − I w t I w − I w ... t I w ... ... t I w − r − I w − r t m ( t n − m − I w − S t I w . Now we reduce the j -th block column, by adding t k times the k + j block, for j = n − and k = n − j .This leads to φ B ( t ) = det − I w − I w ... ... ... − I w − r t m ( t n − m − I w − S t n − I w t I w t I w . of 14 We use ( n − permutations to move the first block column to the last position, we end up with a block-triangularmatrix, the determinant is the product of the diagonal determinants. φ B ( t ) = det( t m ( t n − m − I w − S ) = φ S ( t n − t m ). Appendix B Mersenne-Twister characteristic polynomial
In the Mersenne-twister random number generator MT19937 [Matsumoto and Nishimura 1998], the matrix B corresponds to the state transition matrix, and, compared to the GFSR of Appendix A, is slightly modified toaccommodate for a size ( nw − r × nw − r ) . It is defined as follows: B = I w I w I w ... I w − r S , with n = m = w = r = , and the matrix S reads S = (cid:195) I r I w − r (cid:33) A . The matrix A is defined as A = ... a w − a w − ... ... a , with a = ( a w − , a w − ,..., a ) = . In particular, φ A ( t ) = t w − (cid:80) w − i = a i t w − i − .For w − r = , the S matrix reads S = ... a w − a w − ... ... a , With similar column transformations as for the twisted GFSR generator (see Appendix A), the characteristicpolynomial for the Mersenne-Twister reads φ B ( t ) = ( t n − t m ) w − r ( t n − − t m − ) r − ( t n − t m ) w − r r − (cid:88) i = a i ( t n − − t m − ) r − − i − w − (cid:88) i = r − a i ( t n − t m ) w − i − . (A2) For the MT19937, we have in particular, φ B ( t ) = ( t n − t m )( t n − − t m − ) − ( t n − t m )( t n − − t m − ) − ( t n − t m )( t n − − t m − ) − ( t n − t m )( t n − − t m − ) − ( t n − t m )( t n − − t m − ) − ( t n − t m )( t n − − t m − ) − ( t n − t m )( t n − − t m − ) − ( t n − t m )( t n − − t m − ) − ( t n − t m )( t n − − t m − ) − ( t n − t m )( t n − − t m − ) − ( t n − t m )( t n − − t m − ) − ( t n − t m )( t n − − t m − ) − ( t n − t m )( t n − − t m − ) − ( t n − t m )( t n − − t m − ) − ( t n − t m )( t n − − t m − ) − Appendix C Algorithm for state transition matrix
Algorithm 2
Print the state transition matrix for Well generators I ← while I ≥ N ∗ w − do i ndi cator is an array of N w -bit integers K ← I / w i ndi cator [ K ] ← << ( w − − i mod w ) initialize the random number generator with the state i ndi cator compute the next random number for K ← to N − do i ndi cator [ K ] ← st ate [ K + N − N ] {copy the new state to the array i ndi cator with the correctindexing} end for for K ← to N − , J ← to W − do if i ndi cator [ K ]&(1 << w − − j ) (cid:54)= then print else print end if end for print new line end while Appendix D Bad seeds
Appendix D.1 Melg19937 seed = { 0xedf329eaf017de19L, 0xbcd59767baffa8a4L, 0x607fab7caa6557a3L, 0x51836b8de6aee5dfL,0x83fd89742e80cf41L, 0x46b9f946143ddf01L, 0x1fc0637bd4a0995cL, 0xb9a96f9a6b97c574L, 0xd8e318b4125e1d6aL,0x2d26bd8d547affa6L, 0x88b5ea4a671d1e4dL, 0xfbde1f5255bccb1bL, 0xb0cb8135b58ffe1cL, 0x2de84bfe5a28d517L,0xce6799e73f58b261L, 0x981e2e620ced06dL, 0x424c7c385f53778eL, 0xf8db29aeb1e26a63L, 0x41c7970a76dffd52L,0x5d5d6ca8f7fed43aL, 0x8f5fec07ad6ecb4L, 0x1aa208d349b79b15L, 0x2635a1a56753541L, 0x4f6cc6109f3906c7L,0xe3b24037fdc0b929L, 0x991a4d1dc5398cfeL, 0x8b7a408f3057502dL, 0xf7edfc08faaecf2cL, 0x574ad9b5649e9460L,0x41149d7f1bb48e10L, 0x2450c510c8bb7acL, 0x38d6f51518ead4d7L, 0x35ec0e2e37289f83L, 0xb87f27714bed7f99L,0xf9d779eeee811ebeL, 0x891f83398ae69609L, 0xa1df41f525874e23L, 0xe422baaacb9267b8L, 0x3bb16e9e6929efc8L,0x989881f1860eb1f6L, 0xa5424b009e0232b0L, 0x5c3159cbfb5e4d00L, 0xc07765e46ade9639L, 0xc4eaa62837cf66aL,0xe68f977f2d38606cL, 0x9f8959695ce1dd91L, 0xcdbf7a8df7e7a40eL, 0xe3fe689ea7281711L, 0x8552651ee3c64347L,0x9c9436026c40528bL, 0x7c8c7436667af2c7L, 0xe9cad89cad1ea3e7L, 0xe4ce8283b8beff0aL, 0xed67584cf3e4ad01L,0xfa4f0d64b9c63e2cL, 0xc7604dc55703895cL, 0x89a4f7b465b8ff9bL, 0x2c2fb1688f931701L, 0x1507d5bacea15bd3L,0xb36181d2f39d4deaL, 0xa89ac6f429a257d3L, 0x83db5f5a132e96d0L, 0xa960a59ea65bfe1aL, 0xbb30bdbfa19c04c1L,0x3dd1e4dc3a2abc43L, 0xd160f0b1181a2385L, 0xdd253a8dfeb038e4L, 0x9cdde1a8c527833fL, 0x2f98b9ad4faeb385L,0x9463f8d2e2d3d15cL, 0x5a7e4e3a2dc2a6c3L, 0x1715e353342515d0L, 0xa1f77ede47509d6L, 0x17d69170c64ca2d2L,0xacca77bc2d549986L, 0x8a766ea0c0048193L, 0xbbb9c4e6c8dc7267L, 0x78702d8b2f37426L, 0xff11ee26c5507f57L,0x4b77e5f6c96b721fL, 0x27cc52791f0134c8L, 0xf6872aa510599eceL, 0xeb6877399d511f01L, 0x426c9f06cd7f2b9eL,0x4fa94ed19d3e01d6L, 0x3ffbf5595e325abbL, 0xfe543ec56c3adc8fL, 0x2093aa28ee54ba95L, 0x7aa8aec232638441L,0xbf6f8b045a6dfeb6L, 0x6a72f557df8503f6L, 0xee532835849974a7L, 0x184ebf7665c04da7L, 0x2b7f4a52e3898b51L,0x8a1c33c7ae5ca8d8L, 0xc5275ec4b0c63cc9L, 0x89fe93f9fd966d8eL, 0x882b1f1f947fac5fL, 0xcd2ff4e2b874a4b2L,0x3a2c69a2fc48f227L, 0x7af8c15ca55b30feL, 0x9273af29d074ab14L, 0xb849c5acc9974ecdL, 0xfcadb1e672c9a0ceL,0x385638a720701bb2L, 0xcb28bc3f93c742e5L, 0x8ab1123693c0febfL, 0x127dd4b1f7e55107L, 0xa1271598bfe203a5L,0x75956ef8835b2a69L, 0x16bb6759b804d25fL, 0x3d94a4baa0ade1abL, 0xeafb4cba0653fc6eL, 0x363d53c1a316c3ffL,0x875060309cadc94aL, 0xc4c2554135f5870aL, 0x517d5aa43bdae7e7L, 0x3a97f8114c2dfbb1L, 0x1ea296d67bd8d2eaL,
Appendix D.2 Bad seed for the Well19937a seed = { 0xc0541cc4, 0xab37d083, 0xb6fc37a, 0x1fbfd4f7, 0x7be7aa03, 0x2adda123, 0x798486a, 0x1dd1f7b7,0x297686df, 0xaed7e9e6, 0x394b50ff, 0xfc9767f8, 0xaf9a256b, 0x1ff43ac7, 0x5f720189, 0x232e9a24,0x699084cc, 0x4a8adc2, 0x93ceccf8, 0xe9b20d1, 0x4aa24890, 0x5dbf6264, 0xeb667014, 0x951df26f,0x9ff13450, 0xbcd06f9a, 0xe09e7cf5, 0x93fd5907, 0x1de2c6d0, 0x9068c876, 0xcec468d7, 0x68b48065,0x4a641145, 0xacc2bd32, 0x569200e8, 0xc04a709f, 0xc783924, 0xefdaa8b5, 0xcc84bce9, 0xa04e425e,0x910d5f58, 0x7fd365c4, 0xe5f93f70, 0x5f308f65, 0x1038bfeb, 0x416b61a3, 0x204867d7, 0xa85c5113,0x219457a8, 0x1ea7e3bc, 0x6d30742, 0x9ab602b3, 0x3e9abb1, 0x175a06d6, 0x5f09402, 0x93bb1830, 0x89f62013,0x987d013f, 0x337d257d, 0xee00c67b, 0x19b781f3, 0x977ef379, 0x6f901d2a, 0xda0ea75, 0x5336774d,0xa5418c03, 0xc8a3dbc, 0xb6b8275b, 0x8fb4059c, 0x56ca0d3d, 0xfbb7d386, 0x24ee9e0e, 0xa82552d1,0xc3fd647e, 0x1e405ade, 0x9bca4d1a, 0x3efa0811, 0xaedb503, 0xeb63fa60, 0xf258844a, 0xec3bc4d8,0xd123b06d, 0xf0fcb3e9, 0x126af477, 0x36c95046, 0x99a69493, 0x778f44c7, 0x4bd40dc1, 0xc339283d,0x7c920d82, 0x64c7fac4, 0x1d48acc4, 0x4803a8f9, 0x1f685f74, 0x4cb50562, 0x112eeac1, 0x55ff63b7,0x2e68517f, 0xe55dfb89, 0x8fe9cd84, 0xd56d399c, 0x1e81cb40, 0x50b3a0b3, 0xfffac543, 0xe3c9336d,0x3916deee, 0x151e0272, 0xb0d054ef, 0xf56167f4, 0x8d73ea06, 0x1e4bcb65, 0x9e10ae76, 0x2d543b84,0x89830bcf, 0x91a87f9f, 0x784ecd4e, 0x6b3f9834, 0x2a846ddf, 0x90d4acc2, 0x792cab7c, 0xc0e77ab3,0xfc4afb0d, 0xa64ea858, 0xc07fd5aa, 0x17395d36, 0xf0d3e73f, 0xd37fbc3a, 0x8980984a, 0x3e5a1bd3,0xeec10711, 0xb709cc08, 0x5384a33a, 0x819df9ce, 0xa033f244, 0xe3c700bb, 0x1f13679c, 0xcffac343,0x3eb1fe1b, 0x6ed78a30, 0x52027d21, 0x4c419896, 0x6f60f235, 0x3c6abac, 0x3246e346, 0x53b836f2,0xda03a8dc, 0x220a23b8, 0x74db4f52, 0xcf7e56f3, 0xb47f0949, 0x648affcf, 0x8ea280c1, 0x64d0071b,0x325c9a5f, 0x241366f2, 0x7e680e88, 0xe3a5ca68, 0x79453176, 0x56d744f5, 0x1e69aa63, 0xd66b1dca,0x299e580d, 0xc7a65801, 0xef948205, 0x67940480, 0x7cd16ec1, 0x4b203c8f, 0x8622eb56, 0x1a3eba21,0xb025c06a, 0x94b0c865, 0x364543dd, 0x84dda74e, 0xe55fc1b0, 0xf24015b3, 0x72567a7b, 0x80200378,0x661e0f4f, 0x8035ac86, 0x5ec704b9, 0x8b7e236d, 0xae20cca5, 0x7c6d784, 0xc79223b8, 0x273d8b80,0x356d44ba, 0xd469ac4e, 0xa300253c, 0xfbd0d15a, 0x182ba4dd, 0x583a3f38, 0x7cebcf17, 0xed18a530,0xb606c692, 0xdd2dece3, 0x9f9eabb, 0x6bd01a9c, 0xf1cf01ed, 0x347fca04, 0x7310f74f, 0x51603d78,0x474e8a04, 0xf2ec3806, 0x41b4723f, 0x9b4dbda2, 0xbbae52, 0x3976cc86, 0xe51820c, 0x10f518fc, 0xa563ed0d,0x54a23375, 0xc55ffe7c, 0x18100b8, 0x5ab4388b, 0x586761a4, 0xa2abcfea, 0x3e4e1d2c, 0x605ab89f,0xb10e6f94, 0x1f217537, 0x7054ed8f, 0x9f89b8b, 0x9cc7047d, 0x39962ba0, 0x1c8b79c4, 0x343b995f,0x4241b7de, 0xccf0b0a3, 0x7bef01e3, 0xe24af80e, 0xd39ad3eb, 0xab0181cf, 0x82913f77, 0x714646b8,0x2c4882db, 0xaa26c544, 0xfbee353a, 0x3c0f6b97, 0x645e51a0, 0xe97c5a23, 0x281d8a80, 0x47fe49f7,0x19084b74, 0x54253681, 0xabaf321a, 0x4fd6ce98, 0xfddd595a, 0xac19fe3c, 0x7dd5e43f, 0xaf8ff1c4,0xee2c77d9, 0xcdc63470, 0xe63b1318, 0x6eef9aed, 0x3c6c275a, 0x3a160556, 0xe7bdd27c, 0xe5629ccc,0x5ec06be4, 0xb715abac, 0xf1ec2528, 0xc6c1de0, 0x9893c7db, 0xf76c6779, 0x97bc68ff, 0x7d4636cd,0x2ff1ad03, 0x9ed0a1db, 0x5ddcde91, 0x817148f2, 0xf074fea3, 0xbe0aadaf, 0xc9f054ab, 0xd8683936,0xff0f6f94, 0xf6af9245, 0x7883f226, 0x2d7ff153, 0xd32583ca, 0x6cb1c030, 0x1223a0be, 0x2ef4b433,0x9aeb7b61, 0xfff23b29, 0xde7fcdad, 0x2b651f6, 0x6d3b7281, 0x184b0aec, 0xfc065efa, 0x939b8a8c,0x1a49430d, 0x4924c717, 0xbda1940a, 0x539d6e96, 0xdc6f7803, 0xc716d8f8, 0x24c6dfef, 0x64449248,0xf734c5ac, 0x7a42820b, 0xc63b9141, 0x63a64882, 0x838c6211, 0x5b8d488d, 0x3524a121, 0xb63eb35c,0xe8117c0a, 0x68ee3556, 0x7eb37b94, 0x5ddac590, 0x1a00b9a7, 0x3ef0e2a0, 0x22f09b06, 0xb90ff34e,0xff0d7aa5, 0x3dc0a7a0, 0x9fb70a22, 0xf23894d, 0x2dec32d6, 0x17ceb753, 0x75d711f3, 0x6482cf8e,0x39336eb5, 0x6ef95556, 0xc87c30c6, 0xf9b99870, 0x45e352cb, 0xe23598f9, 0xea74a0ac, 0xced93d48,0x76bc9106, 0x61e65a65, 0x2c793020, 0xf0ff6f22, 0x1d7e5a84, 0x840b85fe, 0x7d22f3f4, 0x3dbacba0,0xdaf6eb9, 0x521ce21c, 0x40ecaab4, 0xbb33041b, 0xedc07d5, 0x7ee249fa, 0x34454402, 0x711c89ee,0xe75ad56b, 0xbd609f1a, 0xcd371052, 0xbc23f095, 0xdde9c552, 0x8301cca9, 0x576754a7, 0x2097e4a7,0xe75c716f, 0x74578e4c, 0x8b8064b4, 0xa2437e2b, 0x3a9def3, 0x942057c4, 0x5931363f, 0xa73bbe28,0x186fe95d, 0x6bb85632, 0x6df0b3c, 0x76692f9, 0x9ea27b47, 0x347c0f6d, 0x82283e6b, 0x6d894175,0xb418f0ae, 0xfbda128a, 0xdc906372, 0x94300dd0, 0xc6b7f71d, 0x148e9e4a, 0x22700dbf, 0x5b5fd968,0xb1f930af, 0xdadc78c4, 0xe64609ea, 0xf692ff99, 0xdd0dcaa6, 0xa78ad6a8, 0x6efb8200, 0xfa9f0c91,
Appendix E Eigenvalues of some Mersenne-twister variants . . . . | λ | c o un t − . − . . . . − . − . . . . (a) MT19937x64ID1 .
99 1 .
00 1 .
01 1 . | λ | c o un t − . − . . . . − . − . . . . (b) MT19937x64ID3 .
00 1 .
05 1 .
10 1 .
15 1 .
20 1 . | λ | c o un t − . − . − . . . . . − . − . . . . (c) Well19937a . . . . . . × . × . × . × . × . × | λ | c o un t − . − . . . . − . − . . . . (d) Melg19937 Figure A1.
Eigenvalues of the transition matrix of generators with a period of − : histogram (left) andcomplex plane representation (right). .
00 1 .
25 1 .
50 1 .