Choosing between $n$ things using dice?

328 Views Asked by At

For which $n$ is there a finite algorithm to choose between $n$ things with the same probability using a die?

For example, we can choose between 2 things, 3 things, 4 things, 6 things, and 8 things, but it seems we cannot choose between 7 things with a finite algorithm.

2

There are 2 best solutions below

2
On BEST ANSWER

With a six sided die you can choose between any number of options of the form $2^p3^q$ with a finite process, but no others. The number of possible throws is always $6^k$ and so you need a fraction that terminates in base $6$, which means the denominator has to have factors only of $2$ and $3$.

2
On

Given $n$ events, throw $k = \lceil \log_6 n \rceil$ dice, to generate a number from $1$ to $6^k$ in base 6. If the number thrown is greater than $n$, keep throwing until you get a number that's less than $n$.

While this will never be guaranteed to terminate in a specified number of throws, the more you throw, the greater the probability that one of the events will be one you can use, and the probability that this process does go on forever vanishes to zero.

If you require exact probabilities on a single throw, then Ross' solution is the best you can get, as your sample space is always going to be a power of 6 and the only way to divide that sample space up among events equally is to use a number of events that is a factor of a power of 6.