Combinatorics – Number of Ways to Distribute White and Black Balls into Bowls

balls-in-binscombinatorics

This is a self-answer question that repeats this posted question that the original poster deleted themself. I regard the math problem as interesting enough to warrant posting.

I will be very interested to see if someone can post a more elegant approach than my semi-brute-force approach.

The Problem
I have 5 distinguishable bowls, 7 indistinguishable white balls and 8 indistinguishable black balls. A white ball can be distinguished from a black ball. In how many different ways can I distribute the white and black balls so that each bowl gets exactly $~3~$ balls.

Interpretation
I am assuming that the order that the 3 balls are placed in a specific bowl is irrelevant. So, if a bowl has (for example) 2 white balls and 1 black ball, it is irrelevant whether the black ball was placed in the bowl first, second, or third.

Note
I attempted to search MathSE to determine if this was a duplicate question. I couldn't find a question that reproduces a constraint similar to the constraint that each bowl gets exactly $~3~$ balls.

Note
I applied the tag of Combinatorics simply because I didn't know how else to tag the problem.


See my answer

Best Answer

Equivalent Problem

Isn't this simply solving for the number of integer solutions of

$$ x_{1}+x_{2}+x_{3}+x_{4}+x_{5}=7 $$

subject to $x_{i}\leq 3$? Here $x_{i}$ is the number of white balls in bowl $i$.

Solution

Because $4+4>7$, it's not possible to have more than one $x_{i}\geq 4$. Therefore, using stars and bars, then subtracting the case in which one bowl has more than three white balls:

$$ \binom{5+7-1}{5-1}-5\cdot\binom{5+3-1}{5-1}=155 $$

The same as OP's final result.