There are two identical red, two identical black, and two identical white balls. In how many different ways can the balls be placed in the cells (Each cell to contain one ball) shown above such that balls of the same colour do not occupy any two consecutive cells?
Case I : 2 balls of the same colour and two balls are a different colour are arranged.
Two balls of the same colour and two balls of different colours can be arranged together in which two balls of the same colour are adjacent =4!/2!x2! = 6 ways
Therefore, Total number of arrangements = 6×3 =18 ways
Case II : Two colours out of 3 can be selected in = 3C1 = 3ways
Now 2 balls of each colour can be arranged alternatively in 2 ways
Thus 4 balls can be arranged(two of each colours)
= 3×2 = 6ways
Hence total number of arrangements = 18+6 =24 ways