# Mr. Allen at the Mall

Mr. Woody Allen is standing at one of the three entrances (A) of a 5 story Manhattan Mall.

He needs to go from A to the other end (small shop) on the 4th floor at location (X). Ground floor is First floor in US.

And he hates malls so he wants to get there as fast as possible.

What is the fastest way (timewise) for Mr. Allen to get from A to X?

Provided below is the schematic of the Mall-not to scale. The Mall has 5 floors, each one 20 units tall. A, B and C are the 3 entrances. Distances are shown. Means of transportation and speeds are as follows:

Walking: Mr. Allen walks at an average speed of 1 unit per second and he also has average speed of 1 step (up or down) per second Stairs: There are 2 stairs. The Staircase at entrance A and at location E (50 units away from entrance C). Each staircase goes all the way to the fifth floor. There are 30 steps per floor (120 steps total). You can get on or off on any floor.

Mr. Allen has an average speed of 1 step per second (up or down). However, it is easier for him to go down the stairs so he is one second faster per floor going down.

Escalators: There are 3 Escalators all starting at the ground (first) floor.

Escalator 1 starts at location F (100 units away from A) and ends on the third floor at location H (66 units away from the stairs) YOU CANNOT GET OFF ON THE SECOND FLOOR.

Escalator 2 starts at location G (140 units away from A) and goes to fifth floor to location T, where you can get off. YOU CANNOT GET OFF ON ANY OTHER FLOORS (EXCEPT FIFTH OF COURSE).

Escalator 3 starts at location B (at the second entrance) and goes to the THIRD floor to location Z which is 125 units away from the stairs at E3. AGAIN THE ESCALATOR DOES NOT STOP ON THE SECOND FLOOR. All escalators run at a speed of 1 unit per second.

Automated Walk-ways (like you see at the airport): There are 2 of them. The one on the 4th floor goes from the middle point of the building M to the end X. IT DOES NOT HAVE EXIT ANYWHERE IN BETWEEN. ONCE YOU ARE ON IT, AT M, YOU MUST GO TO X. Of course he can walk next to the walk-ways in either direction. This Walk-way MX is slower and runs at 0.5 units per second

The second automated Walk-way starts at one end of the building (L) on the fifth floor and goes all the way to the other end of the building (O) –the whole 500 units. YOU CAN ONLY GET ON OR OFF AT L, N (MIDDLE OF THE BUILDING) OR AT O. This Walk-way LNO is faster and runs at 1 unit per second.

Elevators: There are 2 of them IK and DQ. IK goes from Floor 3 to 4 to 5 (or back) and is 100 units away from end of the building.

DQ goes from Ground floor to the 5th floor and stops at every floor. It is 20 units away from the middle point B.

The elevators run at a speed of 10 seconds per floor. But you must add 10 seconds additional (TOTAL, not per floor) for door openings and closings. So if Mr. Allen takes the elevator for 2 floors the total time will be 20+10=30 seconds.

So what is the fastest way for the famous Mr. Allen to go from A to X?

• This seems... tedious.
– Deusovi
Apr 10, 2017 at 20:04
• Your text and your diagram disagree on the speed of escalators. Which is correct, and is the speed in vertical distance, horizontal distance, or distance in direction of travel per second?
– Rubio
Apr 10, 2017 at 20:48
• Draw a weighted digraph and apply dijkstra's algorithm. Apr 10, 2017 at 21:09
• Speed of esc. is 1 unit per sec. in the direction of the escalator
– DrD
Apr 10, 2017 at 21:57
• Is running in malls prohibited? Apr 11, 2017 at 11:21

I believe the best time is:

$471\frac23$ seconds

The path is:

- Go straight up the stairs from A to L ($30\times4=120$)
- Walk on walkway from L to N ($250\div(1+1)=125$)
- Walk N to Q ($20$)
- Take elevator down Q to U ($10+10=20$)
- Walk U to M ($20$)
- Walk on walkway from M to X ($250\div(0.5+1)=166\frac23$)

Total time is $120+125+20+20+20+166\frac23=471\frac23$

Note

The next best path looks like:
Walk A to B (250) and B to D (20); elevator up, D to U (10 + 10×3); walk U to M (20); walk on walkway from M to X (166⅔).
That gives 250+20 + 10+30 + 20 + 166⅔ = 496⅔. Still worse than the best.

Other paths get worse from there. Clearly,

- not taking a walkway at all means the 500 horizontal units must be either walked or covered via escalator at exactly, or no more than, 1 unit/sec respectively. Any such time will be 500 at minimum, or worse than the best time of 471⅔, even without considering the vertical distance.
- Escalator 1 (F→H) by inspection won't help.
- Escalator 2 (B→Z) is 75 units horizonally and goes up two floors; even if riding it took just 75 seconds, you still have to cover the other two floors. A path via B→Z that doesn't include a walkway is at best 500+60 to cover 500 units horizontally + two floors up stairs; at 560, that path is a loser.
If we try B→Z plus walkway: Z to M takes 90 seconds by elevator; A to B (250) + B to Z (75 at best) + Z to M (90) + M to X (166⅔) = 582⅔, worse than even the no-walkway path. Escalator 2 is out.
- Escalator 3 (G→T) seems promising, and is in fact the path I thought was the winner until I read more closely and saw you could exit walkway LNO at N. Here you can: Walk A to F (100) and F to G (40); take escalator up, G to T (97.08); walk T to N (55) and N to Q (20); take elevator down Q to U (20); walk U to M (20); walk on walkway from M to X (166.67).
This path is roughly 518.75 seconds, the fourth best time I've found.
- Finally, if instead of taking LNO halfway, taking elevator down, and taking MX, you ride LNO all the way and then walk to the stairs, down, and back to X, that path gives you 4x30 (stairs up) + 250 (walkway, 500/(1+1)) + 50 (O→W) + 29 (stairs down) + 50 (V→X) = 499, third best time.

Any other path gets pathologically worse than these.

Assume you climb an escalator while it moves. This requires a bunch of extra assumptions which I'll note here. First of all, to climb 20 units of elevation in 30 steps, each step is ⅔ unit high and you can climb steps of that size at a rate of one per second. Let's suppose, since we are given no better numbers to work with, that escalators use the same height per step of ⅔ unit.

Escalator GT, the only one worth doing this analysis for, climbs 80 vertical units as it runs 55 units horizontally, and its length is 97.08 units which it covers in as many seconds (thanks for the clarification).
That means, per second, a given step on the escalator climbs (80/97.08) = .82 units. Again, assuming escalator steps have height ⅔ unit, if Mr Allen climbs one step per second he's actually climbing .82+.67=1.49 units per second, and will make it up the escalator at (80/1.49) = about 53⅔ seconds, saving him about 43½ seconds vs. just riding the escalator.
That would improve the GT path from 518.75 seconds to a bit over 475 seconds — still not good enough to beat the best path time.

### Parting thoughts ...

This is tagged as a riddle.
The puzzle is also, well, oddly specific in featuring Woody Allen.

That invites at least some speculation that the answer is intended to somehow involve a path using Escalator 2, as that would have the beginning of his trip take Mr. Allen From A to Z, echoing the beginning of his career. By the numbers that's an inferior path, but in a riddle sense it is perhaps the "best" answer.

• Rubio. While mathematically it appears right there is one thing missing still
– DrD
Apr 10, 2017 at 22:00
• Hopefully I've covered everything now.
– Rubio
Apr 10, 2017 at 22:43
• Does this need to take into account the fact that the elevator may be at the bottom floor when Woody gets to it? As in, could he have to wait, even if the elevator isn't in use, up to 60 seconds. Apr 11, 2017 at 11:27
• Brent. Those things can be ignored for this puzzle
– DrD
Apr 12, 2017 at 12:32
• @DeepakMahulikar I did. (See "Parting thoughts".) I certainly hope there isn't some trivia/knowledge thing going on here that makes the entire posted puzzle a red herring wrapper for a jokey "puzzle"; that would be rather unsatisfying.
– Rubio
Apr 12, 2017 at 14:08