There are $2$ identical white balls , $3$ identical red balls and $4$ green balls of different shades. The number of ways in which the balls can be arranged in a row so that at least one ball is separated from the balls of the same colour.
My Approach : We can find the answer using (Total Arrangements) $-$ (No ball is separated )
By this total number of arrangements are $$\frac{9!}{2!3!4!}$$
No ball is separated is $3!$ as the balls are identical. But the answer is coming wrong.
Please tell the correct approach.
There is a total of $\tfrac{9!}{2!3!}$ distinct ways to arrange the coloured balls, since the green balls are not identical. (They are different shades of green !) $$\square\square\;\color{red}{\blacksquare\blacksquare\blacksquare}\;\color{#90EE90}\blacksquare\color{#71BC78}\blacksquare\color{lime}\blacksquare\color{#228B22}\blacksquare$$
To keep balls grouped so that none are separated from another of the same colour, we need to keep the identical whites stuck together as a pair, and the identical reds as a triplet, and the distinct greens must either form two separated pairs or a single group of four. Count the ways: