How many ways can $5$ digits - ${1,2,3,4,5}$ be written down such that no odd integer is in its natural position ?
I tried by Inclusion-Exclusion Principle, but I'm not sure though
$=5!-\binom{3}{1}4!+\binom{3}{2}3!-\binom{3}{3}2!$
Am I right here ?
How many ways can $5$ digits - ${1,2,3,4,5}$ be written down such that no odd integer is in its natural position ?
I tried by Inclusion-Exclusion Principle, but I'm not sure though
$=5!-\binom{3}{1}4!+\binom{3}{2}3!-\binom{3}{3}2!$
Am I right here ?
On
Your approach is fine. Problems of this kind are called derangements. The inclusion-exclusion principle is a proper way to solve them, since it is easier to count the number of possibilities having at least a certain number of fix points.
We consider
There are $5!$ different arrangements to place the five digits.
From this we subtract $\binom{3}{1}4!$ which is the number of arrangements with at least one out of three odd digits at its natural position.
But we have subtracted arrangements with two odd digits at their natural position more than once. We correct this by adding $\binom{3}{2}3!$.
Finally we have to subtract arrangements with three odd digits at their natural position.
We obtain \begin{align*} 5!-\binom{3}{1}4!+\binom{3}{2}3!-\binom{3}{3}2!=120-72+18-2=64 \end{align*}
There are three odd integers between 1 and 5. Therefore, the number of odd integers in natural position can be between 0 and 3.
To calculate the number of A0 permutations with zero odd integers in natural positions, the inclusion-exclusion principle leads to:
$$A_0 = 5! - A_1 - A_2 - A_3$$
$A_2$ is the number of permutations with two odd integers in natural position. $\binom{3}{1}$ choices to select one of three odd integers. Two non-natural positions for this selected odd integer and two choices for the remaining two even integers.
$$A_2 = 4\binom{3}{1} $$
$A_3$ is the number of permutations with all three odd integers in natural position. There are two choices to position the remaining two even integers.
$$A_3 = 2$$
To determine $A_1$, we have to find out how many possibilities exist to arrange two even and two odd integers, such that no odd integer is in its natural position. By applying the inclusion-exclusion principle again, this number $B_0$ can be determined as:
$$B_0 = 4! - B_1 - B_2$$
$$B_1 = 2 \times 2 \times 2$$
$$B_2 = 2$$
$$A_1 = 3 B_0 = 3 \times 14 = 42$$
The resulting $64$ permutations: