Re: random numbers in fortran
- From: Gordon Sande <g.sande@xxxxxxxxxxxxxxxx>
- Date: Tue, 28 Nov 2006 15:27:59 GMT
On 2006-11-28 10:07:31 -0400, "Mark Morss" <mfmorss@xxxxxxx> said:
You said:
"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."
Would you please elucidate? I am not sure of the practical
implications of this remark.
You are trying to shuffle cards, or so you said.
There are 52! possible shuffles. Get a high precision calculator and
do the many precision arithmetic. Or just use an approximation. It is
more than you can count on your fingers! Or even your fingers and toes.
With a short cycle length the PSEUDO random number generator will not
be able to represent all those permutations. Even if it had a chance it
still might not actually have the permutation somewhere on its cycle.
The first is elementary combinatorics and the second is a more subtle
issue on the quality of the pseudo random number generator.
If there are permutations missing then anything you do based on
the "random" permutations will be at best "hap-hazard". That is
fine for games for young children with short memories but is a bit
short on quality for most other applications.
You dropped the piece where it said
It turns out that this "trivial example" is in fact quite demanding of
a pseudo random number generator.
which comes as a big surprise to many who do not try to do the simple
combinatorics. You have lots of company on that.
If all you are doing is a game for young children then fine. Otherwise
you should read some real literature on the topic which your question
indicates that you have not yet done.
.
- Follow-Ups:
- Re: random numbers in fortran
- From: Mark Morss
- Re: random numbers in fortran
- From: Craig Powers
- Re: random numbers in fortran
- References:
- random numbers in fortran
- From: lane straatman
- Re: random numbers in fortran
- From: Thomas Koenig
- random numbers in fortran
- Prev by Date: Re: Cray binary format
- Next by Date: Re: Cray binary format
- Previous by thread: Re: random numbers in fortran
- Next by thread: Re: random numbers in fortran
- Index(es):
Relevant Pages
|