Where does e come from in this problem about dice? 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.)
 A: The reason $e =\lim\limits_{n \to \infty}\left(1+\frac1n\right)^{n}=\frac1{\lim\limits_{n \to \infty}\left(1-\frac1n\right)^{n}}$ appears is precisely because you are taking a particular limit, though I am not sure you took exactly the correct one.
The answer should head towards $0$ as $n$ increases, since player B has one die and player A has an increasing number of dice.  Ignoring the possibilities of ties for the largest values, you might think the probability of player B having the largest of $n$ values might be $\frac1n$.  But the possibility of ties changes this.
You have used $n$ to mean two different things: the numbers of/on the dice and the number thrown by $B$.  If instead you had used $b$ as the number thrown by player B then the answer to "the probability that Player B's number is strictly larger than the maximum of all the numbers of person A" is $$\sum\limits_{b=1}^n \frac{(b-1)^{n-1}}{n^n}$$ which for large $n$ is approximately $\frac{1}{n(e-1)}$, about $\frac{0.58}n$.
Meanwhile "the probability that Player B's number is at least as large as the maximum of all the numbers of person A" would be $\sum\limits_{b=1}^n \frac{b^{n-1}}{n^n}$ which for large $n$ is approximately $\frac{e}{n(e-1)}$ about $\frac{1.58}n$.
From the difference, you can tell that the probability of player B's number being exactly equal to the largest of player A's numbers is $\sum\limits_{b=1}^n \frac{b^{n-1}-(b-1)^{n-1}}{n^n}=\frac1n$. An alternative approach would be to say that the largest of player A's numbers is some value from $1$ to $n$  and player B has a probability of $\frac1n$ of getting that exact value.
