A new formula for avoiding supermarket queues

June 21, 2012 - 08:13

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

Supermarket queues are dreaded by many. In the TV series ‘Supernatural’, people standing in an endless queue are used as an example of what hell really looks like. (Photo: Colourbox)

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.

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.

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

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.

“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
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

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

Country
Translated by
Dann Vinther

External links

Calculating supermarket queues – an example

The mathematical function of the probability of a queue at the supermarket is dependent upon a series of variables. In this simple model, Kebin Zeng uses three variables:

λ = the average number of customers arriving at the queue per unit of time

μ = the average number of customers the cashier can operate per unit of time

S = the number of cashiers

The function of the queue is encoded into a computer program, and random values are entered:

λ= 10 persons per minute

μ = 6 persons per minute

S = 2

Using his mathematical function and his software, Zeng can deduce the following information about the supermarket queue:

  1. The average time the customer spends in the queue is 22.7 seconds.
  2. An average of 3.78 people are queuing. If we include customers who are being serviced by the cashier, the number is 5.45.
  3. There is a 9 percent likelihood of nobody queuing.
  4. There is a less than 10 percent probability that more than 13 people will be in the queue.