Five people get on the elevator that stops at five floors. In how many ways they can get off? Five people get on the elevator that stops at five floors. In how many ways they can get off? For example, one person gets off at the 1st floor, two will get off at the third, and the remaining two at the fifth floor. In how many ways they can get off at different floors? Now, consider that people in elevator have names, say A,B,C,D and E., assuming that, for example, the case A on the 1st floor is different from the case B on the 1st floor. Answer the previous questions with this assumption.
I was told that there are 4 questions, but I'm not really sure about it. 


*

*People don't have names and get off 

*People don't have names and get off at different floors 

*People have names and get off 

*People have names and get off at different floors.


Do the names matter? 
I think I can answer one question out of 4 - the number of all outcomes should be $5^5=3125$. I am confused about the rest though
 A: *

*This has been answered in other answers: ${9\choose4}$.

*Since there are $5$ people and $5$ floors there is just $1$ way for them to get off at different floors: $1$ per floor.

*You already found $5^5=3125$.

*At each floor exactly one of $A$, $\ldots$, $E$ gets off. This can be done in $5\cdot4\cdot3\cdot2=5!=120$ ways.
A: For the first question, use the basic 'stars and bars' method.
We can represent your example scenario ("For example, one person gets off at the 1st floor, two will get off at the third, and the remaining two at the fifth floor.") as:
$$*||**||**$$
The people are the 'stars' and the separators between the different floors are the 'bars'.
Another example: one person getting off on each floor would be:
$$*|*|*|*|*$$
And everyone getting off on the 3rd floor would be:
$$||*****||$$
See how this works?
Now, with $4$ 'bars' to divide the people into the $5$ groups/floors, and those bars taking up $4$ of the $9$ possible positions in this 'symbol string' of bars and stars, you get 
$$9 \choose 4$$ 
possibilities.
A: The question could also be solved using a well known formula derived from stars and bars which is; $$\dbinom{n+r-1}{r-1}$$ where we distribute $r$ equally accepted objects to $n$ spaces with or without restrictions like $\geq1$ or $\leq9$, this formula is also used for solving linear equations (in integers) that's why this works for combinatoric problems, so without making it longer;$$x_1+x_2+x_3+x_4+x_5=5$$ so we apply the formula, we can think that this is equivalent to distributing five equally accepted apples to five  children for instance, the result is $$\dbinom{5+5-1}{5-1}=126$$ this statement could be proven using alternate ways, we should open a post about it too.
