Number of ways of distributing white and black balls into bowls

111 Views Asked by At

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

2

There are 2 best solutions below

1
On 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.

0
On

In the originally posted question, the original poster suggested that the answer is $~\displaystyle \binom{15}{7}.~$ This is reasonable, because there are $~15~$ positions that the $~7~$ white balls must be assigned to. However, this approach is also wrong, because it wrongly presumes that the order that (for example) the white balls are placed in a bowl is relevant.

For example, if you label the bowl-1 positions as (1a), (1b), (1c), then the $~\displaystyle \binom{15}{7}~$ computation would enumerate as distinct (1a,1b,1c) = (white,black,black), (black,white,black), and (black,black,white).

My approach to this particular math problem, which does not generalize well, will be to categorize the various distributions based on an over-counting-denominator factor that I will assign to each distribution.

Any given distribution may be represented by the ordered 5-tuple $~(v,w,x,y,z),~$ where $~v,w,x,y,z \in \{0,1,2,3\},~$ and $~v + w + x + y + z = 7.~$ Here, $~v,w,x,y,z~$ represent the number of white balls assigned to each of bowl-1, bowl-2, ..., bowl-5, respectively.

For any distribution $~(v,w,x,y,z),~$ if $~k~$ is the count of how many of these 5 variables are in {$1,2$}, then the over-counting-denominator factor assigned to this distribution will be $~\dfrac{1}{3^k}.~$

Therefore, the entire problem reduces to identifying how many of the $~\displaystyle \binom{15}{7} = 6435~$ distributions have $~k = 0, ~k = 1, \cdots, k = ~5.~$

With respect to the problem's constraints, the $~7~$ white balls may be satisfactorily partitioned as:

  • 3-3-1-0-0
    This can happen in $~\displaystyle \binom{5}{2} \times \binom{3}{1} \times 3 = 90~$ ways.
    The over-counting-denominator factor here is $~\dfrac{1}{3}.$
    The adjusted enumeration, for this bullet point is $~30.~$

  • 3-2-2-0-0
    This can happen in $~\displaystyle \binom{5}{1} \times \binom{4}{2} \times 3^2 = 270~$ ways.
    The over-counting-denominator factor here is $~\dfrac{1}{3^2}.$
    The adjusted enumeration, for this bullet point is $~30.~$

  • 3-2-1-1-0
    This can happen in $~\displaystyle \binom{5}{1} \times \binom{4}{1} \times \binom{3}{2} \times 3^3 = 1620~$ ways.
    The over-counting-denominator factor here is $~\dfrac{1}{3^3}.$
    The adjusted enumeration, for this bullet point is $~60.~$

  • 3-1-1-1-1
    This can happen in $~\displaystyle \binom{5}{1} \times 3^4 = 405~$ ways.
    The over-counting-denominator factor here is $~\dfrac{1}{3^4}.$
    The adjusted enumeration, for this bullet point is $~5.~$

  • 2-2-2-1-0
    This can happen in $~\displaystyle \binom{5}{3} \times \binom{2}{1} \times 3^4 = 1620~$ ways.
    The over-counting-denominator factor here is $~\dfrac{1}{3^4}.$
    The adjusted enumeration, for this bullet point is $~20.~$

  • 2-2-1-1-1
    This can happen in $~\displaystyle \binom{5}{2} \times 3^5 = 2430~$ ways.
    The over-counting-denominator factor here is $~\dfrac{1}{3^5}.$
    The adjusted enumeration, for this bullet point is $~10.~$

Sanity-Check
$90 + 270 + 1620 + 405 + 1620 + 2430 = 6435.$

Final Computation
$30 + 30 + 60 + 5 + 20 + 10 = 155 ~$ different ways that the balls can be distributed.