Everything Goes Wrong

In how many ways a postman can deliver seven letters such that no letter is delivered at correct location?


The answer is 1854.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Jason Zou
Jul 7, 2015

Let d ( x ) d(x) be the number of derangements of length x x , the ways to deliver x x letters so that none of them is delivered correctly.

Let's say we have n n letters. We first look at person 1 1 .

Person 1 1 has n 1 n-1 choices for the letter he gets. Let's say he gets letter k k . Now, if we look at person k k , there are 2 possibilities.

Case 1: He gets person 1 1 's letter. We can remove person 1 1 and k k and now have d ( n 2 ) d(n-2) .

Case 2: He doesn't get person 1 1 's letter. Now, we can pretend like that letter was letter k k since person k k can't get it and we have d ( n 1 ) d(n-1) .

Thus, we create the recursion: d ( n ) = ( n 1 ) ( d ( n 1 ) + d ( n 2 ) ) d(n)=(n-1)(d(n-1)+d(n-2))

It can be seen that d ( 1 ) = 0 d(1)=0 and d ( 2 ) = 1 d(2)=1 .

Using the recursion above, we have:

d ( 3 ) = 2 ( 1 + 0 ) = 2 d(3)=2(1+0)=2

d ( 4 ) = 3 ( 2 + 1 ) = 9 d(4)=3(2+1)=9

d ( 5 ) = 4 ( 9 + 2 ) = 44 d(5)=4(9+2)=44

d ( 6 ) = 5 ( 44 + 9 ) = 265 d(6)=5(44+9)=265

d ( 7 ) = 6 ( 265 + 44 ) = 1854 d(7)=6(265+44)=\boxed{1854}

Venture Hi
Oct 8, 2014

Derangement 7

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...