## How do we minimize our time spent queueing? Game theory and decision making in our everyday life.

One day over lunch, my colleague was telling us how he had made a reservation for popular hotpot restaurant Hai Di Lao, which got me thinking about how we make decisions when queueing.

“Funny thing, it’s not actually a reservation for a table, it’s just a reservation for a priority queue.”

“Oh, just like the express lanes in Disneyland!”

“…but what if everyone made a reservation for the priority queue; then wouldn’t the normal queue be faster?”

Some colleagues said that there was a system where the priority queue would move faster than the normal queue. But we eventually concluded that there would always be some length at which it made more sense to go to the normal queue even if you had a priority reservation.

## Then someone said something we all agreed on:

“If there’s a group of us, just split up and queue in both queues.”

“Such a classic Singaporean

kiasu* move, I wonder if people in other countries do this.”

**kiasu: scared to lose out (Singlish)*

“It’s just

game theory, queuing in both queues is a Nash equilibrium for society.”“And the guy queueing behind you can’t be mad if you left his queue to join the other!”

Game theoryis a field of mathematics that helps us understand decision making in a system of different players.A

Nash equilibriumis a set of strategies for each player where no player has any incentive to change their strategy, even after knowing the strategy of other players. (Named after mathematician John Nash).In economic terms of optimality, a Nash equilibrium is an

optimal state,where each player makesoptimal moveswhile considering other player’soptimal strategies.

Let’s consider a generic queuing system, for example at the supermarket checkout. There are 2 queues offering the exact same service, and 2 types of players (shoppers) — (1) those in groups, and (2) single shoppers.

We will reasonably assume that each **shopper wants to check out as fast as possible, i.e. less time queueing = higher pay-off.**

In our world we assume ‘*irrational*’ shoppers, who value *quality time queuing with their friends* over a faster checkout, do not exist. **Therefore everyone in this world simply wants to minimise their time queueing, and there is no cost to any other action.**

We will also assume that there is some uncertainty in how fast each queue moves, since this depends on a few variables such as the cashier’s speed and how long each person ahead of you takes. There is a chance that a queue with more people in it could actually be faster, but this cannot be known a priori.

*P.s. If there was no uncertainty, then the shorter queue would always be the optimal choice for all shoppers!*

I’ll suggest that …

A Nash equilibrium in this system is one where

(1) Group shoppers split themselves up into both queues and

(2) Single shoppers *should* choose a queue at random.

## (1) Group shoppers split themselves up into both queues

Regardless of how long either queue is, it is best for group shoppers to diversify their risk and split up. This is because of our assumption of ‘rationality’ and thus there is no cost in splitting up. Since there is uncertainty in the speed at which a queue moves, it is best to split up and queue in both.

In fact, in addition to being a Nash equilibrium, **this is also a dominant strategy**,* *because regardless of what all other shoppers (groups or singles) decide to do it is still optimal to split up.

For the sake of discussion, what if there were some cost to splitting? Choosing the shortest queue would be better if the other queue was disproportionately longer, so that the cost of splitting would outweigh the likelihood that the *much* longer queue moved faster.

But could a scenario exist where one queue is disproportionately longer? Since group shoppers split up and queue in both queue, it would be single shoppers that affect the length of a queue. Would single shoppers keep choosing a queue that was longer, resulting in one queue becoming disproportionately longer?

## (2) Single shoppers *should* choose a queue at random

A single shopper has to choose between either queue. Group shoppers will always split up regardless of strategy taken by the single shopper. Therefore in terms of a Nash equilibrium, we just need to find a strategy for the single shopper in which they have no incentive to change to another strategy.

A shorter queue is not necessarily the better choice because of the following uncertain variables:

- efficiency of cashier
- number of items each shopper in front of you has
- number of groups in front of you (chance that they will jump to the other queue).

Perhaps if one

- collected enough information about each cashier through observing them over a period of time,
- refined a method of estimating how much time a shopper would take based on the size of their cart,
- and mapped out a Markov Chain of different scenarios of group shoppers…

one could be able to determine which queue was *more likely* to move faster (i.e. higher *expected* pay-off).

Realistically, we will not know which queue moves faster in that instance. Even if there was a queue that moved faster than the other more times than not, this probability would not be known to us, nor would we have the mental capacity / time to calculate this *in the middle of a supermarket.*

Therefore without knowing the actual probabilities of the queues, one can **maximise their expected pay-off by choosing a queue at random (i.e. flipping a fair coin). **In game theory, this is also known as a mixed strategy.

Calculating the expected pay-off from choosing a queue at randomLet’s say there is some probabilitypthat queue A moves faster than queue B, butpis not known.If we choose the queue that moves faster, the pay-off is 1. If no, the pay-off is 0. The expected pay-off from selecting queue A isp, whilst the expected pay-off from selecting queue B is1-p. Expected pay-off from selecting queue A:pExpected pay-off from selecting queue B:1-pWithout knowing whatpis, we cannot make a decisive choice whether queue A or B is better. Obviously ifp>0.5, queue A is better, if not, queue B is better.By giving both queue A and queue B a 50-50 chance of being selected, our expected pay-off would be: probability of selecting A and A being faster + probability of selecting B and B being faster = (0.5) * (p) + (0.5) * (1-p) = 0.5 * (p+ (1-p)) = 0.5 * (1) =0.5Regardless of the probability distributionp, randomising will always give us an expected pay-off of 0.5.

Regardless of the probability of one queue moving faster than the other, the **expected payoff of a 50–50 random choice will always be 0.5**, and thus would be the most optimal choice given the uncertainty. This is a Nash equilibrium since no matter how group shoppers decide, there would be no incentive to change strategy.

*P.s. since each single shopper is also choosing a queue at random, an equal number of single shoppers are expected to join each queue, reinforcing our earlier argument that a disproportionately longer queue would not exist!*

In “*Thinking Fast and Slow”, *Daniel Kahneman describes the 2 systems of our brain that we use in decision making. System 1 makes fast and quick decisions, reacting quickly. The decision making is subconscious and we often don’t even realise we are making a decision (e.g. swerving to avoid a fallen tree branch). System 2 is used for slower and deeper thinking (e.g. solving an algebra problem).

Even if it would maximise expected payoff, would shoppers start tossing coins at the supermarket check-out, or even *think* to randomise? It is more likely for shoppers to be using System 1 to make a quick decision, since we all want to get on with our lives without too much effort.

Without putting too much thought into it, most would simply choose the shortest queue. This is because over time we have come to believe, *correctly or incorrectly*, that shorter queues move faster.

In the grand scheme of things, we are probably better off not overthinking simple decisions and let system 1 take the lead…