0

Are there any 32-bit pseudorandom number generators (PRNG) that either have a greater or smaller period than (2^32 - 1)?

I would also appreciate a reliable source (book, research paper et.c) that uses it, thanks!

SamTebbs33
  • 5,507
  • 3
  • 22
  • 44
  • 1
    _"The commonly-used version of Mersenne Twister, MT19937, which produces a sequence of 32-bit integers, has the following desirable properties: It has a very long period of 2^19937 − 1."_ – Michael May 17 '14 at 14:39
  • What do you mean by 32-bit? If you simply want to use 32-bit arithmetic then you can implement any PRNG you can define. In fact, many things typically considered "32-bit" are actually implementing an algorithm that is of much greater logical word length in the same way as you would break down any other algorithm. – sh1 May 18 '14 at 19:30

2 Answers2

2

There are many PRNGs with different periods. Period is bounded by the size of the state space the PRNG maintains, not by the number of bits per integer. Java, for instance, uses a linear congruential generator with 48 bits of state. The late great George Marsaglia created "The mother of all random number generators", which pooled the results of smaller generators with relatively prime cycle lengths to get a cycle length of about 2250. As @Michael pointed out in a comment, Mersenne Twister has a whopping big period of 219937-1. Pierre L'ecuyer is considered to be a world leader on this topic, and you can read what many consider to be a pretty definitive chapter on the topic of PRNGs from the Elsevier publication "Handbooks in Operations Research and Management Science: Simulation". (Many of his other publications may also be of interest to you, both directly and as evidence of his expertise in this area.)

pjs
  • 18,696
  • 4
  • 27
  • 56
0

Linear congruential generators typically have a period of (2^n) exactly. This is, obviously, greater than (2^n-1), and uses only n bits of state (n=32 in your case) -- but it's the absolute upper limit on a PRNG with a 32-bit state.

Multiply-with-carry generators can be arranged to have a period of any safe prime, and configurations can be chosen either to use 32-bit arithmetic or to use a 32-bit state buffer, whichever you require. For a 32-bit state configuration all possible periods will be less than (2^32-1).

sh1
  • 4,324
  • 17
  • 30