[Math] How many ways are there to put 6 identical balls to 3 distinct bins such that no bin is empty

combinationscombinatoricspermutations

How many ways are there to put 6 identical balls to 3 distinct bins such that no bin is empty ?


I tried to solve by stars and bars problem. As it is saying that no bin is empty, means every bin must have atleast one ball.

After, putting one ball in each I am left with three balls. So left 3 balls can be put in C(5,2).

But, the answer is 540. Where am i going wrong ?

Best Answer

The count of distinct ways to distribute 6 identical balls among 3 distinct bins is indeed: $$\binom{3+2}{2} = 10$$

The count of distinct ways to distribute 6 distinct balls among 3 distinct bins is: $$3^6- \binom{3}{1}2^6+\binom 3 2 1^6 = 540$$