Motivated by the puzzle Secret Santa ðŸŽ…, whose solution is quite well known, I propose a far harder puzzle (I think):

**A group of $N$ people place their names into a hat. Each person draws a name at random to decide who they will give a gift to. What is the probability that at least one pair of people end up picking each other? What is the expected number of such pairs?**

So for example, if $N = 2$, then there is a $\frac{1}{2}$ chance of such a pair occurring, as either each person picks themselves or they pick each other and create a pair. Therefore the expected number is also $\frac{1}{2}$.

If $N = 3$ it is possible to check that the probability is $\frac{1}{3}$, and the expected number of such pairs is $1$. (I am not sure of this, someone check it please)

In general, one might ask this for an arbitrary cycle, i.e. what is the probability and expected number of $k$ cycles of gifting occurring among $N$ people.