On 3 Jan 2014, at 22:57, Albert Y. C. Lai wrote:
I don't think the entropy of the number considered as a string of bits is relevant.
The later part of my post strongly suggests that there is a pattern.
And in fact this pattern turns out to repeat indefinitely. The following calculates
about 10^7+1 values starting with a large integer that I obtained from /dev/urandom:
map (\l -> (head l, length l)) . group . map (fst . randomR (1, 6) . mkStdGen) $ [0x383b0d54718ac75f..0x383b0d54718ac75f+1000000]
The result is:
[(2,36076),(1,53669),(6,53668),(5,53668),(4,53669),(3,53668),(2,53668),(1,53669),(6,53668),(5,53668),(4,53668),(3,53669),(2,53668),(1,53668),(6,53669),(5,53668),(4,53668),(3,53669),(2,51563)]
So we keep on getting long runs of seed values that produce the same value on the first call of randomR even
when we start with a seed that will have around 60 bits of entropy (if /dev/urandom on my heavily used iMac
is doing its job).
Regards,
Rob.