Re: random numbers in fortran



In article <2006112716232416807-gsande@worldnetattnet>, Gordon Sande
<g.sande@xxxxxxxxxxxxxxxx> writes:

The basic statistical property that you should worry about first is the
cycle length. To shuffle cards you want all 52! permutations to have a
chance of happening. With a short cycle length that does not happen.
A rather critical issue if you are going to pretend that the results
have any relevance to real card games.

It turns out that this "trivial example" is in fact quite demanding of
a pseudo random number generator.

Indeed. One must distinguish properties of random numbers taken
collectively from things regarding the correlation between successive
numbers. Some generators are OK collectively, but there is a minimum or
maximum separation between adjacent numbers. Some generate uniform
deviates TOO uniformly. And, as mentioned above, even if everything
else is OK cycle length might be a problem. Many (most?) generators
produce a given set of numbers (perhaps much less than the number
possible) and once a number repeats the cycle begins anew.

Why not use the best?

http://www.astro.multivax.de:8000/phillip/ranlux.for

Cycle length 10**171 or something, mathematically proven to have all 24
bits chaotic.

.



Relevant Pages

  • Re: random numbers in fortran
    ... With a short cycle length that does not happen. ... You are trying to shuffle cards, ... With a short cycle length the PSEUDO random number generator will not ...
    (comp.lang.fortran)
  • Re: random numbers in fortran
    ... To shuffle cards you want all 52! ... With a short cycle length that does not happen. ... be able to represent all those permutations. ... Even if it had a chance it ...
    (comp.lang.fortran)
  • Re: largely OT: a random-number generator and bzip2
    ... >>> generators, and I add their results to generate the ... because they each have the same cycle individually. ... > the compressors I was using, however, probably don't detect longer cycles ... the multiply operator. ...
    (comp.compression)
  • Re: largely OT: a random-number generator and bzip2
    ... >> generators, and I add their results to generate the ... because they each have the same cycle individually. ... as for the knuth rng, ... or is the point that the algo will only have a single cycle this ...
    (comp.compression)
  • Re: largely OT: a random-number generator and bzip2
    ... >>> generators you use, because they each have the same cycle individually. ... >> the compressors I was using, however, probably don't detect longer cycles ... yeah, maybe it is a thought, I can initiallize one generator using the ...
    (comp.compression)