Seven distinct people enter a lift. The lift stops at three (unspecified) floors. At each of the three floors, no one enters the lift, but at least one person leaves the lift. After the three floor stops, the lift is empty. In how many ways can this happen?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Let's call the floors A, B and C and number the persons from 1 to 7. Then, we have to count the number of maps f : { 1 , 2 , 3 , 4 , 5 , 6 , 7 } → { A , B , C } such that each value A, B and C is taken at least once (i.e., surjective functions). Using inclusion-exclusion principle, the total number of maps is 3 7 , those which avoid one specific value are 2 7 , those which avoid two specific values are only one (the constant function taking the third value). Since there are 3 subsets of { A , B , C } with 1 element and 3 subsets with 2 elements, we get that the number is 3 7 − 3 ⋅ 2 7 + 3 ⋅ 1 = 1 8 0 6 .