The iPhone solves the bus-stop problem

Filed under:


My bike has had a flat tire for longer than I’d care to admit, so I’ve been commuting recently by foot and by bus. This leaves me with plenty of time to think, but mostly just thoughts about walking and/or taking the bus.

If you’ve spent time waiting for erratically-timed buses, you know this question well: Will I get there faster if I continue waiting or if I start walking? You can look to recent literature in recreational mathematics for some general guidance on this dilemma [1] [2]. But while waiting may pay off for the lazy mathematician, I like to get some exercise in the process. So here’s a twist on the problem: How far can I walk without missing the next bus? I’ll propose three practical solutions:

  • Walk backwards, so you can spot the bus as soon as it becomes visible. When you do, make a run for the closest stop (preferably in the direction of your destination.)
  • Move to a city that displays bus arrival predictions at bus stops. Run to the first such display, check out the next arrival prediction, and do some quick mental math as you start to walk.
  • Live somewhere that offers open access to city datasets including real-time bus location and prediction feeds. Write the following iPhone application, and then email me when it’s ready.

_App description - _Given your current location (determined by GPS), your walking speed (based on past commutes), and your destination and bus route (stored in preferences or assumed based on time-of-day), it calculates two commute options and displays each with an estimated time of arrival. The first option minimizes your commute duration while maximizing the portion traveled by foot, and the second option minimizes your foot-only commute time. For example:

Your best commute options today are:

  • ETA 8:55am - Walk to Church St, then get on #48. (0.5mi exercise)
  • ETA 9:05am - Walk directly. (2.5mi exercise, saves $2.00)

Any takers? Seems like it would be a great candidate for the DataSF App Showcase.



ari wrote on November 22, 2009
Extra credit if you write a service that provides this functionality over SMS. The origin, destination, and bus route of your morning and evening commute can be pre-associated with your cell phone number, so daily use involves simply sending a (blank?) text message to the special number/email of the service, and receiving a text in response with your commute options listed. Would have been a nice Berry hack...