Math paradoxes

The elevator paradox Fifteen floors, one lift, and you are on the second. Will the first lift to arrive be going up or down?Down, 13 times out of 14.

All day long a lift runs between floors 1 and 15: it reaches the top, turns round, goes down, and so on without end, always at the same speed. Your office is on floor 2. You walk out to the lift whenever you like, without looking at the clock, and note which way the first lift to reach your floor is going. What will you see more often: up, down, or both equally?

It seems the lift goes up as often as down, so it should be 50/50. But only one of the fourteen gaps between floors is below you. When you press the button the lift is almost always somewhere above you, and from there it can only reach you coming down. So the first lift is going down 13 times out of 14. With several lifts the bias weakens, but it does not vanish at once.

Make a guess
13/14first lift goes down
85/98the same with two lifts
50%on floor 8, the middle one
The puzzle

A building, a lift and your second floor

This puzzle came from two physicists who worked in the same building on different floors and rode the same lift every day. First picture the building and your floor, then make a guess.

  1. 1

    The building

    Fifteen floors and one lift. It runs non-stop from floor 1 to floor 15 and back, always at the same speed, and turns round instantly at the end floors.

  2. 2

    You

    Your office is on floor 2. You walk out to the lift at random moments: when you finish an email, when you want a coffee. When you go out has nothing to do with where the lift is right now.

  3. 3

    What you note

    You stand by the doors and wait until the lift reaches your floor. You write down one thing: which way it was going when it came, up or down.

  4. 4

    The question

    After many days, which will your notes show more often: "up", "down", or both equally?

Intuition says

"The lift goes up and down equally, so it will be 50/50"

The lift really does spend exactly half its time going up. But from floor 2 you do not see its whole route, only the first arrival after you walk out. And 13/14 of the time the lift is above you, and from there it comes down.

Assumptions

  • The lift does not stop at floors (or the stops are so short they can be ignored).
  • Its speed is steady, with no speeding up or braking.
  • You arrive at a random moment, without knowing where the lift is.
  • We count the lift's direction when it reaches your floor.
Round 1 · Guess

Which way is the first lift going more often?

15 floors, one lift with no stops, you are on floor 2 and arrive at a random moment. Pick your answer.

The first lift on floor 2 is more often going…

A breakdown of your answer will appear here.

Hints

Hard to decide? Open the hints one at a time: the easy one first, then stronger ones.

Round 2 · Game

Lift roulette: ten buildings, ten bets

Each round brings a new building: a different number of floors, a different floor for you, one to six lifts running independently of each other. You cannot see where they are now. Guess which way the first lift to reach you will be going, and pick a stake. A careful bet: +1 point if you are right, 0 if not. A bold one: +2 or −3. Bold bets only pay when you are at least 75% sure. Alongside you plays a bot that knows the exact odds.

The game opens after your answer in round 1

It quickly shows how things really are, so make your own guess first.

Round –You 0Bot 0
Careful+1 / 0 Bold+2 / −3

Your rounds

Round 3 · Simulation

Any floor, any number of lifts

The simulation "walks out to the lift" thousands of times on every floor: it puts each lift at a random point of its route, heading a random way, and checks which one reaches you first and which way it is going. The dots are the share of "down" in the simulation. The dashed line is the exact answer for one lift, the solid line the exact answer for the chosen number of lifts, if they run independently.

simulation exact, chosen number of lifts exact, one lift (dashed) your floor (vertical)
Simulation on your floor
–
Exact for this number of lifts
–
Exact for one lift
–
Largest gap between simulation and formula over all floors
–
Round 4 · Why

The lift is fair, but you are not looking from everywhere

The lift spends exactly half its time going up, and it passes your floor up and down equally often: once each way. The bias is not in the lift but in the way you catch it.

In plain wordspictures, analogies, small numbers

“In plain words” is hidden on all puzzles.

Where the lift is when you press the button

One gap below you, thirteen above

There are 14 gaps between floors 1 and 15. Only one of them, between floors 1 and 2, is below you. The lift moves evenly, so at a random moment it is somewhere above you with probability 13/14. And from there it has only one way to reach you: from above, going down. Whichever way it is heading now, up or down, it will arrive at your floor going down. This card is about one lift. Why the bias weakens with several lifts is explained by the cards below.

The route as a loop

The long arc leads down, the short one up

Unroll the lift's route into a loop: the left side is the way up, the right side the way down. Your floor appears on the loop twice: the lift passes it once going up and once going down. If the lift is on the long arc when you walk out, it reaches the "down" point first; if on the short arc, the "up" point. The chance is simply the length of the arc.

Upstairs it is the other way round

Your floor decides what you see

Floor 213/14first lift going down
Floor 8, the middle1/2equally
Floor 1413/14first lift going up

A neighbour on floor 14 of the same building sees the opposite: the first lift is nearly always going up, because there is only one gap above them. Both are right, and both are watching the same lift. That is how this puzzle began: two physicists on different floors comparing which of them was the "unlucky" one.

Rigoroustables, charts, formulas

“Rigorous” is hidden on all puzzles.

One lift

The share of time above you

P(down) = (N − k) / (N − 1)

N is the number of floors, k your floor. A full round trip up and down takes 2(N − 1) gaps. For 2(N − k) of them the lift is above you (on the way up and on the way down), and from any such point it reaches you going down. For the other 2(k − 1) it is below you and comes up. Divide: (N − k)/(N − 1). For floor 2 of 15: 13/14 ≈ 92.9%. For Gamow's floor in the 1958 puzzle, floor 2 of 7: 5/6.

Several lifts

A window where up and down are equal

P(down) = 1/2 + 1/2 · (1 − 2x)n, x = (k − 1)/(N − 1)

A lift that is below you now reaches you going up within 2(k − 1) gaps: for floor 2, within 2. Look at the first 2 gaps of time after you walk out. During that time each lift arrives going up with the same chance as going down, so if someone arrives in this window, up and down are equally likely. If nobody does (chance (1 − 2x)ⁿ, for floor 2 of 15 that is (6/7)ⁿ), all the lifts are above you and the first one is surely going down. Together: 1/2 · (1 − (6/7)ⁿ) + (6/7)ⁿ. For two lifts 85/98 ≈ 86.7%, for three ≈ 81.5%.

A table for 15 floors

The chance the first lift is going down

Below the middle the first lift is more often going down, above it going up, and on floor 8 it is exactly 50% for any number of lifts. The more lifts, the closer every row gets to 50%, but on floor 2 even with four lifts "down" comes up three times out of four.

For formula lovers

The general answer for any floor

Your height as a share of the building: 0 is the bottom floor, 1 the top. On floor 2 of 15, x = 1/14.

x=k−1N−1,P1=1−x=1314

n lifts, each at a random point of its trip. The absolute value is there for floors above the middle: there (1 − 2x) is negative and the answer drops below 1/2.

Pn=12+12(1−2x)|1−2x|n−1

For floor 2 of 15 and two lifts:

P2=12+12·(67)2=85/98≈0,867

The page checked the formula in round 3 on every floor and for 1–10 lifts. As n grows, (1 − 2x)ⁿ tends to zero and the answer to 1/2. But slowly: on floor 2 of 15 it takes 15 lifts to get below 55%.

Deepergeneralisations, theory, history

“Deeper” is hidden on all puzzles.

History · Gamow, Stern and Knuth

"Will, of course, remain the same". No

The physicists George Gamow and Marvin Stern described this puzzle in their book "Puzzle-Math" (1958). In their story Gamow worked on floor 2 and Stern on floor 6 of a seven-storey building. Gamow complained that the first lift was usually going down, Stern that it was usually going up. The book's explanation is the same as ours: for floor 2, 5 of the 6 gaps are above, so 5/6.

For several lifts the authors wrote that the situation "will, of course, remain the same". In 1969 Donald Knuth showed in "The Gamow-Stern Elevator Problem" (Journal of Recreational Mathematics, vol. 2, pp. 131–137) that this is not so: the more independent lifts, the closer the chance gets to 1/2. For two lifts on Gamow's floor it comes to 13/18, not 5/6.

Real lifts

Stops, parking downstairs, a clever dispatcher

Our model is deliberately simple. Real lifts stop, sit idle, and often return to the ground floor, because most people board there. In the evening everyone goes down, in the morning up. On the lower floors some people take the stairs, and a full car may pass your call. And several lifts in a building are run by one controller that deliberately spreads them along the shaft, so they are not independent as in Knuth's formula.

So the exact numbers for your office will differ. But the cause of the bias is geometric and does not go away: if the lift spends most of its time above you, it more often comes from above. Near the bottom floor you see "down" more often, near the top "up".

Round 5 · Scaling up

More lifts, a different vantage point, your morning at the office

Mathematically: how fast the bias fades when there are many lifts. Logically: the same trap as in the bus paradox and the friendship paradox — what you see depends on where you look from. Practically: why the lift is "always going the wrong way", yet you do not wait any longer than anyone else.

Mathematics

How many lifts until it is 50/50

One lift–
Lifts until the bias is under 5 points–

n lifts, any floor

The bias melts like a power

The departure from 50% equals 1/2 · |1 − 2x|ⁿ: every lift you add multiplies it by |1 − 2x|. Near the middle of the building this factor is small, and two or three lifts already give nearly 50/50. Near the edge it is close to 1: on floor 2 of 15 it is 6/7, so the bias melts slowly, and it takes 15 lifts to get below 55%. On the end floors the question loses its meaning: at floor 1 the lift always arrives from above and leaves going up.

This formula is for independent lifts. If the lifts run at even intervals, like buses on a timetable, the answer is different again and depends on the interval. For example, four evenly spaced lifts on floor 2 give "down" 5 times out of 7 (71.4%), while four independent ones give 77%.

Logic

The lift's diary and yours

Where you stand decides what you see

A fair sample, an unfair spot

The chart is the lift's height over time: a saw from floor 1 to 15 and back. The horizontal line is your floor. The lift crosses it up and down equally often, so the lift's diary says "50/50". But you only note the first crossing after a random moment. And random moments land more often in the long stretch between passing up and passing down.

It is the same trap as in the bus paradox: arriving at random, you more often land in long gaps between buses. And the same as in the friendship paradox: looking at people through friends, you more often meet those who have many friends. Each time the sample is honest, but the spot you look from decides what gets into it.

Practice

"Wrong way again". But how long do you wait?

bars: first lift going down (0–100%) dots: wait for a lift going up (0–40 s), dashed: exact
First lift going down–
Wait for a lift going up, on average–

The lift your way is not late

You see the "wrong" lift, but you do not wait longer

Say the lift passes a floor every 2 seconds. A round trip of a 15-storey building is 28 gaps, 56 seconds. The lift going up passes your floor exactly once per trip, so arriving at random you wait for it half a trip on average: 28 seconds. On any floor. With n independent lifts it is 56/(n + 1) seconds, again on any floor. The feeling "it is always going the wrong way" on floor 2 is true about the first lift but not about the wait: you just more often see first a lift you do not need.

The same goes for a route with one shuttle bus, say between a terminal and a car park, 10 minutes each way. At a stop one minute from the car park, the first bus you see is heading to the car park 9 times out of 10. Your bus, away from the car park, comes after 10 minutes on average, just as at any other stop. On a metro line with many trains on a timetable there is hardly any bias, as with many lifts: there trains in both directions come equally often.

Bonus · Fun facts

Things to tell your friends

1958

A book by two physicists

The puzzle appeared in George Gamow and Marvin Stern's book "Puzzle-Math" (Viking Press, 1958). Gamow is also known as the author of popular physics books, among them "One Two Three… Infinity".

5/6

Gamow's floor

In their story Gamow sat on floor 2 of a seven-storey building and Stern on floor 6. With one lift, the first arrival at Gamow's floor is going down 5 times out of 6, and at Stern's going up with the same chance.

1969

Knuth corrects the physicists

Donald Knuth, author of "The Art of Computer Programming", published "The Gamow-Stern Elevator Problem" in the Journal of Recreational Mathematics (vol. 2, 1969). It was reprinted in his collection "Selected Papers on Fun and Games" (2011).

13/18

Two lifts in Gamow's building

With two independent lifts the first lift at Gamow's floor is going down with chance 13/18 ≈ 72%, not 5/6 ≈ 83% as the book's authors believed. The page works this out with the same formula as in round 4.

15

Lifts to near 50/50

On floor 2 of a 15-storey building, 14 independent lifts still give "down" 55.8% of the time. Only with the 15th lift does the chance drop below 55%, to 54.95%.

1986

Lifts in Martin Gardner

Martin Gardner devoted a whole chapter, "Elevators", to lifts in "Knotted Doughnuts and Other Mathematical Entertainments" (1986), and went through the surprises the puzzle brings when there are several lifts.

Discussion

What do you think?

Share your own explanation, an objection or a variant of the puzzle. You need a GitHub account to comment.

Is “School maths” the right level for this puzzle?

Thank you! This helps set the levels right.

Newsletter

New puzzles, explanations and discussions

I keep adding new puzzles, new ways to explain them and write-ups of the discussions they start. Leave your email and I'll write when something new is out. No spam, one-click unsubscribe.

The sign-up form will appear here soon.