7

The problem involves arranging balls of different color in a line such that no two balls of the same color are adjacent to each other. Eventually I would like to find a generalization of having $m$ different colors of balls and $n$ balls of each color, where each ball besides color are indistinguishable. But for now I will start with $3$ colors, red blue and yellow, and having $3$ of each color.

If we had an infinite number of each ball, then i know the answer would be $3(2^8)$ but this is including arrangements where we might only have red and blue balls alternating and not have any yellows.

One thought was to consider "grouping" the colors in its $3!$ permutations and finding the number of arrangements of the groups. But this wouldn't consider arrangements such as $RYRYBYBRB$

I feel like recurrence may be needed for a generalization but without being able to find this simple case I don't know if I can use it. Searching other questions of this sort doesn't help me either as it isn't this type of restriction.

Brute forcing it is one option but it seems like a mess even for this smaller case, so it would only be good for smaller cases.

Any help would be greatly appreciated

WaveX
  • 5,580

0 Answers0