Applying Inclusion-Exclusion principle

695 Views Asked by At

How to apply principle of inclusion-exclusion to this problem?

Eight people enter an elevator at the first floor. The elevator discharges passengers on each successive floor until it empties on the fifth floor. How many different ways can this happen

The people are distinguishable.

2

There are 2 best solutions below

2
On BEST ANSWER

We have $4^8$ possibilities to do it with out any restrictions. We want to count the bad cases, that is cases where there is a floor which no one get down in. Here you must use inclusion-exclusion.

$A_i=$ number of ways in which no one drops in the $i$ floor.

You need to calculate the cardinality of $X$ where $$X=A_2\cup \cup A_3 \cup A_4 \cup A_5,$$ and your answer is $$4^8-|X|.$$

3
On

Hint: There are $ \sum_{j=0}^k (-1)^{k-j}{{k}\choose {j} }j^n$ ways. k are the number of distinguishable people and n is the number of floors.

The formula can be looked up under the term "twelvefold way" and "Stirling number" (second kind).