A common pseudo-random number generator makes use of two large
prime numbers. It updates a seed value, and returns a value within
the range of 0 (inclusive) and 1 (exclusive). Let
and
be the large prime number, and
be the seed. The seed is updated
as follow:
. The output value
is
.
For such a pseudo-number generator, both the range and domain are
. It is an injection and also surjective function.
This means such a pseudo-number generator is a bijection.
Copyright © 2006-10-28 by Tak Auyeung