## Task 2 - 201242

In a fish shop, there are three water containers available for keeping live carp.

At the start of sales, there are exactly 20 carp in each of these three containers. At the end of sales, there are a total of 3 carp left. The sold carp were removed one by one.

No exchange of carp between containers took place; no new carp were added during the sales.

Calculate, rounded to 3 decimal places, the probability that at the end of sales, there is exactly one carp in each of the three containers!

Hint:

The probability $p$ to be determined is defined as follows: Let $A$ be the number of all different possibilities for the sequence of removing 57 carp from the three containers. Furthermore, let $G$ be the number of those possibilities among these where at the end of sales, there is exactly one carp in each of the three containers.

Two possible sequences of removal are considered the same if and only if they agree for each $i=1,2, \ldots, 57$ in specifying from which container the $i$-th removal of a carp took place.

With these notations, $p=\frac{G}{A}$.
The various possibilities for the order of removal can be uniquely identified by the different 57-member sequences $F=\left(a_{1}, a_{2}, \ldots, a_{57}\right)$, where each $a_{i}$ indicates the number of the container from which the $i$-th removal takes place.

In each of these sequences, each of the three container numbers appears at most 20 times. Therefore, all the sequences to be considered can be classified according to the number of sequence members from the three containers as shown in the following table (numbers are the number of occurrences of elements from the container in the sequence):

| Container 1  $u$ | Container 2  $v$ | Container 3  $w$ |
| :--- | :--- | :--- |
| 20 | 20 | 17 |
| 20 | 19 | 18 |
| 20 | 18 | 19 |
| 20 | 17 | 20 |
| 19 | 20 | 18 |
| 19 | 19 | 19 |
| 19 | 18 | 20 |
| 18 | 20 | 19 |
| 18 | 19 | 20 |
| 17 | 20 | 20 |

For 57 different elements, there are exactly 57! different arrangements of these elements.

Since it is the same in the given case which element is removed from a chosen container, it follows that in each of the ten classes $(u, v, w)$ listed above, those that differ only by permutations of the $u$ carp taken from the first container or the $v$ carp from the second container or the $w$ carp from the third container are the same in the sense of the problem.

Since all these permutations are independent of each other, the number $a(u, v, w)$ of different sequences in a class $(u, v, w)$ is therefore

$$
a(u, v, w)=\frac{57!}{u!\cdot v!\cdot w!}
$$

According to the table, there are exactly three classes in which $u, v, w$ are 17, 20, 20 in some order, further exactly six classes in which $u, v, w$ are 18, 19, 20 in some order, and exactly one class with $u=v=w=19$. Therefore, we have:

$$
A=\frac{3 \cdot 57!}{17!\cdot 20!\cdot 20!}+\frac{6 \cdot 57!}{18!\cdot 19!\cdot 20!}+\frac{57!}{19!\cdot 19!\cdot 19!}
$$

Exactly those sequences that belong to the class with $u=v=w=19$ correspond to the possibilities in which at the end of the sale there is exactly one carp in each container. Therefore, we have:

$$
G=\frac{57!}{19!\cdot 19!\cdot 19!}
$$

From this, it follows that

$$
\begin{gathered}
A=\frac{57!}{17!\cdot 19!\cdot 19!} \cdot\left(\frac{3}{20 \cdot 20}+\frac{6}{18 \cdot 20}+\frac{1}{18 \cdot 19}\right)=\frac{57!}{17!\cdot 19!\cdot 19!} \cdot \frac{513+1140+200}{9 \cdot 19 \cdot 20 \cdot 20} \\
G=\frac{57!}{17!\cdot 19!\cdot 19!} \cdot \frac{1}{18 \cdot 19}=\frac{57!}{17!\cdot 19!\cdot 19!} \cdot \frac{200}{9 \cdot 19 \cdot 20 \cdot 20} \\
p=\frac{G}{A}=\frac{200}{1853}=0.1079 \ldots
\end{gathered}
$$

Thus, rounded to three decimal places, $p=0.108$.

## Adopted from $[3]$