How many ways are there to put 4 balls in 3 boxes if the balls are not distinguishable but the boxes are?
How many ways can I put 4 identical balls into boxes A, B, and C?
This is the same as saying how can I distribute 4 pieces of candies to Alex, Bob, and Claire. Since there are no constraints of "at least" how many balls can go to each box, we can use STARS AND BARS to solve this.
A + B + C = 4 and A, B, and C are non-negative.
(4 + 3 - 1) choose (4 - 1) = 6 choose 3 = 20.
There are 20 different ways to put 4 identical balls into 3 distinguishable boxes.
For (3,1,0), there are 3!=6 ways.
For (2,2,0), there are 3 ways.
For (2,1,1), there are 3 ways.
So 6+3+3=15 ways.
Use stars and bars like proyaop said:
There are 4 stars (balls) and 3 - 1 = 2 bars.
So, there are \({4 + 2 \choose 2} = {6 \choose 2} = \color{brown}\boxed{15}\) ways.