Efficient Jump Ahead for 2-Linear Random Number Generators

The fastest long-period random number generators currently available are based on linear recurrences modulo 2. So far, software that provides multiple disjoint streams and substreams has not been available for these generators because of the lack of efficient jump-ahead facilities. In principle, it suffices to multiply the state (a k-bit vector) by an appropriate k × k binary matrix to find the new state far ahead in the sequence. However, when k is large (e.g., for a generator such as the popular Mersenne twister, for which k = 19,937), this matrix-vector multiplication is slow, and a large amount of memory is required to store the k × k matrix. In this paper, we provide a faster algorithm to jump ahead by a large number of steps in a linear recurrence modulo 2. The method uses much less than the k2 bits of memory required by the matrix method. It is based on polynomial calculus modulo the characteristic polynomial of the recurrence, and uses a sliding window algorithm for the multiplication.

[1]  R. Caflisch Monte Carlo and quasi-Monte Carlo methods , 1998, Acta Numerica.

[2]  Pierre L'Ecuyer,et al.  On the xorshift random number generators , 2005, TOMC.

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

[4]  Pierre L'Ecuyer,et al.  An Object-Oriented Random-Number Package with Many Long Streams and Substreams , 2002, Oper. Res..

[5]  Shu Tezuka,et al.  Uniform Random Numbers , 1995 .

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

[7]  Pierre L'Ecuyer,et al.  Random numbers for simulation , 1990, CACM.

[8]  Pierre L'Ecuyer,et al.  Implementing a random number package with splitting facilities , 1991, TOMS.

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

[10]  Donald Ervin Knuth,et al.  The Art of Computer Programming , 1968 .

[11]  Peter Hellekalek Don't trust parallel Monte Carlo! , 1998, Workshop on Parallel and Distributed Simulation.

[12]  Audra E. Kosh,et al.  Linear Algebra and its Applications , 1992 .

[13]  Averill M. Law,et al.  Simulation Modeling and Analysis , 1982 .

[14]  Gene H. Golub,et al.  Matrix computations (3rd ed.) , 1996 .

[15]  S. Tezuka Uniform Random Numbers: Theory and Practice , 1995 .

[16]  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..

[17]  Takuji Nishimura,et al.  Tables of 64-bit Mersenne twisters , 2000, TOMC.

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

[19]  Donald E. Knuth The Art of Computer Programming 2 / Seminumerical Algorithms , 1971 .

[20]  Carla Savage,et al.  A Survey of Combinatorial Gray Codes , 1997, SIAM Rev..