Thursday, April 23, 2009

Buses and equilibria

If you've ever taken a public city bus, you know that that's where all of life's greatest lessons are learned. As you wait for the bus to arrive, especially when the bus comes late, you contemplate the mysteries of the universe. As you sit (or stand) in the moving bus, in a mostly silent crowd, you ponder what it truly means to be human.

Perhaps as a result of my physicist's intuition, I've noted that buses are frequently in an unstable equilibrium. Most buses will either be behind schedule, or ahead of schedule. The bus which is exactly on time exists in a precarious position, and there are opposing forces which threaten to slow it down or speed it up.

All it really takes to knock a bus off from this precarious position, this unstable equilibrium, is a red or green light. There are plenty of random factors involved in the speed of a bus, and any one of these could make the bus just a little late, or just a little early.

If the bus is just a little late, then there will be more time for people to accumulate at each of the bus stops. Therefore, it becomes more likely that the bus will have to stop to let people board. And the more people who board, the longer the bus must stop. When there are more people on the bus, they will make more frequent stop requests, which take more time. Similarly, if the bus is just a little early, then there will be less people to board, and the bus will go faster.

The result is that buses tend to be very late or very early. In fact, it tends to be that if one bus is late, then the bus behind it is early, and the bus behind it is late again. If one bus is late, it starts to pick up passengers who expected to board the next bus. And so the next bus has less people to board, and ends up going faster. Sometimes, one bus becomes so much faster than the bus in front of it, that it will overcome it. Usually, at this point, the buses will stop, and they'll tell all the passengers in the slow bus to switch to the fast bus. The bus drivers must be aware of the positive feedback mechanisms which are at work here.

Unfortunately, though there are slow buses and fast buses, you are more likely to end up boarding the slow, crowded bus. The natural laws which govern buses can be unkind, though I prefer to think of them as simply indifferent.


Anonymous said...

I work in a tall building with 6 elevators, and as most people there know, when a quite full elevator stops for you, if you have many floors to go, it usually is faster to wait for the next one. Unless the first one is full because several others are out of service. Now I will try to think of a non-transportation related example with similar phenomena.

Jeffrey Ellis said...

This analysis is really brilliant. Nicely done.

miller said...

I just found out that I'm not the first person to think of this. There's even a book called Why do Buses Come in Threes? (After the first two buses group together, they sometimes slow down, allowing a third bus to catch up.) I'm being preemptively plagiarized.

Secret Squïrrel said...

Lovely stuff. Yet again I managed to only see half of the problem. I had previously arrived at the same conclusions (and for the same reasons) as you about why a bus will usually be late, and why the next bus is often right behind it. I had failed to see that being early would cause it to "speed up".

However, for the last 15 yrs or so, the buses in my city have had "timed stops" every few stops where, if the bus is early, it waits until the correct time before moving off. Also, the free buses in the CBD (like the trains) have talking stops that tell you how many minutes before the next one arrives.

I'm just waiting for GoogleBus (TM) to be available on the iPhone so that I will know at what time I need to leave my house to catch a bus...