# Distribute balls

Find the number of ways to distribute $$7$$ red balls, $$8$$ blue ones and $$9$$ green ones to two people so that each person gets $$12$$ balls. The balls of one color are indistinguishable.

My approach: is to partition the balls among these two people in $$\binom{24}{12,12}$$ ways, and then divide by $$2!$$. Unfortunately it's wrong, could you please give me any help?

• That would have been fine if the balls were all distinguishable. You missed the key phrase here... "the balls of one color are indistinguishable." That is to say, if the first person gets five red, five blue, and two green balls... it doesn't matter which specific red balls they were or which blue balls they were etc. All that matters is the quantity of each color. Now... as for "then divide by 2!" you are likely doing this to account for the two people. I disagree with this. Under most interpretations of the problem, when dealing with people they are always distinguishable. May 12 '20 at 17:01
• As a nitpick, $\binom{24}{12,12}$ is uncommon notation. Using the multinomial notation when there are only the two terms is unnecessary. While true that $\binom{n}{k,n-k}=\binom{n}{k}$, the binomial coefficient notation is far more recognizable and uses fewer characters making it easier to read. May 12 '20 at 17:16

## 2 Answers

Hint:

Stars and bars can get you almost there.

Letting $$R,B,G$$ denote the number of red, blue, and green balls that the first person gets respectively, consider the number of non-negative integer solutions to the equation $$R+B+G=12$$ if there weren't a limit on how many balls of each color were available.

Now... among those solutions counted, some were "bad" because we used more of a color than was available. Find how many were bad because we used too many red balls. Find how many were bad because of too many blue, and then the same for green. Correct the count by removing the number of "bad" outcomes to leave the count of only the good outcomes.

(Note: In this problem, is it possible to have taken too many red and blue balls simultaneously? Thankfully not, but if the numbers were different it might have been possible that when trying to subtract the number of bad outcomes we might have accidentally subtracted too much. In that case we may need to apply inclusion-exclusion principle as well)

Without any restrictions,

$$r+b+g=12$$

The number of ways to distribute balls are $$\binom{4}{2}$$

But we have counted ways in which $$g\gt 9$$.

Fix $$9$$ green balls. $$r+b+G=3$$

The number of ways to do this are $$\binom{5}{2}$$

Similarly, in the beginning we counted ways in which $$r\gt 7$$ and $$b\gt 8$$.

$$R+b+g=5$$

$$\binom{7}{2}$$

$$r+B+g=4$$

$$\binom{6}{2}$$

Also, we dont have to worry about ways in which any $$2$$ or all $$3$$ type of balls are greater than $$7,8,9$$.

Finally the answer is

$$\binom{14}{2}-\binom{5}{2} -\binom{6}{2} - \binom{7}{2}$$

• Close, but not quite. Careful that you didn't accidentally count the possibility of getting amounts greater than the available for that color or negative amounts for a particular color (depending on the direction in which your argument went). $\binom{14}{2}$ is the correct count for the number of possibilities of giving a person had there been unlimited red, unlimited blue, and unlimited green available. May 12 '20 at 17:06
• Can you explain with example if possible where I counted negative balls May 12 '20 at 17:07
• Again, it depends on how you are phrasing it. Replacing $7-R$ with $x_1$ and $(8-B)$ with $x_2$ etc... you have the system $x_1+x_2+x_3=12$ which with no other restrictions other than $x_i\geq 0$ you have $\binom{12+3-1}{3-1}=\binom{14}{2}$ possible integer solutions. This included however the possibility of $(x_1,x_2,x_3)=(12,0,0)$ for instance in which case you would have had $12=x_1=7-R$ and so $R=-5$. The solution of $\binom{14}{2}$ completely ignores the bounds on the variables $x_1,x_2,x_3$ or equivalently the bounds of $R,B,G$ May 12 '20 at 17:10
• Thanks for explaining. May 12 '20 at 17:12
• Alternatively, if you had phrased it by moving the variables to the other side, you have $12=R+B+G$ in which case the same logic applies, here in this phrasing you have a way in which you counted having $12$ red balls. It isn't totally clear which you were going for, but it is clear that you had missed accounting for the bounds properly. May 12 '20 at 17:13