1. ## Rolling dice probability

Roll an $\displaystyle m$-sided fair dice $\displaystyle n$ times. What is the probability that all numbers from $\displaystyle 1$ to $\displaystyle k$ appear at least once and none from $\displaystyle k+1$ to $\displaystyle m$ appear during the $\displaystyle n$ trials? ($\displaystyle n\geq k$)

2. ## Re: Rolling dice probability

Here's my thought. Check if it is correct. I also want to know if there's a simpler method.

Given any $\displaystyle i$ numbers from $\displaystyle 1$ to $\displaystyle k$, let $\displaystyle w(i)$ be the number of scenarios under which all and only those $\displaystyle i$ numbers appear in our $\displaystyle n$ trials. Then we have $\displaystyle w(1)=$1, and $\displaystyle w(i)={i}^{n}-\sum_{j=1}^{i-1}{i \choose j}w(j)$.

By this definition, there are exactly $\displaystyle {k \choose i}w(i)$ scenarios under which exactly $\displaystyle i$ different numbers from $\displaystyle 1$ to $\displaystyle k$ appear.

Hence the required probability $\displaystyle p=({k}^{n}-\sum_{i=1}^{k-1}{k \choose i}w(i))/{m}^{n}$.