Combinatorics logic

Imagine the $6$ balls already drawn, nicely aligned in front of you. One mental trick: the balls have no color (for now) - they are all white. Now you have $2$ pots of paint: one black and one red.

In how many different ways can you paint the balls so that the condition of $1$ black; $2$ white; and $3$ red is observed?

Let's start with the red paint. You can indulge yourself painting the first, second and third; first, second and fourth, etc. We actually want to choose $3$ balls out of $6$, or $\binom{6}{3}=20$, and paint them red.

Almost done... Now we only have to make up our mind about which one of the remaining $3$ balls will be painted in black. There are $\binom{3}{1}=3$ choices.

The other two will remain white.

Just to be clear: we have $\binom{6}{3}\binom{3}{1}=60$ ways to paint them.

Empirical proof in R:

balls = c(rep("R",3), rep("W",2),"B"); 
sim = replicate(1e6, sample(balls)); ncol(unique(sim, MARGIN = 2))
    [1] 60

Firstly, note that picking out all of the balls in turn is the same as arranging them in a row (e.g. in positions 1 to 6); I find this slightly easier to think about, so I will refer to this situation henceforth.

Method 1:

Imagine that the six (colourless) balls are already placed in a row. Now, in order to count the number of ways they may be arranged with 3 being red, 2 being white, and the remaining one being black, we can assign the 6 balls colours retrospectively.

To start with, one of the balls must be black - there are 6 choices for which ball should be black. Once this has been decided, we need two of the remaining 5 balls to be white - this can be done in ${5 \choose 2} = 10$ ways. The remaining 3 balls must then be red.

Hence, there are $6 \times 10 = 60$ ways to arrange the balls in the problem.

Method 2:

Assuming, for now, that each ball is different/distinguishable, there are $6!$ ways of arranging the 6 balls in a row (i.e. 6 choices for the first ball, 5 for the second, etc.) I will refer to this as the simplified problem, as opposed to the actual problem.

In the actual problem, the two white balls are indistinguishable - that is, it does not matter if you swap them around, it still counts as the same arrangement. Hence, each distinct arrangement in the actual problem has been counted twice.

Similarly, the three red balls are indistinguishable; consider a single arrangement that we initially counted in our simplified problem. For each arrangement, we can hold the non-red balls fixed, and rearrange the order of the red balls, and each of these rearrangements would not count as a new arrangement in the actual problem. But in how many ways, can we rearrange these three red balls whilst holding the positions of the other colours fixed? Well there are 3 red balls, so they can be ordered/swapped in $3!$ ways. That is to say, in our simplified problem, we counted each distinct arrangement in our actual problem $3!$ times (by assuming that the red balls could be distinguished).

So, to summarise, in the simplified problem, each distinct arrangement in the actual problem was counted twice by assuming that the two white balls could be distinguished, and in fact each of these was counted $3! = 6$ times by assuming that the three red balls could be distinguished.

Hence the number of distinct arrangement in the actual problem is $\frac{6!}{2 \cdot 3!} = 60$.


I'm going to assume that by "how many different ways" they mean "how many different orderings."

If all the balls were unique, there would be $6!$ ways to order the six balls. However, this double counts many arrangements, because not every ordering of the six balls produces a unique discernible pattern.

Imagine a simpler example where we had five colors, and that the balls are $Red_1,Red_2,Black,blUe,White,Green$. Given any arrangement of the balls (e.g. $RUGBWR$) we see that switching the two red balls makes the color pattern the same. So $R_1UGBWR_2$ looks identical to $R_2UGBWR_1$. This means that if we list out the $6!$ permutations, we repeat every pattern twice and so the answer is $6!/2$.

Now let's imagine that we have three red balls. Now when we look at the pattern $R_1WGR_2BR_3$ we see that any permutation of the three red balls produces the same pattern. Thus when we list the $6!$ total permutations we have $3!=6$ repeats of each pattern, so the answer is $6!/3!$.

What's going on here in general is that when we have an arrangement of objects, there are some number of ways to permute the objects that doesn't actually change the pattern. These permutations form something called the symmetry group of the arrangement. There's all sorts of cool math regarding symmetry groups, but what maters for problems like this is that we can count how big the symmetry group is, and divide the total number of arrangements by that number to get the number of different arrangements.

So far I've only talked about how to account for one symmetry. In your pattern, there are two different symmetries: that of the white balls and that of the red balls. Since the red symmetry and the white symmetry are totally independent - there are no restrictions on the white symmetry based on the red symmetry and vice versa - we can just multiply the number of symmetries. Thus the answer is $6!/2!/3!=60$ where the first division is for the whites and the second division is for the reds.

In some more complicated settings, there will be an interdependency between how you switch the red and white balls, but you're unlikely to encounter that until you study some group theory (the field of math that studies symmetries of objects).