Total number of arrangements of the $5$ digit number $12345$ in which at least $3$ digits are not in their exact position is?
My attempt:
At least $3$ digits do not go to their exact position = exactly $3$ digits not in their exact position + exactly $4$ digits not in their exact position + exactly $5$ digits not in their exact position.
For all $5$ not in their position, the number of cases are $$5!\bigg(1-\frac{1}{1!}+\frac{1}{2!}-\frac{1}{3!}+\frac{1}{4!}-\frac{1}{5!}\bigg)$$
How do I solve it from here? Please help me.
The number of digits not fixed can be $3,4,5$ and these are mutually exclusive.
For example, for all $5$ not in their place, the formula is given as you mentioned, using the inclusion exclusion principle. Let us call the number of such permutations as $R$. Get $R = 44$.
Now, fix any one digit in these : now, we have to displace four numbers so that none of them are in their positions : this would give $4!(1 - \frac 1{1!} + \frac 1{2!} ...)$. Call this quantity $S$, we get $5S$ for this block. Get $S = 9$.
Fix any two digits : this can be done in $10$ ways . Next switch the remaining $3$ around for no matches : you would get(can be counted by hand) only $2$ such arrangements. Add everything up.