1

There exists an elevator which starts off containing $p$ passengers.

There are $F$ floors.

$\forall i: P_i = $P(i. passenger exists on any of the floors) = $1/F$.

The passengers exit independently.

What's the probability that the elevator door opens on all floors?

Reasonable assumption: elevator stops on at least one of the floors.

Number of all configurations: $F^{p}$.

It arises as the implication that any of the passengers can exit on any of the floors.

Number of favorable configurations will be the difference between the number of all configurations and the number of ways that at least one of the floors are skipped.

Therefore the probability in accordance with the principle of inclusion-exclusion:

$\frac{F^{p} - \binom{F}{1}\cdot \left( F - 1\right)^{p} + \binom{F}{2}\cdot \left( F - 2\right)^{p} - ... + \binom{F}{F - 1}\cdot 1^{p}}{F^{p}}$.

Now how to proceed from this point?

N. F. Taussig
  • 76,571
  • Related (practically dup): https://math.stackexchange.com/questions/26528/m-balls-n-boxes-probability-problem – leonbloy Feb 19 '22 at 14:08

2 Answers2

3

The problem is equivalent to the following (slightly neater) formulation: we place $p$ balls in $F$ urns, with uniform probability; which is the probability that all urns are occupied?

Your approach and your solution is fine.

It can be written as

$$ P = \frac{F! \, S (p,F)}{F^p}.$$

where $S$ are the Stirling number of the second kind.

leonbloy
  • 63,430
1

I prefer the approach you adopted, as you do not need recourse to a Stirling table, and in a way the formula you use is more basic.

You could, however, learn to condense your expression to

$$\left(\dfrac1{F^P}\right)\sum_{i=0}^{F}(-1)^i\dbinom{F}{i}(F-i)^P$$

although it may appear more intimidating !