-1

Mersenne Twister generator has a period of (2^19937)-1, but it is period of internal states.

Any idea what is the effective period of MT 32 bit output - period over which 32 bit output does not repeat. It has to be smaller than (2^31)-1 but I couldn't find definite answer.

Thanks

mesibo
  • 3,970
  • 6
  • 25
  • 43
  • 1
    Perhaps this is better suited for [crypto.se] – Artjom B. Jul 22 '17 at 07:49
  • Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. Perhaps [Cryptography Stack Exchange](http://crypto.stackexchange.com/) or [Information Security Stack Exchange](http://security.stackexchange.com/) would be a better place to ask. – jww Jul 23 '17 at 21:40
  • it is a algorithm question and it's pretty much fit for the stackoverflow - see point 2 in the first link you shared. Btw, are you answering just to collect points? – mesibo Jul 26 '17 at 04:51

1 Answers1

3

I think you misunderstand what a period is.

It means that after generating a period of numbers, you'll get the exact same sequence again, the random generator repeats itself.

It is not a measure that a particular number generated again. It can (and it will) happen, that the same number will generated twice in a row. It doesn't mean that the period is 1.

So even for 32-bit output, MT's period is 2^19937-1.

For example, this 1-bit output RNG has a period of 8:

00101110 00101110 00101110 00101110 ...

geza
  • 28,403
  • 6
  • 61
  • 135