[clue-talk] Re: [CoLoCo] Random Number Generators

Jed S. Baer cluemail at jbaer.cotse.net
Tue Feb 12 14:13:23 MST 2008


On Tue, 12 Feb 2008 13:23:23 -0700
David L. Willson wrote:

> On Sat, 2008-02-09 at 15:01 -0700, Leina Hutchinson wrote:
> > Dear Ubuntu Team,
> > 
> > My name is Leina and my dad is Jim Hutchinson. I am doing my 6th grade
> > science project on random number generators and was wondering if you
> > could answer some of my questions. I want to compare pseudo and true
> > RNGs. I have been reading a lot about them on random.org. I plan to
> > use 2 dice and roll them 1000 times but I know it takes a lot of
> > rolling to see the real probabilities. To do that, I want to use the
> > computer to simulate rolling dice, but I don't know how. Here are my
> > questions.
> >      1. How do I get my computer to create random numbers (I use
> >         ubuntu)? I want it to simulate a rolling of 1 die and 2 dice.
> >         The 1 die roll will be to see if each number comes up an equal
> >         number of times, and 2 dice roll will be to add and see a bell
> >         curve based on the probabilities of each sum.
> >      2. Will the computer graph the data for me or do I have to do it
> >         on a spread sheet?
> >      3. How many different ways are there to make a computer generate
> >         RNs? Can you show me how?
> >      4. Are some ways better than others? If so, what?
> >      5. Are there certain things that I should be aware of that might
> >         affect my results?
> >      6. Do you have any tips of suggestions?

A few observations.

Considering that there is no such thing as perfect manufacturing, any die
will be weighted. I assume that the more dice in use, the greater the
extent to which this is overcome. I've sometimes wondered whether
manufacturers do something with dice to overcome the different physical
weights of each face, due to the different amount of material removed in
the representations of each number.

Though I haven't looked into it lately, my understanding is that all
computer-generated random numbers will be biased, unless the computer
uses an external random source, in which case, it isn't really a computer
generated number. I'm not sure where /dev/urandom falls, in this regard
-- if its entropy source includes keystrokes and mouse movements, those
fall into the class of external sources. I don't know how truly random
those are.

I recall reading, some time ago, about external high entropy sources, one
of which was a foil strip loosely suspended in a weak magnetic field,
such that it could be disturbed by air currents, and maybe also pick up
random electromagnet noise. Could be I'm mis-remembering a bit. But it
got me wondering whether a low-cost USB entropy source is something
that'd be easy to make. So I hit google, but unfortunately, got the usual
google-pile of irrelevant pages having those terms, but not having
anything to do with the topic.

I did run across this article:
http://www.codinghorror.com/blog/archives/000728.html
which at least has some interesting discussion and links.

Another websearch of "wolfram random" (not quoted in the search box) gets
a bunch of results that look interesting.

Also, Bruce Schneier mentioned, in one of his books, that the output of a
good stream cipher should be a good source of random numbers.


More information about the clue-talk mailing list