Grid Unlock

Is the logic of our routes within the grid as sharp as the corners we turn?

All hail the grid.

New Yorkers adore their orthogonal street plan. From it emanates order, utility, purpose. Of course we designed our streets at right angles: we have places to go, people to see, shoulders to brush as we rush to the subway. How do you lay out your city? Like Boston, whose map resembles the tangled knot of headphones buried in a coat pocket? With the loops and dead ends of Westchester County, where speed and efficiency spin to extinction in the endless circle of a cul-de-sac?

The inherent value of a grid, recognized by history’s preeminent civilizations from Babylon to Rome, is its logic and simplicity. Everything can be located with coordinates, as if on a Cartesian plane, and any two corners are at most two line segments away from each other: you can get from Tompkins Square Park to Marcus Garvey Park seven miles away with a single turn.

And this idea — that any location is just two legs of an “L” away — is how many of us navigate the city when walking. In fact, plug in any two endpoints within the grid sections of New York and Google maps will likely offer the familiar elbow-style route. Check out these three routes between different pairs of bookending McDonald’s franchises. At face value, it makes sense: why make extra unnecessary turns when you don’t need to?

A single turn separates double quarterpounders.

However, the subjection of your journey to crosswalks and the traffic signs that govern them thwarts the one-turn philosophy. If you’re restricted to a predetermined one-turn route, you are at the mercy of whatever Walk/Don’t Walk signs you get between blocks. And although New Yorkers have made a veritable science out of timing their jaywalking between oncoming vehicles, at some junctures you will just have to wait.

On the other hand, if you’re willing to make multiple turns and zig-zag your way to your destination, you have the freedom of moving along the other axis if you’re confronted with a glowing red hand. By definition, the motivation for these turns ensures that they will be immediately available: at a standard intersection, traffic in way one halts so that it can move in the other. And finally, working around these delays won’t lengthen the physical distance of your trip, since the segments in your route will add up to the whole legs anyway.

Many of us likely already integrate this logic into our walking, either intentionally or subconsciously. Still, it’s worthwhile to examine the actual mathematics, if only to quantify how much time we can really save. So let’s put this idea to practice. Imagine an 8-by-8 square grid. You must get from the southwest corner to the northeast corner, a distance of 16 units.

We’ll say it takes you one minute to walk each block. The first, conventional set of rules will be:

you will walk north 8 blocks until you reach the top of the grid, and then east 8 blocks to your destination.

At each juncture there will be a stoplight that we’ll give a 50% chance of stopping your progress each time and adding another minute to your trip.

In the interest of symmetry, we’ll locate both starting and finishing places at the southwest corner of their respective intersections. If you simulate this walk 10,000 times, you’ll achieve a charming normally distributed histogram:

The distribution is centered over its mean length of 24 minutes with symmetrical tails uncurling toward the unusually lucky walks of under 20 minutes and the unusually delayed walks that approach 30 minutes. Your interpretation? Walks using these rules will take 24 minutes, give or take a minute or two, the majority of the time. Any route significantly shorter or longer could be considered (un)lucky.

In the upper right hand corner is the equation for the probability mass function that describes this experiment. You may recognize it as a variation of the formula used to count the number of heads in a set number of coin flips. The reason our experiment precisely mimics flipping a coin is because we assigned a 50–50 chance to each stoplight being red. These encounters are the only true variable in the experiment, since each walker must use the same 16 minutes traversing the same 16 units. Thus, the trials are really a glorified string of 16 coin flips, with each additional minute-long delay equivalent to getting heads, and can be modeled accordingly.

Now let’s change to the smarter approach. The new rules are:

At each juncture there is a stoplight that has a 50% of being red

If you do hit a stoplight, you can turn ninety degrees and proceed at pace, provided you haven’t yet reached the border of your lattice.

Let’s run 10,000 trials again:

The mean route duration shrinks from 24 minutes to less than 18. It’s not that complicated to grasp why this methodology produces shorter times. Instead of being required to wait at every stoplight you hit, you can simply change direction each time if you haven’t already reached your northern or eastern limit.

This approach will allow you to avoid almost every stoplight in most cases: in 7,900 of the 10,000 journeys, or almost four fifths, you actually have to stop at two stoplights or fewer. That’s a significant difference from on average being stopped at eight using the L-route methodology.

Again, the probability mass function that the experiment will loyally follow is given in the upper right. This one, however, is significantly more complicated than invoking the familiar practice of flipping a coin. Therefore, its derivation was given its own dedicated post, complete with helpful GIFs. If that sort of stuff interests you, go ahead and take a look.

An example of the space-age graphics available in the linked explanation above!

Finally let’s apply our work to a real-life route. Let’s say you just got a truly appalling haircut and you’re in need of a wig. You pick up a quality piece at Ricky’s NYC on the southeast corner of 27th Street and 3rd Avenue. You’re busy checking yourself out in the shop window’s reflection when you realize you agreed to watch your friend Rocco try his new skateboard trick on the steps of the Stephen A. Schwarzman Building on the northwest corner of 41st and 5th at high noon.

Your watch reads 11:41 AM, giving you nineteen minutes to get there. You spent your last dime at Ricky’s and the subway’s humidity would ruin your brand new wig, so walking is really the only option. You have thirteen north-south blocks to traverse, and four avenues to get over; there are actually nineteen fateful stoplights and not seventeen, since the library is on the far corner of the intersection at 41st & 5th, opposite your starting point.

Before we compare the two styles of route-taking, let’s add some more realistic conditions. In this area of the city, the length of the Don’t Walk directive is around 40 seconds for north-south crosses, and around 55 seconds for east-west crosses.

But you don’t have to wait the full period each time you get stopped, just however much is left when you arrive. The entire cycle is a minute and a half (less than the sum of the two reds, since five seconds of stoppage in both directions is built in for safety), so your roulette wheel always has 90 pockets, 40 or 55 of which are red depending on your direction.

Let’s consider distances now. In this area of the city, north-south blocks run about 250 feet while their horizontal counterparts run about 500 feet. If you walk at a reasonable pace of five feet per second, you’ll complete the north-south blocks in 50 seconds and the east-west blocks in 100 seconds.

Now that we’ve ironed out these constraints, let’s run 10,000 trials using both the rigid and dynamic strategies:

The frequency curves are complicated by our new rules, since walking vertically, walking horizontally, stopping vertically, and stopping horizontally now all have unique durations, whereas formerly they all took one minute. Still though, the basic shapes of the curves survive the constraints. The dumb approach is normally distributed, while the smart approach is skewed right.

The average length of the ill-advised walks is 1260 seconds, or exactly 21 minutes. The average walk of the intuitive walks is 1131 seconds, or a little under 19 minutes. Saving two minutes on a mile-long trek isn’t exactly a major win in terms of efficiency.

But sometimes two minutes can make a difference. Take the narrative’s original scenario, in which you and your new wig had 19 minutes to get to the Schwarzman building to see Rocco’s skateboard trick. On average, you arrive in time to see his performance using the dynamic strategy, while you’d likely miss it if you were inflexible in your route-taking methodology. In fact, over 60 percent of the smart walks clocked in at under 1140 seconds, or 19 minutes, while only 211 of the 10,000 dumb walks (or 2.11 percent) finished that quickly.

So next time you’re praising New York City’s layout, remember: the grid’s greatest gift isn’t one big L that you can make between distant locations, it’s the many little Ls that you can replace it with.