Courses
Courses for Kids
Free study material
Offline Centres
More
Store Icon
Store
seo-qna
SearchIcon
banner

There are four balls of different colors and four boxes of colors the same as those of the balls. The number of ways in which the balls, one each in a box, could be placed such that a ball does not go to a box of its color is...

Answer
VerifiedVerified
573.9k+ views
Hint: We will make use of the concept of derangement from permutation and combination. Let us understand what this concept of derangement is.
When there are \[n\] distinct object and each of these objects occupy or have x particular places to them, then the total number of ways so that none object occupy the exact particular places allotted to them can be given by:
\[n!\left( 1-\dfrac{1}{1!}+\dfrac{1}{2!}-\dfrac{1}{3!}+.........+\dfrac{{{(-1)}^{n}}}{n!} \right)\]
Where \[n\] is the number of substances and their particular places.

Complete step-by-step answer:
The question fits this derangement concept very well. Since there are four different color balls with each ball having a particular same color 4 boxes. Moreover, we need to make sure that each ball should not go into the box having the same color as its own. Thus all this confirms that we can use the derangement concept here
Thus,
$ n=4 $ 
$ 4!\left( 1-\dfrac{1}{1!}+\dfrac{1}{2!}-\dfrac{1}{3!}+\dfrac{1}{4!} \right)=4!\left( \dfrac{1}{2!}-\dfrac{1}{3!}+\dfrac{1}{4!} \right)\text{         }\!\![\!\!\text{ n! means factorial of n }\!\!]\!\!\text{ } $ 
$ \dfrac{4!}{2!}\text{-}\dfrac{4!}{3!}\text{+}\dfrac{4!}{4!} $ 
$ \dfrac{4!}{2!}-\dfrac{4!}{3!}+1 $ 
$ \dfrac{4\times 3\times 2\times 1}{2\times 1}-\dfrac{4\times 3\times 2\times 1}{3\times 2\times 1}+1 $ 
$ 12-4+1=9 $ 
Therefore, the number of ways in which the balls, one each in a box, could be placed such that a ball does not go to a box of its color is 9.

Note: The defragment concept comes from a very big derivation but the basic concept behind it is that if we have a particular number of distant things and these distant things can occupy particular places made specifically for them but we want to find the number of ways in which these distant objects do not go inside these particular places then we can use the formula \[n!\left( 1-\dfrac{1}{1!}+\dfrac{1}{2!}-\dfrac{1}{3!}+.........+\dfrac{{{(-1)}^{n}}}{n!} \right)\]