/ 15 December 2016

Queue and A for frustrated drivers

Pump reaction: Which queue will move the quickest is anyone’s guess but there’s a good chance of working out which will be the slowest.
Pump reaction: Which queue will move the quickest is anyone’s guess but there’s a good chance of working out which will be the slowest.

NEWS ANALYSIS

The problem, of course, is λ. At any other time of the year λ is sane and reasonable. During the Easter and Christmas holidays, however, when so much that is normal goes out the window, λ swells out of all proportion. Such is its growth that it not so much overtakes µ as utterly obliterates it. It goes without saying that when λ is significantly greater than µ, fists are shaken, threats are bandied about, families are riven with strife — and holidays (and relationships) are ruined.

That’s just how the maths plays out on the stage of toll booth plazas and petrol station forecourts during the mad holiday rush.

In the literature — of which there is a surprisingly large stack — λ is the typical symbol for new arrivals per time period, and µ denotes units served in the same time period. When at, say, a petrol station on the plains outside Colesberg, λ is smaller than µ, then the cars that pull in are serviced faster than new ones arrive, and all is well with the world. The moment λ exceeds µ, however, a queue of cars starts to form and trouble starts to mount.

In queuing theory, a mathematical subdiscipline that industrial and technology companies take very seriously, these kinds of queue are considered among the most perverse possible. There are all kinds of variables you simply cannot know. Will the person right at the front choose to pay entirely with R1 coins? Will somebody in the middle have a pathological need to get tyre pressure right to the millibar? Will that suspiciously well-coiffed family saunter off to the bathrooms for an hour, turning their car into a roadblock on wheels?

Meanwhile, some important and knowable data is not known to the person who needs it, the driver deciding which queue to join. Which petrol jockey is more determined to earn tips with fast service? Which of the wireless credit card machines have dicey antenna that occasionally cause transactions to fail at first attempt? Which of the exit lanes are sporadically blocked by people incapable of reversing out of parking bays at speed?

And the one known metric, which seems to be the most important, could seem to be a flat-out lie.

“In this paper, we prove that the shortest-line rule is not always optimal,” American mathematician Ward Whitt wrote in a seminal paper in 1986, to veritable gasps from everyone who has ever queued for anything.

Whitt’s reasoning is mathematically sound. If everyone who approaches the Mariannhill toll plaza on the N3 chooses the shortest line as they arrive, and all transactions take the same amount of time, then all the lines will be about equal length when you arrive. The most alluring queue will be the one shorter by a single car than all the rest. But beware its siren song. It is probably shorter because the car at the front of the queue has just departed, which means the toll booth operator is just about to say hello and start a whole new transaction — which will take longer than the half-done transaction at the window next door.

Your best statistical bet, Whitt calculated 30 years ago, may in fact be to join any of the queues that look one car longer than the shortest line. In other words, Whitt can tell you which line may be the worst, but not which one will be best, whether it is in a supermarket or at a bank of ATMs.

None of the research on multiple parallel facilities with multiple queues in the decades since, by earnest researchers from the Middle East to Malaysia, amply funded by petrol companies keen to optimise their forecourts, has been of much help.

“I can’t say I do too much scientific or mathematical analysis when selecting which queue I join,” says Stellenbosch University operations researcher Mark Einhorn, who once studied osmosis to figure out a better way to manage traffic. “The main reason is because I know the vehicle service times are individually and independently distributed and because I have no prior information regarding the requirements of the vehicles in front of me in terms of fuel and therefore time.”

The best less academic experts can offer are rules of thumb.

“I would look out for the giant 4×4 that just pulled in and avoid that queue,” says Automobile Association of South Africa (AA) spokesperson Layton Beard. “Those things can have double petrol tanks, so it will take 30 minutes to put R2 000 worth of petrol in the tank.”

The queue with the car pulling a long trailer may seem attractive, because it has fewer petrol tanks than the length would suggest, but Beard warns against that supposition. “The guy with the trailer may be worried about not having anywhere to park, so he will jump out to get some food while he fills up, then he gets stuck inside and you get stuck behind him.”

Although vigilante justice of the more violent sort is never the answer, a static and abandoned vehicle cries out for the obvious solution: a gentle nudge, at a low and safe speed, until the way to the pump is clear. But the usually motorist-friendly AA is strangely unwilling to endorse such action. Asked whether the association would help to defend legal claims against the owners of vehicles who do this, Beard said the AA could “not in the least” condone such a step. “Your best course of action is to be as calm as possible and seek the counsel of the forecourt manager,” he said.

The Mail & Guardian was similarly unable to find any respected authority who would sanction even a verbal attack on grumbling, second-guessing backseat drivers who lack the survival instincts that would tell them to shut the hell up instead of pointing out that all the bloody other bloody queues are moving bloody faster than the one you chose.

The reasonable solution is to inform your detractors that, however it may seem, you do not always pick the slowest queue.

In his 2015 book Why Does the Other Line Always Move Faster?, David Andrews argues that time is perceived differently depending on whether you are bored and idle or busy with something. Memory plays similar tricks. When you choose well, move through the queue quickly and complete your business before an in-car argument develops, you forget about it. It’s just when you get it wrong that nobody will ever let you bloody forget it.