skip to main content
article
Free Access

A New Pseudo-Random Number Generator

Authors Info & Claims
Published:01 January 1960Publication History
Skip Abstract Section

Abstract

Although the multiplicative congruential method for generating pseudo-random numbers is widely used and has passed a number of tests of randomness [1, 2], attempts have been made to find an additive congruential method since it could be expected to be faster. Tests on a Fibonacci sequence [1] have shown it to be unsatisfactory. The sequence xi+1 = (2a + 1) xi + c (mod 235) (1) has been tested on the IBM 704. In appendix I it is shown that the sequence generates the full period of 235 numbers for a ≧ 2 and c odd. Similar results obtain for decimal machines. Since multiplication by a power of the base can be accomplished by shifting, which is comparable in speed to addition, this scheme requires essentially three additions. It takes 14 machine cycles on the IBM 704, compared to 28 for the multiplicative method, so that the saving is 168 μs/random number. The scheme has the further advantage that it does not destroy the multiplier-quotient register.

Some tests have been made on the randomness of this sequence for a = 7 and c = 1, and a summary of the results is given in appendix II, where now the random numbers are considered to lie in the interval (0, 1).

The serial correlation coefficient between one member of this sequence and the next is shown by Coveyou [3] to be approximately 0.8 per cent. By taking a = 9 this correlation coefficient can be reduced to approximately 0.2 per cent without increasing the time. Taking a = 21 would make this correlation very small but would require one more machine cycle on the IBM 704. Another way to reduce the correlation is to choose c such that the numerator in Coveyou's expression for the correlation coefficient is zero. This cannot be done exactly since it requires that c = (.5 ± √3/6)2P where P is the number of binary digits (excluding sign) in a machine word. However, a machine representation close to either of these numbers should be satisfactory. Some correlations with c = (.788+)235 and a = 7 were obtained and did not differ significantly from those given for c = 1 in the first section of appendix II.

The author wishes to thank R. R. Coveyou for communicating his results in advance of publication and Elizabeth Wetherell for carrying out the calculations.

References

  1. 1 O TAUSSKY AND J. TODD, "Generation and Testing of Pseudo-Random Numbers" in Symposium on Monte Carlo Methods (H. A Mayer ed.), pp 15-28 (John Wiley and Sons, New York, 1956).Google ScholarGoogle Scholar
  2. 2 J MOSHMAN, The generation of pseudo-random numbers on a decimal calculator, J. Assoc. Comp. Mack. I (1954), 88-91. Google ScholarGoogle Scholar
  3. 3 R. R CovEYou, Serial correlation in the generation of pseudo-random numbers, J. Assoc. Comp. Mach. 6 (1959), 72-74. Google ScholarGoogle Scholar

Index Terms

  1. A New Pseudo-Random Number Generator

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image Journal of the ACM
      Journal of the ACM  Volume 7, Issue 1
      Jan. 1960
      79 pages
      ISSN:0004-5411
      EISSN:1557-735X
      DOI:10.1145/321008
      Issue’s Table of Contents

      Copyright © 1960 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 1 January 1960
      Published in jacm Volume 7, Issue 1

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!