The Broken Down Elevator

My building has been undergoing renovation, and the elevator has stopped working as intended.
Every time you push a button for a floor that is lower than the floor for which you are on, the elevator will go down exactly 4 floors. However, if you were on the 2nd, 3rd or 4th floor, the elevator will refuse to work since it can't go down exactly 4 floors.
Every time you push a button for a floor that is higher than the floor for which you are on, the elevator will go up exactly 7 floors. Similarly, if you are near the top, the elevator will refuse to work since it can't go up beyond the building.

If every single floor can still be reached (from any other floor, albeit tediously) by pushing some sequence of buttons, what is the minimum number of floors of this building?

Image credit: Flickr Oregon Department of Transportation
12 7 10 15 9 13 11

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.

4 solutions

Discussions for this problem are now closed

Ivan Koswara
Feb 11, 2015

Observe the following cycle of elevator stops: 1 8 4 11 7 3 10 6 2 9 5 1 1 \to 8 \to 4 \to 11 \to 7 \to 3 \to 10 \to 6 \to 2 \to 9 \to 5 \to 1 . This guarantees that all 11 11 floors are reachable.

To see that 10 10 or less floors is not enough, simply look at floor 4 4 (or the highest floor if there are less than four floors). An elevator from the fourth floor cannot go down (to floor 0 0 ?), nor go up (to floor 11 11 ?), so no elevator can go from floor 4 4 .

Thus 11 \boxed{11} floors is the minimum.

I mistook the phrase 'will go up exactly 7 floors' . I thought that if the lift goes up by 7 floors from floor 1 , it will stop at the 9 t h 9^{th} floor with total 7 floors in between.Thus , I ended up marking the answer as 1 2 '12'

Nihar Mahajan - 6 years, 4 months ago

I don't think that is a common interpretation. The implication of your statement is that "going up 0 floors means goes from floor 1 to floor 2".

Calvin Lin Staff - 6 years, 4 months ago
David Vaccaro
Feb 12, 2015

Here's a general proof that if the up elevator goes up a a floors and the down elevator go down b b floors then the minimum building has height is a + b a+b .

W.L.O.G. we can assume a > b a>b if not then we can adopt a similar strategy starting from the top floor.

First ride the up elevator to floor A 1 = 1 + a A_1=1+a and then ride the down elevator as many times as possible to floor B 1 B_1 where 1 B 1 b 1\leq B_1\leq b .

Then ride the up elevator once to floor A 2 = B 1 + a A_2=B_1+a and then ride the down elevator as many times as possible down to floor B 2 B_2 with 1 B 2 b 1\leq B_2\leq b . Continuing this process b b times generates a sequence of numbers B 1 , B 2 , B 3 , B b B_1,B_2,B_3,\dots B_b with 0 < B i b 0<B_i\leq b in each case.

We have that B i 1 + k a m o d b B_i \equiv 1+ka \mod b and since a a and b b are coprime we can show that all of the B i B_i s are different, and are hence some ordering of the set { 1 , 2 , b } \{1,2,\dots b\} . The corresponding sequence of A k A_k s is the some ordering of the set 1 + a , 2 + a , 3 + a , b + a } 1+a,2+a, 3+a,\dots b+a\} and again since a a and b b are coprime these numbers are a complete set of residues modulo b b .

We can show that each floor, k k with 1 k a + b 1\leq k\leq a+b is visited during this cycle of moves, since each number in this range will be congruent modulo b b to one of the A k A_k s and hence visited on the downward journey from that floor. Since we have that B b = 1 B_b=1 , we have found a cycle which takes us to each of the floors, and we are done.

A building of height a + b 1 a+b-1 is not possible since there are no moves from floor b b .

Nice generalization.

From your proof, you can see glimpses of the Chicken Mcnugget Theorem , which is the motivation behind this problem. Of course, in order to reach every floor, we must have gcd ( a , b ) = 1 \gcd (a,b) = 1 .

Calvin Lin Staff - 6 years, 4 months ago

Could we extend that statement to say that g c d ( a , b ) = k \ gcd(a,b) = k where k {k} represents the gaps between the floors that can be reached? (i.e. if g c d ( a , b ) = 2 \ gcd(a,b) = 2 and floor 1 is the starting point then floor 3 is the closest that can be reached)

Curtis Clement - 6 years, 4 months ago

If a a and b b are not coprime and have highest common factor k k then label the storeys of the building in the form "floor.subfloor" in blocks of k k i.e. number the stories 1.1 , 1.2 , 1. k , 2.1 , 2.2 , 2. k , 1.1,1.2, \dots 1.k, 2.1, 2.2,\dots 2.k,\dots .

As a a and b b are multiples of k k each ride on the elevator takes you up or a down a whole number of "floors" but will always leaves the "subfloor" number unchanged.

The number of "floors" travelled up and the number of "floors" travelled down are coprime (as k k is the gcd) so we can apply the previously result to show that if the building has enough "floors" ( a + b k \frac{a+b}{k} ) then any journey between two different "floors" is possible (provided the "subfloor" numbers are the same).

So undoing the relabeling you can show for a sufficiently tall building ( a + b a+b storeys) journies are possible if and only if the storey numbers are equivalent module k k

David Vaccaro - 6 years, 4 months ago

What if the elevator starts from floor 7? Then, it can go to floor 3 ->10 ->6->2 ->9->5->1 ->8 -> 4. The elevator would then be stuck, but the question did not specify that the elevator had to start at floor one, or had to be able to go to all of the floors repeatedly.

Bhagirath Mehta - 6 years, 4 months ago

Your sequence of steps is only in 1 direction. After it reaches floor 4, the elevator will not be able to move.

Calvin Lin Staff - 6 years, 4 months ago
Mustafa Embaby
Feb 12, 2015

The problem is with 1st, 2nd, 3rd and 4th floors as the elevator can't go below them. Thus we must find (minimum) 7 floors above them so the elevator can find a path to move. if we find 7 floors above the 4th floor then absolutely we will find 7 floors above 1st, 2nd and 3rd floors. Then the minimum number of floors is 4 + 7 = 11 4 + 7 = 11 floor .

Nice approach. Thanks.

Niranjan Khanderia - 6 years, 3 months ago
Curtis Clement
Feb 13, 2015

Suppose there are 11 floors. One tactic you could use to access all floors is to start at the top (as the start point isn't specified), go down by 4 twice then up by 7. However, if we have 10 floors, then the 4th floor up is unreachable because there are no elevators that are 7 floors above or 4 floors below.

\therefore M i n i m u m {Minimum} = 11

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...