Derangements of r objects is when each of these objects are misplaced or wrongly assigned.
Number of Derangements =D(r) = r!×(1−1!1+2!1−3!1+...)
In cases where there is a total of n objects, and r of them are misplaced or wrongly assigned, we first select the r elements in nCr ways and then derange them.
Number of such derangements =nCr×D(r)=nCr×r!×(1−1!1+2!1−3!1+...)
It's not too hard to derive the derangements. However, we recommend you to memorise the following.
D(1)=0
D(2)=1
D(3)=2
D(4)=9
D(5)=44
Furthermore, derangements can be derived as follows.
When n is odd, D(n)=(D(n−1)×n)−1
When n is even, D(n)=(D(n−1)×n)+1
Using this we can derive D(6)=44×6+1=265; D(7)=265×7−1=1854 and so on.
Example 37
What is the number of ways in which 6 letters can be put into 6 envelopes, such that exactly 2 of the letters get into the correct envelopes?
Solution
From 6 letters, 4 need to be selected and put into incorrect envelopes, i.e. deranged.