Skip to main content
deleted 1 character in body
Source Link
Alex R.
  • 14.1k
  • 4
  • 29
  • 51

This is basically a generalized coupon-collector problem. I don't think you're going to find an easy closed form solution to it. In general, the distribution of dice throws is multivariatemultinomial:

$$\binom{n}{a_1,a_2,\cdots,a_r}(1/r)^n,$$

where $a_i$ represents the number of times $i$ is rolled, and $a_1+\cdots+a_r=n$. Then the answer is:

$$(1/r)^n\sum\binom{n}{a_1,a_2,\cdots,a_r},$$

where the sum is over all combinations of $a_i$ such that exactly $y$ of them are nonzero. I.E. you are looking at all partitions of $n=a_1+\cdots+a_r$ such that exactly $y$ are nonzero. You can use some symmetry to simplify this further by just summing over all combinations of $n=a_1+\cdots+a_y$ with $a_i>0$ for $i=1,2,\cdots,y$ and $a_i=0$ for $i>y$, and then accounting for their multiplicity via $\binom{n}{a_1}\binom{n-a_1}{a_2}\cdots$.

This is basically a generalized coupon-collector problem. I don't think you're going to find an easy closed form solution to it. In general, the distribution of dice throws is multivariate:

$$\binom{n}{a_1,a_2,\cdots,a_r}(1/r)^n,$$

where $a_i$ represents the number of times $i$ is rolled, and $a_1+\cdots+a_r=n$. Then the answer is:

$$(1/r)^n\sum\binom{n}{a_1,a_2,\cdots,a_r},$$

where the sum is over all combinations of $a_i$ such that exactly $y$ of them are nonzero. I.E. you are looking at all partitions of $n=a_1+\cdots+a_r$ such that exactly $y$ are nonzero. You can use some symmetry to simplify this further by just summing over all combinations of $n=a_1+\cdots+a_y$ with $a_i>0$ for $i=1,2,\cdots,y$ and $a_i=0$ for $i>y$, and then accounting for their multiplicity via $\binom{n}{a_1}\binom{n-a_1}{a_2}\cdots$.

This is basically a generalized coupon-collector problem. I don't think you're going to find an easy closed form solution to it. In general, the distribution of dice throws is multinomial:

$$\binom{n}{a_1,a_2,\cdots,a_r}(1/r)^n,$$

where $a_i$ represents the number of times $i$ is rolled, and $a_1+\cdots+a_r=n$. Then the answer is:

$$(1/r)^n\sum\binom{n}{a_1,a_2,\cdots,a_r},$$

where the sum is over all combinations of $a_i$ such that exactly $y$ of them are nonzero. I.E. you are looking at all partitions of $n=a_1+\cdots+a_r$ such that exactly $y$ are nonzero. You can use some symmetry to simplify this further by just summing over all combinations of $n=a_1+\cdots+a_y$ with $a_i>0$ for $i=1,2,\cdots,y$ and $a_i=0$ for $i>y$, and then accounting for their multiplicity via $\binom{n}{a_1}\binom{n-a_1}{a_2}\cdots$.

Source Link
Alex R.
  • 14.1k
  • 4
  • 29
  • 51

This is basically a generalized coupon-collector problem. I don't think you're going to find an easy closed form solution to it. In general, the distribution of dice throws is multivariate:

$$\binom{n}{a_1,a_2,\cdots,a_r}(1/r)^n,$$

where $a_i$ represents the number of times $i$ is rolled, and $a_1+\cdots+a_r=n$. Then the answer is:

$$(1/r)^n\sum\binom{n}{a_1,a_2,\cdots,a_r},$$

where the sum is over all combinations of $a_i$ such that exactly $y$ of them are nonzero. I.E. you are looking at all partitions of $n=a_1+\cdots+a_r$ such that exactly $y$ are nonzero. You can use some symmetry to simplify this further by just summing over all combinations of $n=a_1+\cdots+a_y$ with $a_i>0$ for $i=1,2,\cdots,y$ and $a_i=0$ for $i>y$, and then accounting for their multiplicity via $\binom{n}{a_1}\binom{n-a_1}{a_2}\cdots$.