0
$\begingroup$

Say we have 5 distinct items and 2 distinct boxes, none of which can be empty. There are $2^5$ ways to arrange them, but accounting for scenarios where all balls are in one box, we subtract 2, as there are two ways for this scenario to occur.

However, say we instead kept our 5 distinct items and added a new distinct box, so 3 of them, and none may be empty. Following this same method, how would we calculate the number of valid arrangements, starting with the $3^5$ total options and removing the invalid ones?

2 Answers 2

1

This problem can be solved more generally, it is one of the problems that appears in the twelvefold way problem.

In general if you have $k$ boxes and $n$ objects then there are ${n\brace k} k!$ ways to place the objects. Note that $n\brace k$ denotes the stirling number of the second kind.

  • 0
    Yes, I have looked at the Stirling number formula, but I am just wondering if there is perhaps a more intuitive way at looking at a smaller example like this one. I'd like to understand how and why a small example works so that a more complex example will later makes more sense. Thank you!2017-01-26
1

Case 1 - Only 1 bin is empty.

Let we have all balls in bin 1 and bin 2. And bin 3 is empty. Then we have $2^5$ ways.

But its not necessary that empty bin is always bin 3. It may be bin 1 or bin 3.

So we have total cases $3 × 2^5$.

Case 2 - Two of them empty.

Let all balls in bin 1. And bin 2 and bin 3 empty. So we have $1^5 = 1$ way.

Again its possible that all balls in bin 2 or bin 3.

So we have total cases $3 × 1 = 3$ cases.

Total cases where no bin can be empty = $3^5 - 3 × 2^5 - 3$