[CoLoCo] Random Number Generators

David L. Willson DLWillson at TheGeek.NU
Tue Feb 12 20:23:23 GMT 2008


Leina,

Things you want to be aware of, following your numbers:

1)

You can generate random numbers on a Linux computer from the command
line, from an interpreted script, or from a compiled program.  The speed
and complexity of the options increase in the order I mentioned them.

The frequency of each possible result, where the result is defined as
the sum of the dots on all the rolled dice, will be flat for one die,
and a linear increase to and decrease from the peak for two dice.  You
won't see a "bell curve" unless you use three or more dice.

2)

Some of the scripting languages have access to graphics libraries which
can render a chart from the data.  You can also make a chart in just
about any spreadsheet program.

3)

There are more random-number generators available than can be mentioned
in a short time.  I am willing to help you write scripts or compiled
programs to generate random numbers, as long as you are willing to use
free software to write and run them.  I suppose that others will be
willing to help with this, too.

4)

I don't know how to compare or measure the "random-ness" of the
available random-number generators.  I hope someone else will step in
with advice on this.

5)

Most physical systems (dice, cards, coins) can be corrupted to some
extent.  It might be interesting, although perhaps irrelevant, to show
the results from "loaded" or "weighted" dice, along with your other
result sets.

--David

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?
> Thank you for you time. Please reply to my email address.
> ~Leina




More information about the Ubuntu-us-co mailing list