# A new formula for avoiding supermarket queues

### How do you avoid queues at the supermarket? A researcher shows the way with mathematics.

In researcher Kebin Zeng’s office hangs a big whiteboard filled with mathematical formulas and functions. Complicated as it looks, it’s all about solving everyday problems such as supermarket queues.

”You could say that I convert everyday life into mathematical models. The ultimate goal is to improve people’s everyday lives so they don’t waste time in queues,” says Zeng, a PhD student at the Department of Informatics and Mathematical Modelling at the Technical University of Denmark (DTU).

His research, which is supported by MT-LAB, aims to improve on the existing mathematical models that calculate the probability of queues in places such as supermarkets or post offices.

“It will for instance be possible to use our models to create an iPhone app that tells you the ideal time to go shopping if you want to avoid long queues,” he says.

### In my research I try to improve on the models by creating distributions which allow for differences in the efficiency of the checkout staff at supermarkets..

Kebin Zeng

For an example of how to calculate supermarket queues, see the box below this article.

##### Sorting out phone queues

Zeng is far from being the first mathematician to create models for waiting times in queues. The calculation of queues is a well-known discipline in mathematics, and the so-called queuing theory has been around for more than a century.

The theory was founded by the Danish mathematician and engineer Agner Krarup Erlang. Educated at the University of Copenhagen, he started working for the Copenhagen Telephone Company in 1908, where he studied the probability of all the city’s phone lines being busy at the same time, leaving all Copenhageners having to wait in line.

##### A handy scheduling tool

Erlang’s studies led to the development of a mathematical model, which was later used in several countries to calculate the probability of people having to wait at the phone lines. This is one of the principles that Zeng is trying to refine.

### It will for instance be possible to use our models to create an iPhone app that tells you the ideal time to go shopping if you want to avoid long queues.

Kebin Zeng

“In my research I try to improve on the models by creating distributions which allow for differences in the efficiency of the checkout staff at supermarkets.”

Zeng’s models will, for instance, be used for creating work schedules in supermarkets.

“Practically speaking, the models can be useful if the owner of a supermarket decides that the queuing time at the checkout should be no more than five minutes,” he says.

“The owner could of course solve the problem by hiring lots of people and have several checkouts open. But that’s expensive, and these models could point out the optimal amount of checkouts that should be open.”

##### It’s all about probability

The queuing theory is a branch of mathematics that most of us have struggled with at school – probability.

The likely waiting time in a supermarket can be expressed as a function of different variables, including the number of open checkouts, the amount of customers in a given period and the number of customers that a particular cashier can service per minute.

##### Software free for all

Once his PhD thesis is completed this autumn, Zeng’s mathematical models will be encoded into computer software, which will be available as open source software.

“A supermarket would only need to enter its own data, and then my software can deliver the results.”

--------------------------------------------------

Read this story in Danish at videnskab.dk

Translated by: Dann Vinther