[Math] Number of ways of distributing k balls of different colors (all balls of each color indistinguisable) into n bins.

combinatorics

I have a question that I have not been able to find the answer to. Suppose I have balls of $k$ different colors (the balls of each color indistinguishable), $a(j)$ of each color for $j \le k$ . How many ways can I distribute those balls (i.e., the sum of the $a(j)$ ) into $n$ distinguishable bins? Most balls to bins problems assume that there is only one color, sometimes limiting the maximum number of balls allocated to a given box.

I have looked at binomial type generating functions to no avail (for the general case), and the "twelvefold way" stars and bars approach, but no luck. I understand the Polya/Burnside approach might work, but haven't been able to formulate the problem precisely. Can anyone provide solution or point me in the right direction?

Best Answer

You can regard each color as a separate stars-and-bars problem, then multiply the answers. If there are $n$ ways to distribute the blue ones and $m$ ways to distribute the red ones, there are $nm$ ways to distribute the two colors. This works as long as the distribution of one color does not restrict the distribution of any other color.

Related Question