Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article

Common defects in initialization of pseudorandom number generators

Published: 01 September 2007 Publication History

Abstract

We demonstrate that a majority of modern random number generators, such as the newest version of rand.c, ranlux, and combined multiple recursive generators, have some manifest correlations in their outputs if the initial state is filled up using another linear recurrence with similar modulus. Among 58 available generators in the GNU scientific library, 40 show such defects. This is not because of the recursion, but because of carelessly chosen initialization schemes in the implementations. A good initialization scheme eliminates this phenomenon.

References

[1]
Biham, E. and Shamir, A. 1991. Differential cryptanalysis of DES-like cryptosystems. J. Cryptol. 4, 1, 3--72.
[2]
GNU. 2004. GNU scientific library version 1.6. http://www.gnu.org/software/gsl/.
[3]
James, F. 1994. Ranlux: A fortran implementation of the high-quality pseudorandom number generator of Lüscher. Comput. Phys. Commun. 79, 1 (Feb.), 111--114.
[4]
Knuth, D. E. 1997. The Art of Computer Programming, vol. 2. Seminumerical Algorithms, 3rd ed. Addison-Wesley, Reading, MA.
[5]
L'Ecuyer, P. 1996. Combined multiple recursive random number generators. Oper. Res. 44, 5, 816--822.
[6]
L'Ecuyer, P. 1992. Testing random number generators. In Proceedings of the IEEE Winter Simulation Conference (Arlington VA). 305--313.
[7]
L'Ecuyer, P. 1993. A search for good multiple recursive random number genarators. ACM Trans. Model.Comput. Simul. 3, 2 (Apr.), 87--98.
[8]
L'Ecuyer, P., Simard, R., Chen, E. J., and Kelton, W. D. 2002. An object-oriented random number package with many long streams and substreams. Oper. Res. 50, 6, 1073--1075.
[9]
L'Ecuyer, P. and Andres, T. H. 1997. A random number generator based on the combination of four LCGs. Math. Comput. Simul. 44, 44, 99--107.
[10]
Lüscher, M. 1994. A portable high-quality random number generator for lattice field theory simulations. Comput. Phys. Commun. 79, 1 (Feb.), 100--110.
[11]
Mascagni, M. and Srinivasan, A. 2004. Parameterizing parallel multiplicative lagged-Fibonacci generators. Parallel Comput. 30, 7 (Jul.), 899--916.
[12]
Mascagni, M. and Srinivasan, A. 2000. Algorithm 806: SPRNG: A scalable library for pseudorandom number generation. ACM Trans. Math. Softw. 26, 3, 436--461. http://sprng.cs.fsu.edu/.
[13]
Matsui, M. 1994. Linear cryptanalysis method for DES cipher. In Proceedings of the International Workshop on Theory and Applications Advances in Cryptology (EuroCrypt) (Lofthus, Norway). Lecture Notes in Computer Science, 765. Springer. 386--397.
[14]
Matsumoto, M. and Nishimura, T. 1998. Mersenne twister: A 623-dimensionally equidistributed uniform pseudorandom number generator. ACM Trans. Model. Comput. Simul. 8, 1 (Jan.), 3--30.
[15]
Matsumoto, M. and Nishimura, T. 2003. Sum-Discrepancy test on pseudorandom number generators. Math. Comput. Simul. 62, 3--61, 431--442.
[16]
Matsumoto, M. and Nishimura, T. 2000. The dynamic creation of pseudorandom number generators. In Monte Carlo and Quasi-Monte Carlo Methods. Springer, 56--69.
[17]
Tezuka, S., L'Ecuyer, P., and Couture, R. 1994. On the add-with-carry and subtract-with-borrow random number generators. ACM Trans. Model. Comput. Simul. 3, 4, 315--331.

Cited By

View all
  • (2023)Identifying Quality Mersenne Twister Streams for Parallel Stochastic SimulationsProceedings of the Winter Simulation Conference10.5555/3643142.3643375(2801-2812)Online publication date: 10-Dec-2023
  • (2023)Identifying Quality Mersenne Twister Streams for Parallel Stochastic Simulations2023 Winter Simulation Conference (WSC)10.1109/WSC60868.2023.10408699(2801-2812)Online publication date: 10-Dec-2023
  • (2023)A comprehensive review of quantum random number generators: concepts, classification and the origin of randomnessQuantum Information Processing10.1007/s11128-023-04175-y22:12Online publication date: 13-Dec-2023
  • Show More Cited By

Index Terms

  1. Common defects in initialization of pseudorandom number generators

    Recommendations

    Reviews

    Soubhik Chakraborty

    It is a well-known fact that numbers generated by an arbitrarily selected seed for a pseudorandom number generator (PRNG) may not be statistically random. This paper demonstrates that many modern random number generators have some noticeable patterns, when initial seeds are chosen through a linear recurrence. Matsumoto et al. painstakingly experiment with 58 generators and discover as many as 40 to be defective. Further investigation reveals that the unwanted patterns are caused by the wrong choice of initialization rather than recursion. Accordingly, they advise PRNG designers to use a nonsystematic choice of seeds, or supply a better initialization scheme [1,2], and to test the randomness of the n -th output x ( n , s ) corresponding to a given seed s by varying both n and s . An interesting aspect missed by Matsumoto et al. is that PRNGs generally have a cycle, which, after completion, generates the same sequence, whereas the sequence of decimals of irrational numbers, such as pi, is nonrepeating and nonterminating. Pi, in fact, has been already proposed as a random number generator and the allegation that it is “less random than we thought” has been recently refuted by Marsaglia [3]. Of course, one has to generate these decimals easily and quickly on the computer. Examining some function of pi, rather than pi itself, is a worthwhile proposition. Online Computing Reviews Service

    Access critical reviews of Computing literature here

    Become a reviewer for Computing Reviews.

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Transactions on Modeling and Computer Simulation
    ACM Transactions on Modeling and Computer Simulation  Volume 17, Issue 4
    September 2007
    99 pages
    ISSN:1049-3301
    EISSN:1558-1195
    DOI:10.1145/1276927
    Issue’s Table of Contents

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 01 September 2007
    Published in TOMACS Volume 17, Issue 4

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. Difference collision
    2. Monte-Carlo simulation
    3. interstream correlation
    4. nearly affine dependence
    5. pseudorandom number generator

    Qualifiers

    • Article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)56
    • Downloads (Last 6 weeks)4
    Reflects downloads up to 25 Jan 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2023)Identifying Quality Mersenne Twister Streams for Parallel Stochastic SimulationsProceedings of the Winter Simulation Conference10.5555/3643142.3643375(2801-2812)Online publication date: 10-Dec-2023
    • (2023)Identifying Quality Mersenne Twister Streams for Parallel Stochastic Simulations2023 Winter Simulation Conference (WSC)10.1109/WSC60868.2023.10408699(2801-2812)Online publication date: 10-Dec-2023
    • (2023)A comprehensive review of quantum random number generators: concepts, classification and the origin of randomnessQuantum Information Processing10.1007/s11128-023-04175-y22:12Online publication date: 13-Dec-2023
    • (2022)Scrambling additive lagged-Fibonacci generatorsMonte Carlo Methods and Applications10.1515/mcma-2022-211528:3(199-210)Online publication date: 4-Aug-2022
    • (2022)Efficient modeling of particle transport through aerosols in GEANT4Computer Physics Communications10.1016/j.cpc.2022.108383278(108383)Online publication date: Sep-2022
    • (2021)Multiple streams with recurrence-based, counter-based, and splittable random number generatorsProceedings of the Winter Simulation Conference10.5555/3522802.3522883(1-16)Online publication date: 13-Dec-2021
    • (2021)Scrambled Linear Pseudorandom Number GeneratorsACM Transactions on Mathematical Software10.1145/346077247:4(1-32)Online publication date: 28-Sep-2021
    • (2021)Multiple Streams with Recurrence-Based, Counter-Based, and Splittable Random Number Generators2021 Winter Simulation Conference (WSC)10.1109/WSC52266.2021.9715397(1-16)Online publication date: 12-Dec-2021
    • (2020)Cells in Silico – introducing a high-performance framework for large-scale tissue modelingBMC Bioinformatics10.1186/s12859-020-03728-721:1Online publication date: 6-Oct-2020
    • (2020)Developments in the calculation of average solid angle subtended by detectors to sources at any position and orientation, by a Monte Carlo methodNuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment10.1016/j.nima.2020.164532981(164532)Online publication date: Nov-2020
    • Show More Cited By

    View Options

    Login options

    Full Access

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media