[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bad random numbers

From: Mike Miller
Subject: Re: bad random numbers
Date: Tue, 13 Jul 1999 17:28:27 -0500 (CDT)

On Tue, 13 Jul 1999, Timothy H. Keitt wrote:

> If you set the seed from the time, then the first number *must be*
> some function of the value returned by time().  These things are
> deterministic, hence the name pseudo-random.

Yes, it has to be "some function" but it should not be a simple linear
function, for example.  There should be no discernable relation of time
with the first random number.  For example, it should not be possible to
use time to produces guesses at the random number without knowing all
digits of time (down to milliseconds).  (That is, the guesses should be
uncorrelated with the random numbers unless you know the time string.)

> A friend of mine who is writing a book on Monte Carlo methods uses the
> "generator warming" approach I suggested.  I've also seen people use
> the system rand() or drand48() function to generate a seed for the
> working generator, first seeding one of those using time().

That's all fine, but the first number produced is still some function of
time.  You can't get away from that.  Is there any evidence that you are
better off spending all of that computational time to produce your first
number?   If you get a chance to ask your friend about the benefit of this
'warming' approach, please let me know what he says.  I don't think it
would be useful for my purposes.

Thanks for your suggestions.


Michael B. Miller
University of Missouri--Columbia

Octave is freely available under the terms of the GNU GPL.  To ensure
that development continues, see
Instructions for unsubscribing:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]