There happens to be a branch of mathematics that deals with this issue. It’s called queuing theory, and it deals with the behavior of waiting lines.

Shopping for groceries can be fraught with all kinds of frustrations. Someone's cart might be blocking an aisle. Your favorite kind of cereal could be sold out. And where is the hummus?

But perhaps the worst frustration, the one that can sink into your soul and fester, is the act of waiting in the checkout line. There you are, cart full of Rice Chex and spaghetti and apples, faced with the task of choosing which checkout line is moving the quickest. But just as you make your choice, your line seems to slow down, thanks to a shopper who is fumbling with coupons or loose change. Now every other line seems to be moving faster than yours. Why does it never seem like the line you choose is the fastest?

There happens to be a branch of mathematics that deals with just this issue. It's called queuing theory, and it deals with the behavior of waiting lines. (Mathematicians who specialize in queuing theory are called queuing theorists.) The field originated in Copenhagen in the first decade of the twentieth century. An engineer and mathematician, Agner Krarup Erlang, was trying to figure out the minimum number of phone lines the city would need to make sure that most phone calls would go through. (At this time in history, calls were connected by people, who had to plug a jack into a hole for each call.) The phone company wanted to avoid having either too few lines, which could cause a backup if lots of people wanted to make calls at the same time, or too many lines, which would mean that the company had paid for equipment it didn't need.

Erlang's name is forever tied to telephony: an erlang is a unit of telephone load, or telecommunications traffic, and is used to measure traffic volume. And his findings have applications outside of telephone networks, including traffic engineering, the Internet, and how factories are designed.

But you probably have encountered queuing theory yourself while doing your errands. Queuing theorists have found that if customers form one long winding line, called a serpentine line, and then are sent to the next available register, wait times can be drastically reduced. (Serpentine lines can be found at banks, where people wait for the next available teller, or at some grocery stores.) Serpentine lines ensure that wait times are minimized because, instead of the traditional-line method, in which one slow person or teller can delay an entire line, a slow person can tie up a register but meanwhile the other customers can be shunted to other open registers. The delay remains, but its impact is much lower that it would be otherwise.

Left or Right?
When faced with two choices—a line to the left or a line to the right, some people believe that the left-hand route will be faster. That's because approximately 90% of the population is right-handed, and so they tend to naturally head to the right. This may be an old wives' tale, but if you're at a theme park with long lines, heading left is worth a try.

Excerpted from Math Geek: From Klein Bottles to Chaos Theory, a Guide to the Nerdiest Math Facts, Theorems, and Equations by Raphael Rosen. Copyright © 2015 F+W Media, Inc. Used by permission of the publisher. All rights reserved.

Image: Shutterstock