TITLE: If n people enter a hall through any one of n doors, what is the probability at least one door is not used?
QUESTION [6 upvotes]: The probem is I have 2 conflicting solutions.
Solution 1: 
Since there is $n$ people who each choose any one of $n$ doors, the total number of ways $n$ people enter the hall is $n^n$. (correct?)
then I used, $P($one door not chosen$)=1-P($all doors chosen$)$
which (to me) implies a 1 to 1 matching of people to doors, which can only happen in $n!$ ways (equivalent to the number of arrangements of $n$ objects).
ie. $P($all doors chosen$)=\dfrac{n!}{n^n}$
and so the required probability is $1-\dfrac{n!}{n^n}$
Solution 2:
Consider all cases where at least $1$ door is not used:
If $n$ people enter through $1$ door there is $1^n=1$ arrangements
If $n$ people enter through $2$ doors there is $2^n$ arrangements
If $n$ people enter through $3$ doors there is $3^n$ arrangements
...
If $n-1$ people enter through $n-1$ doors there is $(n-1)^n$ arrangements
(Note: $n$ cannot enter through all $n$ doors or required condition is not met)
In this formulation the required probability is given by  $\dfrac{1^n+2^n+3^n+...+(n-1)^n}{n^n}$
So which solution (if either) is correct?

REPLY [3 votes]: The first solution is correct.
Counting even the ways in which $n$ people enter through two doors is not as simple as your Solution $2$ indicates. The $2$ doors can be chosen in $\binom{n}{2}$ ways. Now let each person choose one of these two doors. This can be done in $2^n$ ways. But $2$ of these ways involve everybody choosing the same door. So we end up with
$$\binom{n}{2}\left(2^n-2  \right)$$
ways. For $k$ doors, we get in the same way $\binom{n}{k}$ and $k^n$, but removing the cases where fewer than $k$ doors were actually chosen gets complicated.