9. Patrick and Slippers. Every day, the dog Patrick gnaws one slipper from the existing supply in the house. With a probability of 0.5, Patrick wants to gnaw a left slipper, and with a probability of 0.5 - a right slipper. If the desired slipper is not available, Patrick gets upset. How many pairs of identical slippers need to be bought so that with a probability of at least 0.8, Patrick does not get upset for a whole week (7 days)?
Solution. It is clear that if 7 pairs are bought, Patrick will definitely have enough of the desired, even if he chooses only left slippers every day. The question is about the smallest number of slippers that need to be bought so that with a probability of 0.8 or higher, Patrick will not be disappointed. Probability theory often helps to solve a problem not with absolute certainty, but practically with certainty ${ }^{1}$, which is more important in real life.

Assume for definiteness that during the week Patrick will want to eat $S$ left and $7-S$ right slippers. We need to find such a $k$ that the inequality

$$
\mathrm{P}(S \leq k \cap 7-S \leq k) \geq 0.8
$$

holds. $k$ will be the required number of pairs. Rewrite the event in parentheses as:

$$
\mathrm{P}(7-k \leq S \leq k) \geq 0.8
$$

The probability on the left side of the inequality is equal to the sum

$$
C_{7}^{7-k} \frac{1}{2^{7}}+C_{7}^{8-k} \frac{1}{2^{7}}+\ldots+C_{7}^{k} \frac{1}{2^{7}}=\frac{1}{128} \cdot\left(C_{7}^{7-k}+C_{7}^{8-k}+\ldots+C_{7}^{k}\right)=\frac{1}{64} \cdot\left(C_{7}^{4}+C_{7}^{5}+\ldots+C_{7}^{k}\right)
$$

Then

$$
C_{7}^{4}+C_{7}^{5}+\ldots+C_{7}^{k} \geq 64 \cdot 0.8=51.2
$$

Considering that the left side is an integer, we need to find the smallest $k$ for which the inequality

$$
C_{7}^{4}+C_{7}^{5}+\ldots+C_{7}^{k} \geq 52
$$

holds.

Write out the 7th row of Pascal's triangle, starting from $C_{7}^{4}$:

| $C_{7}^{4}$ | $C_{7}^{5}$ | $C_{7}^{6}$ | $C_{7}^{7}$ |
| :---: | :---: | :---: | :---: |
| 35 | 21 | 7 | 1 |

The sum $C_{7}^{4}+C_{7}^{5}=35+21>52$, so the smallest $k$ is 5.

Answer: 5.