Five balls are to be placed in three boxes, where each box can contain up to five balls. Find the number of ways if no box is to remain empty.

#### Solution

Let boxes be named as I, II, III

Let sets A, B, C represent cases in which boxes I, II, III remain empty

Then A ∪ B ∪ C represents the cases in which at least one box remains empty.

Then we use the method of indirect counting

Required number = Total number of distributions – n(A ∪ B ∪ C) ...(i)

n(A ∪ B ∪ C) represent the number of undesirable cases

Total number of distributions

= 3 × 3 × 3 × 3 × 3

= 3^{5}

= 243 .......(ii)

n(A ∪ B ∪ C) = n(A) + n(B) + n(C) – n(A ∩ B) n n(B ∩ C) – n(C ∩ A) + n(A ∩ B ∩ C) ...........(iii)

In box I is empty then every ball has two places (boxes) to go.

Similarly for box II and III.

∴ n(A) + n(B) + n(C) = 3 × 2^{5} .....… (iv)

If boxes I and II remain empty

then all balls go to box III

Similarly we would have two more cases.

∴ n(A ∩ B) + n(B ∩ C) + n(C ∩ A)

= 3 × 1^{5} ..........(v)

n(A ∩ B ∩ C) = 0 .......(vi) .........`[("as all boxes"),("cannot be empty")]`

Substitute from (iv), (v), (vi) to (iii) to get

n(A ∪ B ∪ C) = 3 × 2^{5} – 3 × 1^{5}

= 96 – 3

= 93

Substitute n(A ∪ B ∪ C) and from (ii) to (i),

we get

Required number

= 243 – 93

= 150