Example 4. Five people stand in a row. When they reline up, none of them stands in their original position. How many different formations are there?
Let the original formation of the five people be
$$
a_{1} a_{2} a_{3} a_{4} a_{5}
$$
$E=\{$ all permutations of five people standing in a line $\}$,
$A_{i}=\{a$ standing in his original position in the permutations $\}$
$$
\text { ( } i=1,2,3,4,5) \text {, }
$$

Then the number of desired permutations is
$$
\begin{array}{l}
-N\left(\bigcap_{i=1}^{5} A_{i}\right) \\
=P_{5}^{5}-C_{5}^{1} P_{4}^{4}+C_{5}^{2} P_{5}^{3}+C_{5}^{5} P_{2}^{2}-C_{5}^{4} P_{1}^{1} \\
-C_{5}^{5} \\
=120-120+60-20+5-1 \\
=44 \text { (ways). } \\
\end{array}
$$

This solution can be generalized to any $n$ elements arranged in a line, where each element is not in its original position. The number of different arrangements is
$$
\begin{array}{l}
P_{n}^{n}-C_{n}^{1} P_{n-1}^{n-1}+C_{n}^{2} P_{n-2}^{n-2}+\cdots \\
+(-1)^{k} C_{n}^{k} P_{n-k}^{n-k}+\cdots+(-1)^{n} C_{n}^{n} \\
=P_{n}^{n}\left[1-1+\frac{1}{2!}-\frac{1}{3!}+\cdots+\frac{(-1)^{k}}{k!}\right. \\
\left.+\cdots+\frac{(-1)^{n}}{n!}\right] \\
\end{array}
$$
$\approx P_{n}^{n} e^{-1}$ (take $e=2.71828$, then round to the nearest integer).