There are four balls of different colours and four boxes of colours same as those of the balls. The number of ways in which the balls, one in each box, could be placed such that a ball does not go to box of its own colour is
9
Since number of derangements in such a problems is given by
n!{1−11!+12!−13!+14!−...............(−1)n1n!}
∴ Number of dearangements are
= 4!{12!−13!+14!} = 12 -4 + 1 = 9