Top
RandomNumber
Computer Scientists have this thing for random numbers. I think that we need them for all of the encryption that is necessary with computers.
Anyhow, there are lots of good ways to generate random numbers, and lots of bad ways. Actually, it's more of a
spectrum? of methods.
Really Bad Methods
- Start with 1. Then pick 2, then 3, etc....
In fact, any linear function? is a bad, bad, idea?.
Better Methods
- Base your number off of the low order bits? of a computer system?'s clock, i.e. the hundredths of a second. This method is generally ok if you only need a couple of random numbers or if you have lots of time or human interaction? inbetween the number selections. The problem with this approach is that the clock is really a linear function?, so if you run a loop to get 100 random numbers, there might be some kind of pattern to them.
- use the rand() function -- IIRC, this uses the time stamp? method. The bits from the clock are called the seed value?.
Better Methods
- Use Lava Lite Lamps? and a web cam?. Landon Curt Noll?, a really smart guy who discovered a couple of Mersenne Primes? and went on to work for SGI, developed a technique to use Lava Lamps? to generate lots of random values?
- noisy diode? -- I've heard that it works well (anyone want to elaborate?)
- Get a bunch of people to sit around and roll dice. No, really! -- The USA had (still has?) rooms of people who sat around doing this for military / political encryption techniques?. (also see one time pads?)
compare
pseudo random number?
RobinsonTryon - 09 Mar 2003