A few days ago someone asked a question about dice in an interview. Naturally, one can consider the following more general problem. Suppose there are $n$ dice, with numbers from $1$ to $n$, on them. Person A throws $(n-1)$ dice in total, and person B throws a single die. Player B wins if his number is larger than the maximum of all the numbers of person A. What is the probability that B wins in this game?
The simplest approach is to consider a sequence $(a_1,a_2,...,a_{n-1},b)$. We wish to count all such sequences so that $b$ is larger than $a_i$. We can choose $n$ choices for $b$ and then $(n-1)$ choices for the $a_i$. Therefore, the probability that person B beats person A is equal to, $\frac{(n-1)^{n-1}n}{n^n} = \left( 1 - \tfrac{1}{n} \right)^{n-1}\approx \frac{1}{e}$.
Mysteriously the answer here involves $e$. Is there some deeper explanation for where this quantity comes from? This answer reminds me of the classical "hat problem" to which the answer is also (approximately) $\frac{1}{e}$. In both problems it is unclear to me what exactly is causing these constants to appear.
To clarify, when we say "deeper reason", we mean in reference to some deep result in probability theory. For instance, there are some problems which are approximated with an answer involving $\pi$, however, those problems are clear since they are variants of the Central Limit Theorem in some form or another, so it is not a surprise where this constant came from.
What exactly is the limiting distribution here that makes $e$ appear? I remember I once read about "order statistics", but I never learned anything about them, perhaps, by taking the maximum it is the asymptotic of the top order statistic? (It would be helpful is someone can also explain where $e$ likewise comes from in the hat problem as well.)