Count the number of ways to place the identical balls in distinct bins

combinatoricsdiscrete mathematics

We have $6$ balls and $4$ bins.

a)
Count the number of ways to place the identical balls in identical bins

b)
Count the number of ways to place the identical balls in distinct bins

a) My solution looks like this:

  1. $(6,0,0,0)$

  2. $(2,4,0,0)$

  3. $(3,3,0,0)$

  4. $(5,1,0,0)$

  5. $(2,3,1,0)$

  6. $(2,2,2,0)$

  7. $(4,1,1,0)$

  8. $(3,1,1,1)$

  9. $(2,1,1,2)$ 

And $9$ is the correct answer:

b) However im unsure of to think here. I guess for the first case $(6,0,0,0)$ there’s now 4 different ways to place the balls if the bins are distinct? But how many ways would there be for $(2,4,0,0)$, $(2,1,1,2)$ and so on? Is there a way to think here so that we can solve this problem?

$84$ should be the correct answer for b).

Best Answer

I don't think it is easy to go from (a) to (b) or vice versa (unless the numbers are very small).

Part (b) is much easier. It is solved by stars and bars and has a closed-form solution (in fact, a binomial coefficient).

For part (a), we're talking about integer partitions but with the additional restriction that the number of parts $\le 4$. The wiki article includes the restricted case where the number of parts is exactly $k$, so I suppose you can sum over $k \in [1, 4]$. Anyway, I don't think there is a general solution. Here is a related MSE thread which limits both the number of parts to $\le k$ and the size of each part to $\le d$. So if we set $d=c$ so that each part is unlimited but the number of parts is still limited to $\le k$ then this becomes the OP question.

Related Question