How many ways to put balls in buckets?

1.1k Views Asked by At

Given are $k=5$ balls that we need to put in $n=3$ buckets. How many different results are there in each of the following case? (Empty buckets are allowed)

a) Balls and buckets all have different labels.

b) All buckets have different labels but balls have no labels.

My try:(without considering empty buckets)

a) $8!$ as all are different

b) $$ \binom{8}{3} $$

How to approach it with empty buckets?

1

There are 1 best solutions below

2
On

a) For every ball, we have $3$ choices for where it will go, for a total of $3^5$.

b) Look at Stars and Bars (Wikipedia). Your expression has the right basic shape, but is not quite correct. You want the number of solutions of $x_1+x_2+x_3=5$ in non-negative integers.