## Trying to find math inside everything else

### How Many Subway Transfers Do I Have to Make?

I was talking with Sam Shah and had the following exchange:

Of course, after I said that…I had to find out if it was actually true. So I pulled up a map of the subway system and started analyzing.

I realized the best way to analyze the system would be to create a matrix of connections: if I can transfer directly between two lines (or the walking transfer from 59th St/Lex to 63rd/Lex, since you don’t need to pay again), then put a 1 and make the cell green. If not, put a 0 and leave the cell white. That’ll show a chart of all the places you can get to on a single transfer.

Most of the lines have direct transfers, with a few being tricky. Breakout stars are the A, which connects with all but the 6, and the F, N, and R, which only miss some or all of the shuttles. Particularly difficult train lines are the G, the J, and the 6.

So this answers the question of where you can get with only 1 transfer. But what about two transfers? For that, we can multiply this matrix by itself. This is the result:

What do these numbers mean? Well, to explain, let’s look at the G –> 6, which I have highlighted in blue. The number there is 8. This means that there are 8 ways to get from the G to the 6 with two transfers:

G –> 7 –> 6
G –> D –> 6
G –> E –> 6
G –> F –> 6
G –> L –> 6
G –> M –> 6
G –> N –> 6
G –> R –> 6

So this chart shows that you can get from any line to any other with at most two transfers*, with one exception: the Rockaway Shuttle to the 6. However! Those stops aren’t solely serviced by the S. (The only stop in the system solely serviced by an S train is Park Pl, on the Franklin Ave Shuttle.)

Because of that, I can amend my statement to the following, which I have proven true:

During rush hour, you can get from any stop on the subway to any other with a maximum of two transfers.

But then, that gets me wondering further…this chart was just made if the connections exist, but they weren’t time-sensitive. For example, the M does not run at my stop at nights or on weekends. How would that change this chart? Especially when you consider that the E, which does not normally go to my stop, DOES at night. I leave that problem open.

———————–

```* Of course, fewer transfers doesn't always mean better. If I wanted to get
from Astoria to Greenpoint, sure, I could take the N to the G, but that
requires going all the way through Manhattan, way down into Brooklyn, and
then back up. Instead, a quick hop from the N to the 7 to the G is much
more sensible, even if it is an extra transfer.

Excel File - Subway Analysis```