There are four balls of different colors and four boxes of colors 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 own color is ___.
Open in App
Solution
We know that number of derangements of n objects is n![1−11!+12!−13!+14!−.....+(−1)n1n!]
Therefore, number of ways of putting all the 4 balls into boxes of different colour is 4![1−11!+12!−13!+14!]=4!(12−16+124)=24(12−4+124)=9