Stars, ships, and bars: On the distribution of multiple types of items into distinct boxes

alternative-proofcombinatoricsfake-proofs

I recently came across this question in my textbook:

In how many ways can you distribute $3 ~\text{blue},~ 4~ \text{white}$ and $2~ \text{red}$ balls be distributed into $4$ distinct boxes?

My first thought (and in fact the suggested solution in my textbook) was to apply the principle of Stars and Bars to each of the Colorado and take their composite. The answer would evaluate to $\binom 63\cdot\binom 73\cdot\binom 53 = 7000$, an agreeable number.

However, I figured a more ‘organic’ method would be to derive a more general Stars and Bars for multiple types of objects. The way I went about this was to paraphrase this evaluation as an arrangement of $n-1$ bars and $r_1$ of some object, $r_2$ of another $\dots$, $r_k$ of a $k^{th}$ kind. The number of distinct arrangements of these elements would be $$(n-1+r_1+r_2\dots r_k)!\over (n-1)!r_1!r_2!\dots r_k!$$ or if we were to write the total number of objects $r_i$ as $r$ we have the more shorthand notation $$(n+r-1)!\over (n-1)!\displaystyle\prod_{i=1}^k r_i!$$

But, using this principle on this problem we have $$12!\over 3!3!4!2!$$ which at first glance looks extraordinarily large. In fact it evaluates to over $277000$ which is conceivably less agreeable than $7000$. (Please don’t question the language of “agreeable”).

What is wrong with this approach? (Or is it the earlier approach that is in fact incorrect?)

Best Answer

Your method is almost correct, but you are over-counting some cases. Basically, you choose 9 balls and 3 bars to distribute, with the bars dividing the balls into 4 boxes. This is correct. You then divide by 3,2,3 and 4 factorial to account for the indistinguishability of the balls and bars. However, you neglect to consider that rearrangements within groups also give the same case. For example, consider the following:

BW | RWB | WB | WW

In group 1, whether you wrote BW or WB, doesn’t actually change the groups made. Same with groups 2 and 3. However, it is very hard using this method to eliminate the overcounting, since the group size can vary. The answer of 277000 is correct if the problem asked that the order of colors within the bucket matters, say if it was a line and not a bucket.