What is the probability that no letter is in its proper envelope? Five letters are addressed to five different persons and the corresponding
envelopes are prepared. The letters are put into the envelopes at random.
What is the probability that no letter is in its proper envelope?

Let us have n letters corresponding to which there exist n envelopes bearing different addresses.
A Match occurs if
$Letter_{i}$  gets into $Envelope_{i}$  ,  $Letter_{j}$  gets into  $Envelope_{j}$. Let us denote this event as  $E_{i}$ .
A NO Match occurs if
$Letter_{i}$  gets into $Envelope_{j}$  ,  $Letter_{j}$  gets into  $Envelope_{i}$. Let us denote this event as $\overline{E_{i}}$ .
$E_{i}$ : Denote the Event where that the ith object occupies the ith position corresponding to its number.
Then, the probability 'p' that P(None of the objects occupies
the place corresponding to its number) = P( No Letter will be in its proper Envelope corresponding to its number) is given by :
$ 
p = P(\overline{E1}  \cap \overline{E2}  \cap \overline{E3}....  \cap \overline{En}  ) = 1 - P(\text{Atleast one of the objects occupies the place corresponding to its number})= 1 - P(\text{Atleast One Letter will be in its proper Envelope corresponding to its number})= 1 - P(E1 \cup E2\cup E3.... \cup En) = 1 - [\sum_{i=1 }^{n}P(E_{i}) - \sum_{i=1 }^{n}\sum_{j=1 }^{n}P(E_{i} \cap E_{j})....+(-1)^{n-1}P(E_{1} \cap E_{2}\cap E_{3}....... \cap E_{n})  ]= 1 - [\frac{\binom{n}{1}}{n} - \frac{\binom{n}{2}}{n(n-1)} +  \frac{\binom{n}{3}}{n(n-1)(n-2)} - ..... +  \frac{(-1)^{n-1}}{n(n-1)(n-2)...3.2.1} ] = 1- [ 1- \frac{1}{2!} + \frac{1}{3!}-...+\frac{^{(-1)^{(n-1)}}}{n!}]= \frac{1}{2!} - \frac{1}{3!} + \frac{1}{4!} - ........ +  \frac{(-1)^{(n)}}{n!} = \sum_{k = 0 }^{n}\frac{(-1)^{k}}{k!}$
...........................................................................
We know that $e^x=1+\frac{x}{1!}+\frac{x^2}{2!}+\frac{x^3}{3!}+...$.
Putting $x = -1$, $e^{-1}=1-\frac{1}{1!}+\frac{1}{2!}-\frac{1}{3!}+...$
But for large n :
p = $1-1 + \frac{1}{2!} + \frac{1}{3!} + \frac{1}{4!} - ........... = e^{-1}$
And, the Probability of Atleast One match : $1 - p = (1-e^{-1})$
.........................................................................
Therefore, P(None of the n letters goes to the correct envelope ) =  $\sum_{k = 0 }^{n}\frac{(-1)^{k}}{k!}$
