18. Stirling's Problem (from 9th grade, 5 points). An incredible legend says that one day Stirling ${ }^{4}$ was contemplating Stirling numbers of the second kind and, in a pensive mood, was tossing 10 fair dice onto the table. After one of the tosses, he suddenly noticed that the combination of points that came up included all the numbers from 1 to 6. Stirling immediately wondered what the probability of such an event would be. What is the probability that when 10 dice are rolled, each number of points from 1 to 6 will appear at least once?
Solution. Let's find the probability of event $A$ "some number is missing in the rolled combination". Denote $A_{k}$ as the event "number $k$ is missing". Then

$$
A=A_{1} \cup A_{2} \cup A_{3} \cup A_{4} \cup A_{5} \cup A_{6}
$$

Using the inclusion-exclusion principle, we get:

$$
\begin{gathered}
\mathrm{P}(A)=\mathrm{P}\left(A_{1}\right)+\mathrm{P}\left(A_{2}\right)+\ldots+\mathrm{P}\left(A_{6}\right)- \\
-\mathrm{P}\left(A_{1} \cap A_{2}\right)-\mathrm{P}\left(A_{1} \cap A_{3}\right)-\ldots-\mathrm{P}\left(A_{5} \cap A_{6}\right)+ \\
+\mathrm{P}\left(A_{1} \cap A_{2} \cap A_{3}\right)+\mathrm{P}\left(A_{1} \cap A_{2} \cap A_{4}\right)+\ldots+\mathrm{P}\left(A_{4} \cap A_{5} \cap A_{6}\right)- \\
-\ldots-\mathrm{P}\left(A_{1} \cap A_{2} \cap A_{3} \cap A_{4} \cap A_{5} \cap A_{6}\right) .
\end{gathered}
$$

All probabilities $\mathrm{P}\left(A_{k}\right)$ are equal and equal to $(5 / 6)^{10}$, and there are $C_{6}^{1}=6$ of them. The probabilities of pairwise intersections are equal and equal to $(4 / 6)^{10}$, and there are $C_{6}^{2}=15$ of them, and so on. Therefore, we get

$$
P(A)=6 \cdot(5 / 6)^{10}-15 \cdot(4 / 6)^{10}+20 \cdot(3 / 6)^{10}-15 \cdot(2 / 6)^{10}+6 \cdot(1 / 6)^{10}
$$

Thus, the probability that each number appears at least once is

$$
\mathrm{P}(\bar{A})=1-\mathrm{P}(A)=1-6 \cdot(5 / 6)^{10}+15 \cdot(4 / 6)^{10}-20 \cdot(3 / 6)^{10}+15 \cdot(2 / 6)^{10}-6 \cdot(1 / 6)^{10}
$$

If you are familiar with Stirling numbers, the solution can be written more concisely. Recall that the Stirling number of the second kind $S(n, k)$ is the number of possible unordered ways to partition $n$ elements into $k$ non-empty groups. In our case, we need to enumerate the ordered ways to partition 10 dice into 6 non-empty groups: the first group contains the ones, the second group contains the twos, and so on. Therefore, the total number of such ways is $6!S(10,6)$. Using a table of Stirling numbers of the second kind (for example, https://en.wikipedia.org/wiki/Stirling_numbers_of_the_second_kind) or using the recursion

$$
S(n, k)=S(n-1, k-1)+k S(n-1, k)
$$

with $S(0,0)=1$ and $S(k, 0)=S(0, k)=0$ if $k>0$, we find: $S(10,6)=22827$. Therefore, the desired probability is

$$
\frac{6!S(10,6)}{6^{10}}=\frac{720 \cdot 22827}{6^{10}}=0.2718 \ldots
$$

Answer: approximately 0.272.

![](https://cdn.mathpix.com/cropped/2024_05_06_e03b48fad60e6548aec7g-13.jpg?height=454&width=463&top_left_y=1098&top_left_x=291)

Favorite darts of Cauchy-Bunyakovsky