Number of one one mappings If we have a set $A=\{1,2,3,4,5\}$ . How many one-to-one mappings $f : A \to A$ can be defined so that $f(i) \ne i$. 
How do we write the possible cases for the function definition to simultaneously fulfill the given criteria? I tried writing down, but cannot reach to an answer. 
 A: I guess that you want to work out the number of permutations without fixed points.
Since any permutation have the form of disjoint cycles,what you need to do is to counting the number of different cyclic formats ——without 1-cycle.
here I use "cyclic formats " to express the number of cycles and the length of each cycle.For example:$(1,2)(3,4,5)and(1,3)(2,4,5)$have the same "cyclic formats " .
One format : $(2+3)$ the number is : $10\times2=20$
Here $(2+3)$ means the permutation like $(1,2)(3,4,5)$
Another : $(5)$: the number is : $5!\div5=24$
Here $(5)$ means the permutation like $(1,2,3,4,5)$
So the number should be$$20+24=44$$
A: An injective mapping $f:A \to A$ is a permutation of its elements.  Since $|A| = 5$, there are $5!$ such mappings.  From these, we must exclude those with one or more fixed points.  
There are $\binom{5}{k}$ ways to select $k$ fixed points and $(5 - k)!$ ways to permute the remaining elements.
By the Inclusion-Exclusion Principle, the number of injective mappings $f:A \to A$ with no fixed points is 
$$\sum_{k = 0}^{5} \binom{5}{0}(5 - k)! = 5! - \binom{5}{1}4! + \binom{5}{2}3! - \binom{5}{3}2! - \binom{5}{4}1! + \binom{5}{5}0! = 44$$
A: The mappings you seek for are called derangements (see Derangement at Wikipedia) and their number is the subfactorial $$!n$$ of the set's cardinality $n$.
Subfactorials are described as the sequence A000166 in the OEIS.
