# In how many ways can we arrange $6$ red, $3$ blue and $4$ green balls in a row such that there is no adjacent green balls?

All ball of one color are identical.

My idea is to calculate first the total numbers to arrange the $13$ balls. It equals $\dfrac{13!}{6! 3! 4!}=60060.$

Then I want remove the cases where all $4$ green ball are adjacent, then remove cases where $3$ green ball are adjacent and the cases $2$ green ball are adjacent.

For the first case (all $4$ green ball are adjacent) I have got $\dfrac{9!}{6! 3!}=84$ cases, but cant calculate rest cases. Any help please.

There are $9$ non-green balls; line them all up in a row. Now consider the $8$ spaces between the balls, and the $2$ spaces at the ends—$10$ in all. We can put the $4$ green balls in any of those spaces (with no more than one in each space). Thus the number of such arrangements is

$$\binom{10}{4} = 210$$

To this must be considered the multiple ways in which the $3$ blue balls can be placed amongst the $9$ non-green balls. This is

$$\binom{9}{3} = 84$$

Thus the total number of possible arrangements is

$$84 \cdot 210 = 17640$$

• Shouldn't you multiply by the ways to arrange the non-green balls? – jgon May 8 '15 at 19:42
• Yup. I'll fix that. Total brain fade. – Brian Tung May 8 '15 at 19:43
• @Leox: The expression $\binom{9}{3}\binom{10}{4}$. is correct. – André Nicolas May 8 '15 at 19:53
• André Nicolas Yes,I see now. @Brian Tung Thank you! – Leox May 8 '15 at 19:57