Is it possible to create a completely random integer between 1 and 13 using standard dice in a D&D dice kit?

Solution 1:

This is impossible if you require that there is a fixed upper bound on the number of possible rolls: in this case, the only probabilities you can get are of the form $\frac{n}{m}$ where $m$ is a product of the numbers $2, 4, 6, 8, 10, 12, 20$, and in particular cannot be divisible by $13$.

This is straightforward if you don't require such a fixed upper bound: as mentioned in the comments, you can discard and reroll. This strategy, like any successful strategy, necessarily has the property that it is possible that you'll have to reroll arbitrarily many times. But the probability is exponentially decaying so it's not really an issue.

Edit: An interesting follow-up question might be to find a strategy that minimizes the expected number of rolls. Suppose you have a strategy involving $n$ rolls per iteration, with probability $p$ of succeeding each iteration (and probability $1 - p$ of needing to reroll). Then the expected number of rolls turns out to be $E = \frac{n}{p}$. So, comparing the strategies that have been suggested so far:

  • Travis's $4$ and $10$ strategy has $n = 2, p = \frac{39}{40}$, so $E = \frac{80}{39} \approx 2.05$.
  • Amitai's $20$ strategy has $n = 1, p = \frac{13}{20}$, so $E = \frac{20}{13} \approx 1.54$.
  • M. Wind's "all the dice" strategy has $n = 7, p = \frac{921596}{921600}$, so $E = \frac{6451200}{921596} \approx 7.00$.

Amitai's strategy is in fact the only possible strategy with an expected number of rolls of less than $2$ (so I take back what I said about it requiring more rolls than Travis's!), although one might go on to calculate and compare the variance of the number of rolls as well...

Solution 2:

You could use all seven dice in one throw. This gives you $2 \cdot 4 \cdot 6 \cdot 8 \cdot 10 \cdot 12 \cdot 20 = 921600$ possible outcomes. Next you need a procedure to assign to each outcome a unique number. This allows you to distribute outcomes into $13$ groups of equal size. It is not difficult to do so.

Note that the multiple of $13$ that is closest (from below) to $921600$ is $921596 = 70892 \cdot 13$ This means that only in $4$ cases out of $921600$ you would have to reject the result and throw the dice again. The probability that this happens is $1$ in $230400$.

Solution 3:

1) You could roll d20 and reroll anything over 13. So sometimes you reroll once or twice. (~96% of the time it takes no more than two rerolls to get a result)

2) you could roll two (distinguishable) d12s ('regular' & 'special' say) together

  • if both dice show "12", reroll both
  • if only the special die is 12, the result is "13"
  • if the special die is not 12, use the result on the regular die

(This works especially well if at least one of the d12's has a very distinguishable 12 face; if only one does, use it as the special die)


In response to the request for clarification why the second method is correct:

Note that $12\times 12=144 = 11\times 13+1$. So if we can assign the 144 outcomes from rolling two 12-sided dice to the 13 results we want - each getting 11 of the 144 outcomes with one left over - then we'll have a discrete uniform distribution on $1,\ldots,13$.

So, step 1 is to take out the 144th option; (12,12).

We also just want to read a die to get a number most of the time. So we want to make one of the dice take its face value 11x12 times (i.e. when the other die doesn't show 12). The remaining 11 times (when it does show 12 but the other one doesn't) then takes the last value. Like so:

          special die
       1    2    3    4    5    6    7    8    9   10    11 :  12 
reg.______________________________________________________________
 1 |   1    1    1    1    1    1    1    1    1    1     1 :  13 
 2 |   2    2    2    2    2    2    2    2    2    2     2 :  13 
 3 |   3    3    3    3    3    3    3    3    3    3     3 :  13 
 4 |   4    4    4    4    4    4    4    4    4    4     4 :  13 
 5 |   5    5    5    5    5    5    5    5    5    5     5 :  13 
 6 |   6    6    6    6    6    6    6    6    6    6     6 :  13 
 7 |   7    7    7    7    7    7    7    7    7    7     7 :  13 
 8 |   8    8    8    8    8    8    8    8    8    8     8 :  13 
 9 |   9    9    9    9    9    9    9    9    9    9     9 :  13 
10 |  10   10   10   10   10   10   10   10   10   10    10 :  13 
11 |  11   11   11   11   11   11   11   11   11   11    11 :  13 
12 |  12   12   12   12   12   12   12   12   12   12    12 : Reroll

As you can readily verify, each of the numbers 1:13 appears 11 times in the table.


d11

You can also do d11 in similar fashion. Of course, you could just roll the regular die and reroll it on 12, but this way rerolls become quite rare.

Again roll a regular and a special d12, and then read the regular die unless it's 12, in which case read the special die (if they're both 12, reroll them both).

Again, the table makes this clear:

          special die
       1    2    3    4    5    6    7    8    9   10   11   12 
reg._____________________________________________________________
 1 |   1    1    1    1    1    1    1    1    1    1    1    1 
 2 |   2    2    2    2    2    2    2    2    2    2    2    2 
 3 |   3    3    3    3    3    3    3    3    3    3    3    3 
 4 |   4    4    4    4    4    4    4    4    4    4    4    4 
 5 |   5    5    5    5    5    5    5    5    5    5    5    5 
 6 |   6    6    6    6    6    6    6    6    6    6    6    6 
 7 |   7    7    7    7    7    7    7    7    7    7    7    7 
 8 |   8    8    8    8    8    8    8    8    8    8    8    8 
 9 |   9    9    9    9    9    9    9    9    9    9    9    9 
10 |  10   10   10   10   10   10   10   10   10   10   10   10 
11 |  11   11   11   11   11   11   11   11   11   11   11   11 
.. |  .. . .. . .. . .. . .. . .. . .. . .. . .. . .. . .. . .. 
12 |   1    2    3    4    5    6    7    8    9   10   11 : Reroll

The same ideas can be applied to any of the other dice in your dice-set (like the d20), so for example d7, d9, d19, d21 can all be emulated this way (well, d3 and d5 could also, but you can do them using d6 and d10 easily enough)