# Number of ways to put 2 black, 2 white, 2 red, 2 blue balls in 4 different boxes

Question:

Number of ways to put 2 black, 2 white, 2 red, 2 blue balls in 4 different boxes?

I know that because the colors of the balls are different so the ways are unique For each way to put $$2$$ balls of the same color into $$4$$ boxes.
But I am not sure if I need to divide by 4 or not to avoid unnecessary counting
The answer is $$\binom52\binom52\binom52\binom52$$ (the boxes can be empty)

I am constantly confused when to divide and when not to?
Should I also divide the cases here to avoid unnecessary counting?
Can you help me distinguish when cases need to be divided and when not?

• I had a similar confusion myself too. This post might be helpful to you. Commented Aug 31, 2022 at 9:54
• Is it clear to you in how many ways you can place $2$ black balls (indistinguishable) into $4$ distinguishable boxes? If the answer is $n$ then the final answer to the question is $n^4$. Commented Aug 31, 2022 at 10:02
• Yes, when you simplify it as you mentioned, it does seem clear that it is $\binom52^4$, but my confusion is from that when you divide 4 people into two groups, here you have to divide by 2 because from one division you get the other. So is this the case here as well? Commented Aug 31, 2022 at 10:23

The first way to solve this that comes to (my) mind is just looking one color.

We can place the $$2$$ black balls both in the same box and then there are $$4$$ possibilities.

We can place the $$2$$ black balls in $$2$$ distinct boxes and then there are $$\binom42=6$$ possibilities.

In a more general setup we can rephrase the question as: how many $$4$$-tuples $$(b_1,b_2,b_3,b_4)$$ of nonnegative integers are there that satisfie $$b_1+b_2+b_3+b_4=2$$?

Here we number the boxes and $$b_i$$ denotes the number of black balls placed in box $$i$$.

This you could call a stars and bars problem and the answer is $$\binom{2+3}2=10$$.

So in total we find $$4+6=10=\binom{2+3}2$$ possibilities for one color and we conclude that the final answer is: $$10^4=10000$$

It is not really clear to me what your problems are so I cannot exclude that this does not answer your question. Nevertheless I hope it makes things more clear to you.

• When you break down the calculation into parts, it does seem clear. As I wrote in another comment, my confusion is from that when you divide 4 people into two groups, here you have to divide by 2 because from one division you get the other. But here, everything is even, it doesn't make sense to me that there are no duplicates in my calculation. It is probably due to the fact that the boxes are different in this question Commented Aug 31, 2022 at 10:36
• Well, by placing e.g. $2$ balls having the same color (so indistinguishable) in $2$ distinct boxes you could reason like this: first I place one of the balls ($4$ possibilities) and then the other ($3$ possibilities) giving $4\times 3=12$ possibilities. But now I double counted so must divide by $2$ to repair that. That gives me $6$ possibilities. Using $4C2=6$ instead of $4P2=12$ means actually that this division by $2$ (or actually $2!$) is done already. Commented Aug 31, 2022 at 10:45
• in your last example did you meant 4 balls having the same color? Sorry, the numbers don't add up for me. there is a quistion "what the number of ways to Divide 4 people to two groups. each group have 2 people?" the ansewr is 3 cause In every choice of 2 people you also get the second group "automatically".. this is when i confused all time. i mean in my last example this is $(\binom42)/2$ Commented Aug 31, 2022 at 14:03
• What I said in my last comment dealt with 2 undistinguishable balls that are divided over 4 distinguishable boxes and are are placed in two distinct boxes. It refers to the $\binom42=4C2$ that you also engage in my answer. I am trying to explain that double counting has been neutralized if we use that. This because $4C2=(4P2)/2$. Commented Aug 31, 2022 at 16:07
• Ok, greatly appreciate your answer and help! thank you Commented Aug 31, 2022 at 16:16