The simple but inelegant solution is to throw away the samples that are too large.

E.g. if convert dice throws from base-6 (0…5) to base-5 (0…4), you will encouter that there are about 16% more “0” samples than the others because 5 mod 5 = 0. However, if you merely throw away the bad samples, you’ll get a flat distribution. Assuming your dice isn’t weighted of course.

Back in the 1960s I was assigned to an R&D outfit. One of our officers was going after a PhD. His dissertation was on simulating neutron paths through nuclear reactor shielding. He was doing the simulations on a VAX, generating huge numbers of “random numbers.” He finally realized he wasn’t doing many different “events,” because the computer was producing only pseudorandom numbers, so he was getting the same sequence of events over and over. He wrote to his adviser about the problem and went on leave. He came back to find his desk covered with notes to call various people. It turned out that just about everyone in the nuclear business was doing the same thing he was, without realizing that because their simulations required so many numbers, their pseudorandom sequences were repeating over and over. I don’t know what he eventually did, but I recognized the problem. I’ve been aware of it ever since.

]]>You can always use regular dice, then convert the base 6 numbers into base 10 (or any other base you need) using a spreadsheet or a calculator. Don’t forget to subtract 1 first since dice go from 1 through 6 rather than 0 through 5. The math function you want is called “modulus” which is nothing but the remainder after a division.

There are base conversion utilities on the internet but I would NOT use any such thing for an important password or other secure use since your access to them may be monitored. But they are OK to use just to see how base conversion works.

]]>Understand?

]]>Check the Communications page.

Brigandage.net

]]>Want truly random numbers? Roll some dice. Real. Physical. Dice.

Gotta make sure that your dice are not worn, are properly balanced, are being thrown far enough, and have enough bounces. Look to Vegas for your examples.

]]>