On Friday 28 Mar 2008 18:10, Don Higgins wrote:
> A new problem #20 has been posted to write integer random number generator
> and test program to determine the longest sequence without duplication that
> it produces for a given seed number. The longest sequence of non-repeating
> pseudo-random numbers wins.
Non-repetition is not a very good test for a random number generator.
Eg start with a 64 bit seed and increment by one on each call.
Your test program will be running for a long time waiting for a repetition.
(To make the output look a bit more more "random": increment the seed
by a large number which is relatively prime to 2^64. It will still take 2^64
iterations to get a repetition.)
The USA National Institute of Standards and Technology has various
statistical tests for random number generators:
http://csrc.nist.gov/groups/ST/toolkit/rng/index.html
--
Martin
martin@... http://www.cse.dmu.ac.uk/~mward/ Erdos number: 4
G.K.Chesterton web site: http://www.cse.dmu.ac.uk/~mward/gkc/