Problem 7. There is a certain number of identical plastic bags that can be placed inside each other. If all the other bags end up inside one of the bags, we will call this situation a "bag of bags." Calculate the number of ways to form a "bag of bags" from 10 bags.

Explanation. Denote the bag with parentheses.

If we had one bag, there is only one way to form a "bag of bags": (). Two bags can also be arranged in only one way: (()).

Three bags can be arranged in two different ways: $(()())$ and $((()))$, and so on.

The order of the bags inside a bag does not matter. For example, the variant $(())())$ does not differ from $(()(()))$.
Answer: 719.

Solution. If $\Pi_{n}$ denotes the number of ways for $n$ packages, then:

$$
\begin{gathered}
\Pi_{1}=1, \Pi_{2}=1, \Pi_{3}=2, \Pi_{4}=4, \Pi_{5}=9, \Pi_{6}=20, \Pi_{7}=48, \Pi_{8}=115, \Pi_{9}=286 \\
\Pi_{10}=719
\end{gathered}
$$

The problem is solved by enumerating the cases. For example, if we take $\Pi_{5}$:

$\Pi_{5}=P_{4}+P_{3}+P_{2}+P_{1}$, where $P_{k}$ is the number of ways corresponding to the case when the root package contains $k$ packages.

$P_{4}=1$, there is only one way: $\left.(0)(0)\right)$.

$P_{3}=1$, there is also only one way: $((())(0))$.

$P_{2}=3$, there are three ways to split 4 packages into 2 groups: 3 and 1, 2 and 2. The first way corresponds to $\left(\Pi_{3}()\right)$ - two variants, the second way - one variant, $((())(0))$.

$P_{4}=\Pi_{4}$ ways: $\left(\Pi_{4}\right)$.

In total, it is $1|1|(2|1)|4=9$.

As $n$ increases, cases arise where one must be careful with combinatorics. For example, 8 packages can be arranged as $\left(\Pi_{3} \Pi_{3} \Pi_{1}\right)$, or as $\left(\Pi_{3} \Pi_{2} \Pi_{2}\right)$. In the second case, this is $\Pi_{3} \cdot \Pi_{2} \cdot \Pi_{2}=2 \cdot 1 \cdot 1=2$ ways, while in the first case, it is not $\Pi_{3} \cdot \Pi_{3} \cdot \Pi_{1}=2 \cdot 2 \cdot 1=4$, but actually only three, because the order of the triple packages does not matter.