De-arrangement in permutation and combination [duplicate]

Funda 1: De-arrangement

If $n$ distinct items are arranged in a row, then the number of ways they can be rearranged such that none of them occupies its original position is, $$n! \left(\frac{1}{0!} – \frac{1}{1!} + \frac{1}{2!} – \frac{1}{3!} + \cdots + (-1)^n \frac{1}{n!}\right).$$

Note: De-arrangement of 1 object is not possible.

$\mathrm{Dearr}(2) = 1$; $\mathrm{Dearr}(3) = 2$; $\mathrm{Dearr}(4) =12 – 4 + 1 = 9$; $\mathrm{Dearr}(5) = 60 – 20 + 5 – 1 = 44$.

I am not able to understand the logic behind the equation. I searched in the internet, but could not find any links to this particular topic.

Can anyone explain the logic behind this equation or point me to some link that does it ?

marked as duplicate by leonbloy, Lord_Farin, Dan Rust, user1337, user7530Oct 17 '13 at 23:50

These are called derangements. Wikipedia on inclusion-exclusion counts the number of permutations where at least one item is where it belongs, which is $n!-$the derangement number. OEIS A000166 has many references