hi mark,

begin Mark K. Kim <[EMAIL PROTECTED]> 
> On Wed, 15 May 2002 [EMAIL PROTECTED] wrote:
> 
> >   I think each sequence is completely independent of the others...
> > in that the order of numbers in one cycle of all sequences will be
> > different.
> 
> It generates the numbers in the same sequence with the algorithm I'm
> thinking about, but I'm sure there are better algorithms implemented in
> the C library.  It's simple enough to detect a cycle and reseed the random
> number generator, anyway.
 
doesn't that depend?   suppose all-in-all i want to pull 10,000,000
random numbers from rand().  is there a fast, memory efficient way to
detect a "cycle back"?

i'm just asking out of curiosity -- the man page for random() (which
jeff said is used to implement rand()) claims to have a period of
approximately 16*((2^31)-1).  that's about 34,359,738,352.  this is
large even by monte carlo standards.

i'm mainly just curious if there's a nice algorithm to detect cycling in
such a large amount of data.

pete
_______________________________________________
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech

Reply via email to