How many ways are there to put 4 balls in 3 boxes if the balls are not distinguishable and neither are the boxes?
We can use the stars and bars formula, which is $\binom{n + k - 1}{k - 1}$. I see. There's only one way to write $4$ as a sum of three positive numbers: $1 + 1 + 2$. Right. But since the numbers are non-negative, we also have to include $0 + 2 + 2$ and $0 + 0 + 4$. The only ways to write $4$ as a sum of two positive numbers are $1 + 3$ and $2 + 2$. Yes. And there's only one way to write $4$ as a sum of one positive number: $4$. So there are a total of $1 + 2 + 1 = 4$ ways to put the balls in the boxes.

