In a class of 30 students. How many ways can they rearrange their seats so that no one sits in their original seat?

#
There are 30! permutations of students. Let $A_{k}$ denote the set of permutations in which the $k$-th student is in their place. Obviously, $A_{k}$ consists of 29! permutations. The intersection of any $m$ of the 30 sets $A_{k}$ consists of (30-m)! permutations, and there are $C_{30}^{m}$ such intersections. By the inclusion-exclusion principle, the number of permutations in which at least one student is in their place (i.e., the cardinality of the set $A_{1} \cup \ldots \cup A_{30}$) is

$$
30 \cdot 29!-\frac{30 \cdot 29}{2!} \cdot 29!-\frac{30 \cdot 29 \cdot 28}{3!} \cdot 27!-\ldots-1=30!\cdot\left(1-\frac{1}{2!}+\frac{1}{3!}-\ldots-\frac{1}{30!}\right)
$$

Remark. As is known, the number in parentheses is very close to $1 / e$.

## Answer

$30!\cdot\left(\frac{1}{2!}-\frac{1}{3!}+\ldots+\frac{1}{30!}\right)$ ways.