In how many ways can 9 balls of which 4 are red, 4 are white and 1 black be arranged in a line so that no red ball is next to the black?
Answer: 175
Solution
Case 1: 1st ball is black in the whole row of 9 balls
Then the 2nd ball must be white. The rest of the 4 red and 3 white balls can be arranged in = 35 ways
Case 2: last ball is black
Then the 2nd last ball must be white. The rest of the 4 red and 3 white balls can be arranged in = 35 ways
Case 3: Black ball is not the 1st or last ball
Then the black ball must be between 2 white balls. Consider WBW as one unit. Together with 4 red balls and 2 white balls, these can arranged in = 105 ways
Using the addition principle, total number of ways = 35+35+105= 175