Bit-Wise Behavior of Random Number Generators
- 1 September 1988
- journal article
- Published by Society for Industrial & Applied Mathematics (SIAM) in SIAM Journal on Scientific and Statistical Computing
- Vol. 9 (5) , 941-949
- https://doi.org/10.1137/0909065
Abstract
In 1985, G. Marsaglia proposed the m-tuple test, a runs test on bits, as a test of nonrandomness of a sequence of pseudorandom integers. We try this test on the outputs from a large set of pseudorandom number generators and discuss the behavior of the generators. The lower-order bits of a linear congruential generator taken modulo $2^p $ always have small period, and hence fail the test. However, we also show by example that sequences of bits with long period can display substantial nonrandom behavior. Linear congruential generators with prime modulus can fail the test in their low-order bits. Shift-register (Tausworthe) generators can fail in their central bits. The combination generators proposed by Marsaglia also fail the test. Fibonacci generators perform well on the test, if properly initialized. These generators require a vector of seeds which can be conveniently set using the output of a simple (that is, congruential or shift-register) generator. Shift-register generators are good initializers for almost every combination of lags and operators reported here. Fibonacci generators initialized by linear congruential generators pass if the initializer passes and fail if it fails.
Keywords
This publication has 2 references indexed in Scilit:
- The Structure of Linear Congruential SequencesPublished by Elsevier ,1972
- The serial test for sampling numbers and other tests for randomnessMathematical Proceedings of the Cambridge Philosophical Society, 1953