# F floors and p passengers problem There exists an elevator which starts off containing p passengers

Kyla Ayers 2022-06-24 Answered
F floors and p passengers problem
There exists an elevator which starts off containing p passengers.
There are F floors.
$\mathrm{\forall }i:{P}_{i}=$ (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}-\left(\genfrac{}{}{0}{}{F}{1}\right)\cdot {\left(F-1\right)}^{p}+\left(\genfrac{}{}{0}{}{F}{2}\right)\cdot {\left(F-2\right)}^{p}-...+\left(\genfrac{}{}{0}{}{F}{F-1}\right)\cdot {1}^{p}}{{F}^{p}}$
Now how to proceed from this point?
You can still ask an expert for help

## Want to know more about Discrete math?

Expert Community at Your Service

• Live experts 24/7
• Questions are typically answered in as fast as 30 minutes
• Personalized clear answers

Solve your problem for the price of one coffee

• Available 24/7
• Math expert for every subject
• Pay only if we can solve it

## Answers (2)

Tianna Deleon
Answered 2022-06-25 Author has 29 answers
Step 1
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.
Step 2
It can be written as $P=\frac{F!\phantom{\rule{thinmathspace}{0ex}}S\left(p,F\right)}{{F}^{p}}.$
where S are the Stirling number of the second kind.

We have step-by-step solutions for your answer!

Fletcher Hays
Answered 2022-06-26 Author has 6 answers
Step 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.
Step 2
You could, however, learn to condense your expression to
$\left(\frac{1}{{F}^{P}}\right)\sum _{i=0}^{F}\left(-1{\right)}^{i}\left(\genfrac{}{}{0}{}{F}{i}\right)\left(F-i{\right)}^{P}$
although it may appear more intimidating!

We have step-by-step solutions for your answer!

Expert Community at Your Service

• Live experts 24/7
• Questions are typically answered in as fast as 30 minutes
• Personalized clear answers

Solve your problem for the price of one coffee

• Available 24/7
• Math expert for every subject
• Pay only if we can solve it