Combinatorics - distribution of objects into boxes

171 Views Asked by At

there are 7 Red balls, 8 Yellow balls, and 9 green balls. We need to distribute these objects between two people such that each gets 12 balls(colors does not matter).

my Approach for problem:
there are three distinct objects: { 7-RedBalls, 8-YelloBalls, 9-GreenBalls}
Total Objects : 24
Number of People(Boxes): 2
Hence, trying to solve for number of integral solution for x1+x2 = 24
that is $\binom{2+24-1}{24}$
but I doubt this is not the correct approach as the balls are distinguished with colors.

Please Help

Thank you

1

There are 1 best solutions below

0
On

If balls are distinguishable by color only then the first man can chose balls in $$w = \sum_{i = 0}^7 \sum_{j = 0}^8 [12 - 9 \le i + j \le 12]$$ ways, where $[P]$ is $1$ if $P$ is true and $0$ otherwise. Here $i$ is the number of red balls and $j$ is the number of yellow balls taken by the first man. Conditions on $i + j$ guarantees that there are enough green balls for sum $12$ and sum wouldn't exceed $12$. The second man gets all remaining balls in the only way. So we can compute the desired number: $$w = \sum_{i = 0}^7\sum_{j} [0 \le j \le 8]\cdot [3 \le i + j \le 12] = \sum_{i = 0}^7\sum_j [\max \{\,0, 3 - i\,\} \le j \le \min \{\,8, 12 - i\,\}]\\ = \sum_{i = 0}^7 \min \{\,8, 12 - i\,\} - \max \{\,0, 3 - i\,\} = 6 + 7 + 8 + 9 + 9 + 8 + 7 + 6 = 60.$$ P. S. I don't see more elegant solution, but it may exist.