lundi 25 novembre 2019

Do most pseudorandom number generators produce a cyclic sequence of unique numbers?

Saw the formula for a pseudorandom number generator in BASIC ages ago and it used each pseudorandom number as the seed for the next one. So if it hit the same number after a while, it would cycle the same sequence all over again and therefore the numbers in the sequence were all different.

  1. Would the sequence include the complete set of numbers from 0 to 2^16-1 for the 16 bit version of this generator, all appearing once?

  2. Is this what happens in most pseudorandom number generators in most languages even today?




Aucun commentaire:

Enregistrer un commentaire