The game TORRECOPOS consists of storing a stack of cups, previously stacked on a table (Figure 1), with the "mouths" facing downwards, so that all of them fit inside each other and only one is in contact with the table (Figure 2). The player who collects them in the shortest time wins. In Figure 3, we can obtain only three configurations after collecting them: \(A A B\), \(A B A\), and \(B A A\).

![](https://cdn.mathpix.com/cropped/2024_05_01_42ab6d7ce4e674d231dcg-03.jpg?height=365&width=380&top_left_y=1671&top_left_x=611)

Figure 1

![](https://cdn.mathpix.com/cropped/2024_05_01_42ab6d7ce4e674d231dcg-03.jpg?height=290&width=294&top_left_y=1753&top_left_x=1053)

Figure 2

![](https://cdn.mathpix.com/cropped/2024_05_01_42ab6d7ce4e674d231dcg-03.jpg?height=254&width=256&top_left_y=1779&top_left_x=1326)

Figure 3

a) In Figure 1, how many different configurations can we obtain after collecting them?

b) How many different configurations can we obtain when collecting the cups in a tower with 4 floors?

c) How many different configurations can we obtain when collecting the cups from a tower with \(n\) floors?
Solution

a) The number of final configurations is the same as the number of permutations of a word that has three letters $A$, two letters $B$, and one letter $C$, that is, $\frac{6!}{3!\cdot 2!}=60$.

b) Using the same reasoning as in the first item, but with four letters $A$, three letters $B$, two letters $C$, and one letter $D$, we have $\frac{10!}{4!\cdot 3!\cdot 2!}=12,600$.

c) In this case, we have $n$ letters $A$, $(n-1)$ letters $B$, $(n-2)$ letters $C$, and so on, with the total number of letters being the sum of the first $n$ natural numbers, that is, $\frac{n(n+1)}{2}$. Thus, the number of final configurations, after collecting the cups, is

$$
\frac{\left(\frac{n(n+1)}{2}\right)!}{n!\cdot(n-1)!\cdot(n-2)!\cdot \ldots \cdot 1!}
$$