How many dice would I need to get an $n$ of a kind 100% of the time?

65 Views Asked by At

For example, if I wanted to get two of a kind, I would need seven dice. This is because even if the first six were 1, 2, 3, 4, 5, 6, the next one would have to make a pair out of the previous dice.

So is there a formula for getting n of a kind 100% of the time?

2

There are 2 best solutions below

3
On BEST ANSWER

13 for three of a kind = 2 * 6 + 1 in general 6(n-1) + 1

since will $6(n-1)$ the only way you can't have n of a kind is if you have n-1 copies of each number from 1 to 6.

0
On

I think you mean $>=n$ of any kind. A trivial upper bound on the number of $k$-sided dice needed is $(n-1)*k+1$. This is the worst-case distribution. Without loss of generality, we can assume the dice land $1,2,3,...,k$ for the first $k$ dice, and then repeat the pattern. This reduces the count of a given number to the minimum by spreading it out. Then, when the $n$th row of dice starts, you have your first $n$ occurrences of a single number. The reason for $n-1$ is that you get your first repeat at the beginning of the row, not the end.

If you want a slightly more probability based measurement, use the negative binomial distribution. Decide on how many failures you are willing to accept, and then use the following formula: $${{n+r-1}\choose{n}}p^n(1-p)^r$$ Where: $n$=(number of successes) $r$=(number of failures). You then pick the number of failures you want, since you already know the number of successes ($n$). In this case, you set $p=\frac{1}{k}$, since you have some number in mind, and the other numbers are failures.