Sunday, 20 November 2016

Formula for escalator steps

Here's my solution to the escalator problem in my previous post.

Per minute, I climb n steps and the escalator moves along by s steps. So relative to the bottom of the escalator I am travelling at the rate of n + s steps per minute.

If there are p 'visible steps' on the escalator and I take t minutes to get to the top, then t = p/(n + s).

But in t minutes I actually climb nt of the moving steps. This is the variable I call m, the actual number of steps that I take in getting to the top.

So m = nt = np/(n + s).

So below is my formula!

m = np/(n + s).

I must admit I never expected it to be as complicated as this.

To understand this formula, think of it as saying that the proportion of visible steps I climb is the ratio of my speed (n) to the sum of my speed and the speed of the escalator (n + s).

For example, if the escalator has 30 'visible steps' and is moving at 90 steps per minute, my speed is 120 steps per minute, then the proportion of the 30 steps I will tread on will be 120/210, or 4/7 of them, which is about 17.

If you plot m  against n, from n = 0, you get a curve that starts at the origin (m = 0) and tends to p as  n tends to infinity.

When n = s, notice that m = s/2, which makes sense intuitively: if I climb at the same rate as the escalator is moving I will cover half the steps before I get to the top.

Note also that as n increases the gain in my step count decreases. For example, with a 30-step escalator, and a speed of 90 steps rising per minute ...

When n = 0, = 0

When n = 60, m = 12

When n = 120, = 17

When n = 180, = 20

When n = 240, = 22

When n = 300, = 23

It's intriguing to think about how the graph behaves for values of n less than zero down to n = –s. These values of n correspond to walking down the escalator when it is going up. Provided you walk down slower than the escalator is going up, then you will get to the top! The number of steps you take, m, will turn out to be negative because you are walking down the escalator.  If you walk down as fast as the escalator is going up (n = –s) then the formula involves division by zero, which is impossible: you never get to the top. In fact, you never get anywhere.

You can have even more fun now, by thinking about how the formula works for climbing up an escalator going down!


  1. Nice it seems to be good post... It will get readers engagement on the article since readers engagement plays an vital role in every blog.i am expecting more updated posts from your hands.
    Cloud Computing Training in Chennai