Arrangements of 10 red balls, 5 green balls and 5 blue balls where there can’t be two adjacent balls of the same color

combinatorics

In how many ways can 10 identical red balls, 5 identical green balls and 5 identical blue balls be arranged in a row, if there can't be two adjacent balls of the same color?

What I tried: The arrangement must be of the form:

red – another color – red – another color – … etc.

or

another color – red – another color – red … etc.

So the problem is equivalent to find the number of arrangements of 5 green balls and 5 blue balls and then multiply by 2.

the number of arrangements of 5 green balls and 5 blue balls is $\frac{10!}{5!5!}=252$.

So, there are $2 \times 252 = 504$ arrengements.

I'd like to know if this solution is correct. Thank you for your help.

Best Answer

Consider the reds separated by $5$ blues and $4$ greens, with one green spare

$\color{red}{\Large\bullet}\color{blue}{\Large\bullet}\color{red}{\Large\bullet}\color{blue}{\Large\bullet}\color{red}{\Large\bullet}\color{blue}{\Large\bullet}\color{red}{\Large\bullet}\color{blue}{\Large\bullet}\color{red}{\Large\bullet}\color{blue}{\Large\bullet}\color{red}{\Large\bullet}\color{green}{\Large\bullet}\color{red}{\Large\bullet}\color{green}{\Large\bullet}\color{red}{\Large\bullet}\color{green}{\Large\bullet}\color{red}{\Large\bullet}\color{green}{\Large\bullet}\color{red}{\Large\bullet}$

The spare green has $7$ places to fit: $5$ right(say) of a blue, and $2$ ends, thus together with an interchange between blue/green,

Number of ways = $\boxed {2\times7\binom94 = 1764}$