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?
 A: 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)
A: 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}$$
