An elevator starts with 10 people on the first floor of an 8 story building and stops at each floor. In how many ways can all the people get off the elevator?

The only way I can think to do this is a case by case for each floor but that seems extremely messy for examples: all 10 get out on first floor, then all 9, but then the ways the remaining 1 can get out on the the next 6 floors... etc. Is there a better way to do this?

  • 1
    $\begingroup$ so $7^{10}$? I must be way overthinking this $\endgroup$ – user219081 Jun 12 '15 at 22:50
  • 1
    $\begingroup$ Depends on the convention of naming floors. But if there are $7$ floors above the first, and people are distinguishable, then it is $7^{10}$. $\endgroup$ – André Nicolas Jun 12 '15 at 22:57
  • $\begingroup$ The only real question at hand is that little anecdote of whether an $8$ story building means $8$ floors where each person can leave or $7$ floors where each person can leave. $\endgroup$ – barak manos Jun 12 '15 at 23:02

look up "stars and bars" - you are placing 10 balls in 7 boxes ( unless you really want people to be able to get out on the first floor, in which case you have 8 boxes )

Most likely the question intends that you think of "a way" as 6 people getting out on the 4th floor and 4 people getting out on the 5th floor and is not making the distinction about exactly which people are getting out on every floor.

If we go with 7 floors we will have 8 bars separating the floors, and we must arrange 10 stars representing people getting out. so the example above would be represented as ...

floor #  2 3     4       5   6 7 8
        | | | ****** | **** | | | |

You must keep the first and last bars in the first and last positions, but other than that, any arrangement of 10 stars and 6 bars corresponds to a possible scenario the number of arrangements is

$$ \frac{16!}{10! 6!} = \binom{16}{6} $$

if you really wanted to let people out on the first floor the answer would be $\binom{17}{7}$


Any of the $10$ people can get off at any floor. So you have ten variables that can assume values from $1$ to $8$, therefore $8^{10}$ possibilities.

  • $\begingroup$ If they can't get off at the first floor, it's $7^{10}$ as you said in the comment $\endgroup$ – AnalysisStudent0414 Jun 12 '15 at 22:54
  • $\begingroup$ It's not specified! GRRR! $\endgroup$ – user219081 Jun 12 '15 at 22:54
  • $\begingroup$ Where do you live? In my country the ground floor is "zero floor" (therefore it would be $8$), if in yours the ground floor is the first one then assume $7^{10}$ $\endgroup$ – AnalysisStudent0414 Jun 12 '15 at 22:55
  • $\begingroup$ Even if the ground floor is the zero floor, the problem says it's an 8-story building, so the floors are numbered 0–7. Alyssa, you are allowed to write on your homework paper “I assume that the 8-story building has a ground floor plus 7 numbered floors.” and then solve the problem under that assumption. You should get full marks even if the person who wrote the problem imagined that it was a ground floor plus 8 additional floors. $\endgroup$ – MJD Jun 12 '15 at 23:02
  • 2
    $\begingroup$ I ended up writing both scenarios since I wasn't sure. We will see $\endgroup$ – user219081 Jun 12 '15 at 23:03

I've been thinking about this problem recreationally for a while. I took combinatorics a couple years ago but I derived the stars/bars formula I learned from just thinking about it.

10 people = 10 stars 6 floors = 5 bars

(10 + 6) choose 5 = 16 choose 5

I thought I had the solution this morning, but what about when you give each person a unique name? For simplicity, let names just be capital letters A through J (10 names).

I first thought it would be (16 choose 5) * 10!, with the 10! being the permutation of letters A through J, but then I realized that for example:

If we let | denote the bars (floor separators), then

A B | C D | E | ... etc is the same as

B A | D C | E | ...

I'm not sure how to not overcount. Anyone have any thoughts?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy