Derangement with extra box

421 Views Asked by At

I was going through PnC questions and I came across this problem.

Four balls numbered $1,2,3,4$ are to be placed into five boxes numbered $1,2,3,4,5$ such that exactly one box remains empty and no ball goes to its own numbered box. The no. of ways is?

I worked out the problem in the following way.

Case 1: box 5 is not selected and thus total derangements $d_4=9$

Case 2: Any one of 4 boxes say box 1 is not selected $ C(4,1)$

case 2(a) ball 1 goes to box 5 then total derangements $d_3=2$

Case 2(b) ball 1 goes to either of other two boxes say box 2

Case 2(b)(i) ball 2 goes to 5 then $d_2=1$

Case 2(b)(ii) ball 2 doesn't go to box 5 then also $d_2=1$

Thus, total number of ways $=9+C(4,1)\{2+2*2\}=33$

But none of the answer matches. Please help me identify error in the reasoning.

I got the error Case 2(b) should be ball 1 goes to either of other three boxes say box 2

and Case 2(b)(ii) ball 2 doesn't go to box 5 then also $2*d_2=1$

So, finally it comes to $=9+C(4,1)\{2+3*(1+2)\}=53$

2

There are 2 best solutions below

0
On

Your mistake is in the last step. Suppose box $1$ remains empty, and ball $1$ doesn't go into box $5$. We can count these permutations by first deranging $4$ balls, and then transferring whichever ball ends up in box $1$ to box $5$. There are $d_4=9$ such permutations, so the answer is $$9+4(2+9)=53$$

I didn't quite understand how you got $2\cdot2$ rather than $9$, so I can't be more specific about your mistake, sadly.

Another way to do the second part is to consider derangements of the $5$ balls, and then to remove ball $5$. This gives the answer $$d_4+d_5=9+44=53$$

0
On

This answer is a little late , but it may help you ,as well .I will use Inclusion-exclusion principle to solve the question.We know that there are $P(5,4)=120$ ways to place these balls into the boxes where there is one box empty.

Moreover , we do not want these situations such that ball $1$ is in box $1$ or ball $2$ is in box $2$ or ball $3$ is in box $3$ or ball $4$ is in box $4$. Lets call these situations by $A,B,C,D$ , respectively. We also do not want the situations such that $A \cap B , C \cap D ,B \cap C \cap D$ ,etc.. Then , we should subtract these unwanted situations from the total.

$\mathbf{\text{WORK:}}$ There are $C(4,2)=6$ cases like $A \cap B$ , $C(4,3)=4$ cases like $A \cap B \cap C$ , $C(4,4)=1$ cases like $A \cap B \cap C \cap D$

Then , $$120 - [(4 \times 4!) - (6 \times 3!) + (4 \times 2!) -1]= 120-67=53$$

$\mathbf{\text{NOTE:}}$ $A \cap B $ means the balls $1$ and $2$ are in their own boxes , the rest permutated randomly , $A \cap B \cap C$ means the balls $1$ and $2$ and $3$ are in their own boxes , the rest permutated randomly etc..