Finding the number of combinations A teacher distributes 7 books to 7 children (each student a books), on the next day she collects the books back and redistributes in such a way that each students get a new book. In how many ways can the teacher do it ?
I couldn't the right answer
 A: Imagine the books have the imaginative titles $A, B, C, D, E, F, G$.
On the first day, the teacher hands out the books like:
$$B\;E\;F\;A\;G\;C\;D$$
On the next day she hands them out like:
$$A\;F\;G\;D\;C\;E\;B$$
This is okay because no pupil gets the same book as they did on the day before.
This idea is called a derangement. [Wikipedia] [Mathworld] [OEIS]
As there are $7$ books and $7$ pupils, the answer is 1854.
For clarity, we can make a mapping from the books to the integers, in this case namely:
$$\begin{array}{c|c}
1&B\\
\hline
2&E\\
\hline
3&F\\
\hline
4&A\\
\hline
5&G\\
\hline
6&C\\
\hline
7&D
\end{array}
$$
or alternatively, with the books in alphabetical order:
$$\begin{array}{c|c}
A&4\\
\hline
B&1\\
\hline
C&6\\
\hline
D&7\\
\hline
E&2\\
\hline
F&3\\
\hline
G&5
\end{array}
$$
which makes the permutation in my example $4357621$, which (obviously) has no fixed points.
Mathematically, a derangement in permutations is defined on the set $s_n=\{1,2,\dots,n\}$, where if $\sigma(s_n)$ is a permutation of $s_n$ then $\forall 1\le i\le n, \;s_n[i]\ne\sigma(s_n)[i]$. A fixed point in permutation theory is an $i$ such that $s_n[i]=\sigma(s_n)[i]$
