# Using dice to pick 10 numbers randomly

**URL:** <https://boards.straightdope.com/t/using-dice-to-pick-10-numbers-randomly/690392>\
**Category:** Factual Questions\
**Created:** [June 9, 2014, 8:22am UTC](https://boards.straightdope.com/t/using-dice-to-pick-10-numbers-randomly/690392 "2014-06-09T08:22:48Z")\
**Posts on this page:** 7\
**Page:** 4

<div class="post-metadata">

**Author:** ![Some\_Call\_Me.Tim](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@Some\_Call\_Me.Tim](https://boards.straightdope.com/u/Some_Call_Me.Tim)\
**Post date:** [June 10, 2014, 9:02pm UTC](https://boards.straightdope.com/t/using-dice-to-pick-10-numbers-randomly/690392/61 "2014-06-10T21:02:33Z")

</div>

> [@Giles](#):
>
> This is, in fact, almost. the most efficient way, in the sense that no method is more efficient.
> 
> As part of the proof of that, note that there are 36 possible results from tossing two dice. To give 1 through 10 equal chances, you need to assign 3 results to each number in the range, giving 30 results in total, so that 6 results are (in a sense) wasted, if you can only use the first two throws.
> 
> To make it slightly more efficient, if the second throw is 6, I’d reuse the first throw to supply more information:  
> (1) if the first throw is 1 through 5 and the second throw is 6, throw a dice a third time. If the third throw is 1, 2 or 3, use the value of the first throw. If the third throw is 4, 5 or 6, add 5 to the value of the first throw.  
> (2) if the first and second throws are both 6, start again from the beginning.

That’s exactly as efficient to the original scheme- you’re just moving around which die is the one that doesn’t have to be 6 to resolve the number. (Also, note that the singular of dice is die.)

#throws odds of no resolution (sequence of die rolls that results in no resolution)  
Original Your method  
2 1/6 (X6) 1/6 (X6)  
3 1/36 (X66) 1/36 (66X)  
4 1/216 (X666) 1/216 (66X6)  
5 1/1296 (X6666) 1/1296 (6666X)  
etc.

---

<div class="post-metadata">

**Author:** ![Some\_Call\_Me.Tim](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@Some\_Call\_Me.Tim](https://boards.straightdope.com/u/Some_Call_Me.Tim)\
**Post date:** [June 10, 2014, 9:07pm UTC](https://boards.straightdope.com/t/using-dice-to-pick-10-numbers-randomly/690392/62 "2014-06-10T21:07:52Z")

</div>

> [@Giles](#):
>
> This is, in fact, almost. the most efficient way, in the sense that no method is more efficient.
> 
> As part of the proof of that, note that there are 36 possible results from tossing two dice. To give 1 through 10 equal chances, you need to assign 3 results to each number in the range, giving 30 results in total, so that 6 results are (in a sense) wasted, if you can only use the first two throws.
> 
> To make it slightly more efficient, if the second throw is 6, I’d reuse the first throw to supply more information:  
> (1) if the first throw is 1 through 5 and the second throw is 6, throw a dice a third time. If the third throw is 1, 2 or 3, use the value of the first throw. If the third throw is 4, 5 or 6, add 5 to the value of the first throw.  
> (2) if the first and second throws are both 6, start again from the beginning.

That’s exactly as efficient as the original scheme- you’re just moving around which die is the one that doesn’t have to be 6 to resolve the number. (Also, note that the singular of dice is die.)

odds of no resolution (sequence of die rolls that results in no resolution)  
#throws –\> Original ---- Your method  
2 ------\> 1/6 (X6) ---------- 1/6 (X6)  
3 ------\> 1/36 (X66) ------- 1/36 (66X)  
4 ------\> 1/216 (X666) ----- 1/216 (66X6)  
5 ------\> 1/1296 (X6666) – 1/1296 (6666X)  
etc.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [June 10, 2014, 11:46pm UTC](https://boards.straightdope.com/t/using-dice-to-pick-10-numbers-randomly/690392/63 "2014-06-10T23:46:24Z")

</div>

Roll the d6 over and over again, interpreting its faces as 0 through 5, to get the base 6 description of a value in [0, 1]. Convert this to base 10 to get a stream of decimal digits 0 through 9. (There’s an ambiguity in this conversion for those numbers which can be expressed as either ending in a tail of 0s or a tail of 9s, but this has probability zero of happening).

This method seems to require us to roll the die infinitely often, then giving us infinitely many results, but in fact, so long as we don’t trip on the aforementioned ambiguity, each result of the output is already determined after only finitely many input-throws.

In fact, this achieves the optimal amortized performance guarantee: we will find that we generate decimal digits at an asymptotic rate of log(10)/log(6) die-rolls per digit. If you only want to generate one decimal digit, this may not be worth the bother, but if you want to generate many, this is the way to go.

---

<div class="post-metadata">

**Author:** ![Some\_Call\_Me.Tim](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@Some\_Call\_Me.Tim](https://boards.straightdope.com/u/Some_Call_Me.Tim)\
**Post date:** [June 11, 2014, 12:03am UTC](https://boards.straightdope.com/t/using-dice-to-pick-10-numbers-randomly/690392/64 "2014-06-11T00:03:39Z")

</div>

> [@Thudlow\_Boink](#):
>
> The version of the D&D Basic Set I had, which looked like [this](https://www.acaeum.com/ddindexes/setpages/setscans/basic9rule.html), came with a set of 6 dice, including a d10; but earlier versions only included 5 dice (or none at all). [This link](https://www.acaeum.com/ddindexes/setpages/basic.html) lists the contents of the various editions of the Basic Set; and [here’s a chart](http://en.wikipedia.org/wiki/Editions_of_Dungeons_%26_Dragons) showing the publishing history of the various versions of D&D vis a vis AD&D.

If I recall correctly, the blue booklet late 70s Dungeons and Dragons set came with little laminated, numbered chits which were intended to be blindly drawn from a cup. It’s possible we got them from some other source, but I do remember using them very early on.

---

<div class="post-metadata">

**Author:** ![Darth\_Panda](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@Darth\_Panda](https://boards.straightdope.com/u/Darth_Panda)\
**Post date:** [June 11, 2014, 11:44am UTC](https://boards.straightdope.com/t/using-dice-to-pick-10-numbers-randomly/690392/65 "2014-06-11T11:44:28Z")

</div>

> [@Some\_Call\_Me.Tim](#):
>
> If I recall correctly, the blue booklet late 70s Dungeons and Dragons set came with little laminated, numbered chits which were intended to be blindly drawn from a cup. It’s possible we got them from some other source, but I do remember using them very early on.

There were several printings with Blue covers in 1979 that didn’t come with dice.

[https://www.acaeum.com/ddindexes/setpages/basic.html](https://www.acaeum.com/ddindexes/setpages/basic.html)

> [@](#):
>
> For a period in 1979, TSR experienced a dice shortage. Basic sets published during this time frame came with two sheets of numbered cutout cardstock chits that functioned in lieu of dice, along with a coupon for ordering dice from TSR.

> **[Dungeons & Dragons Basic Set](https://en.wikipedia.org/wiki/Dungeons_%26_Dragons_Basic_Set)**
>
> The Dungeons & Dragons Basic Set is a set of rulebooks for the Dungeons & Dragons (D&D) fantasy role-playing game. First published in 1977, it saw a handful of revisions and reprintings. The first edition was written by J. Eric Holmes based on Gary Gygax and Dave Arneson's original work. Later editions were edited by Tom Moldvay, Frank Mentzer, Troy Denning, and Doug Stewart.
> The Basic Set details the essential concepts of the D&D game. It gives rules for character creation and advancement for p...

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [June 11, 2014, 2:02pm UTC](https://boards.straightdope.com/t/using-dice-to-pick-10-numbers-randomly/690392/66 "2014-06-11T14:02:21Z")

</div>

> [@The\_Hamster\_King](#):
>
> The rightmost DIGIT. You ignored the fractional parts.
> 
> It didn’t have to be stocks. It could be any publicly published number that varied randomly, like racing results. It’s the same technique as used by [the numbers game](http://en.wikipedia.org/wiki/Numbers_game).

Nitpick: Everybody knows that, by Benford’s Law, a leading ‘1’ is about 6.5 times as likely as leading ‘9.’ But the same effect applies to _second_ digits. A ‘0’ in the 2nd position of a log-normal number is about 40% more likely than a ‘9’ there. Even in the third digit (e.g. the rightmost digit in the price of a ~$400 stock), ‘0’ is 3% more likely than ‘9’.

The numbers racket initially used the final three digits of the U.S. Treasury balance – a number with 11 digits or so. They later switched to digits from published racetrack handles, but

> [@](#):
>
> Dutch Schultz is said to have rigged this system, thanks to an idea from Otto Berman, by betting heavily on certain races to change the Win, Place and Show numbers that determine the winning lottery number. This allegedly added ten percent to the Mob take.

---

<div class="post-metadata">

**Author:** ![The\_Hamster\_King](https://avatars.discourse-cdn.com/v4/letter/t/8edcca/32.png) [@The\_Hamster\_King](https://boards.straightdope.com/u/The_Hamster_King)\
**Post date:** [June 11, 2014, 2:14pm UTC](https://boards.straightdope.com/t/using-dice-to-pick-10-numbers-randomly/690392/67 "2014-06-11T14:14:00Z")

</div>

[This PDF](http://www.annarchive.com/files/Drmg007.pdf) of the 7th issue of The Dragon magazine (published 1977) contains an article titled “What to Do if the Dog Eats Your Dice” that offers up a collection of alternate methods for generating random numbers. It also includes a table for simulating a d20 with 2d6 that is accurate to within 1% for most values.

[Previous page](https://boards.straightdope.com/t/using-dice-to-pick-10-numbers-randomly/690392.md?page=3)
