XXIV OM - I - Problem 12

In a class of n students, a Secret Santa event was organized. Each student draws the name of the person for whom they are to buy a gift, so student $ A_1 $ buys a gift for student $ A_2 $, $ A_2 $ buys a gift for $ A_3 $, ..., $ A_k $ buys a gift for $ A_1 $, where $ 1 \leq k \leq n $. Assuming that all drawing outcomes are equally probable, calculate the probability that $ k = n $.
In the result of any drawing, each student draws a certain student from the same class (possibly themselves), and different students draw different students. Therefore, the result of each drawing defines a certain one-to-one mapping (permutation) of the set of all students in the class onto itself. Conversely, each permutation can be the result of some drawing. Therefore, the number of elementary events is equal to the number of permutations of an $n$-element set, i.e., $n!$.
The favorable event will occur when a certain student $A_1$ draws one of the remaining $n-1$ students, denoted by $A_2$; student $A_2$ draws one of the $n-2$ students different from $A_1$ and $A_2$, denoted by $A_3$; $\ldots$; finally, student $A_{n-1}$ draws student $A_n$ different from $A_1, A_2, \ldots, A_{n-1}$. Since student $A_1$ can draw a student different from themselves in $n-1$ ways, student $A_2$ can draw a student different from $A_1$ and $A_2$ in $n-2$ ways, etc., the number of favorable events is equal to $(n-1)(n-2) \ldots 2 \cdot 1 = (n-1)!$.
Therefore, the probability that $k = n$ is $\displaystyle \frac{(n-1)!}{n!} = \frac{1}{n}$.