How is the most optimal queue?

Imagine you're buying in a supermarket, after choosing the desired item, rush to the checkout counter. Glancing at all the checkout counters with long queues, do you choose one that seems to be the fastest? But, you quickly realize you're wrong! The next row has people who line up after you but get paid and leave before you. Why does that injustice happen to you? That's right, it is an inequity and it is math that has been against you.

When you have to choose one of the few queues in the supermarket, the opportunity cost becomes unfavorable for you. It is very likely that another item is actually faster than the one you chose. From a scientific perspective, mathematicians have done a lot of research on queuing behavior and formed a theory: Queuing theory. Specifically, researchers used numbers to represent and prove this interesting phenomenon. In fact, this phenomenon has appeared since the 1900s of the last century .

From telecommunications to queue theory

Picture 1 of How is the most optimal queue?
A telephone operator in the US in the 1900s

The incident took place at the telephone exchange in Copenhagen, Denmark. In the early 1900s, a young engineer named Agner Krarup Erlang sought to calculate the optimal phone lines for telephone exchanges in the city of Copenhagen. At that time, when you wanted to make a call, one had to plug the jack into an electrical circuit that led to the switchboard and waited. Connecting two wires together to make a call will be done manually by the operator at the operator.

In order to save labor and infrastructure, Erlang wants to know exactly the minimum number of lines needed for all calls to be connected quickly. If for small and lowest cost switchboards, people only equip 1 single line and people have to queue for a long time before their call is connected. Therefore, it is necessary to calculate the least number of lines to save but still ensure thousands of people in the city do not have to wait too long.

Picture 2 of How is the most optimal queue?
Agner Krarup Erlang (1878-1929), who proposed the equation to calculate the optimal number of connections and the birth of Queue Theory

A simple example. If the Copenhagen switchboard has to handle an average of 2 calls per hour, it is clear that only 2 lines are enough. But this is completely different from the fact that there will be peak hours with a lot of people who want to call at the same time. Assuming that at peak hours, the switchboard must receive at the same time 5 requests for connection at the same time.

If there are only 2 lines, only 2 calls can be provided to meet 2 customers and the others have to wait. And yet, if those who wait for bad luck will encounter customers who like eight things that make them wait for hours. At that time, the number of people waiting for it continued to increase and if you came later, making the call seemed impossible.

To overcome that, Erlang devised an equation (also known as the Erlang equation) to calculate the average number of calls in predetermined hours and the average duration of each call. Applying their equations to this simple example, Copenhagen telephone switchboard found that if they equipped 7 lines, 99% of calls would be immediately connected at any time. In 1909, Erlang published his discovery and gave birth to a new branch of mathematics called "Queuing Theory."

Science of queuing

Picture 3 of How is the most optimal queue?

Going back to the cash-on-the-shelf situation in the supermarket, you probably see the similarity of the problem with the call Erlang has dealt with. The queuing theory explains why you (seemingly) can't choose the fastest item? In other words, why your goods seem to be always slower than others. Of course, every supermarket tries to equip its cashier to serve customers in the shortest time. But sometimes, during weekends, all checkout counters are overloaded.

Obviously, hiring more cashiers or building more cashier counters is a rather wasteful option even impossible. At the same time, delays are also caused by a number of special customers or items that cause problems . All of which cause waiting for those who are queuing behind.

If a supermarket has 3 payment counters, delays can occur randomly at each different counter. Now think about the probability of a delay at each counter. The probability that the item you choose to charge is the fastest one is 1/3. This means that you have two-thirds of opportunities not to be ranked in the fastest line. Therefore, the likelihood of you choosing the wrong product may be higher. In other words, not only in your feelings but really, you can hardly choose the fastest goods.

What is the optimal and fair queue?

Picture 4 of How is the most optimal queue?

And now, queuing theory will provide an optimal solution to this problem: As long as all customers are on the same serpentine line and every first person in the line will be served. Service by a cashier. So if we have 3 cashiers at the end, this method will be 3 times faster than the traditional independent 3-row method. If you pay attention, you will find this method is often used in some hospitals, big play centers, .

With a folded row, the delay caused by a cashier will not be affected by others waiting in the line because if there are 3 cashiers, 1 person slows down, 2 others can still serve the next person. At the same time, this technique helps every person in the line to have the same opportunity and is completely fair. The problem has been reduced to the point where the last wait is coming sooner or later and of course, each person will be a bit slower but ensure fairness. The delay at each counter no longer affects an entire row.

Can the above method be applied everywhere?

Picture 5 of How is the most optimal queue?

So why do all places apply the same folding method ? It is mathematical calculation, the problem also depends on customer psychological factors. Human psychology often thinks that each person must be in control of their own lives and if there is an opportunity, people always want to choose the way they think is the fastest. Therefore, the problem here is that not all customers are comfortable to abide by the above principle. In addition, the researchers have shown that there will be cases where people in the row also have the ability to interfere making queuing time longer than traditional.

Not only applies to queuing, but the theory is also widely applied to problems in the modern world such as traffic design, plant design or internet infrastructure, . Today, The queuing theory has grown beyond a mathematical model and incorporates psychological aspects to ease the wait when queuing.

This is also the reason why outside some elevators often have mirrors extending from the floor to the ceiling to reduce boredom while waiting for the next turn. Currently, the waiting issue is also partly solved by mobile devices. People can kill waiting time by reading news, playing games, checking facebook, etc. during the waiting process.

To prove that "The most affordable choice is not always the best choice , " Dr. Richard Larson of the Massachusetts Institute of Technology (MIT) has a very interesting example. In a seminar about queuing theory, Dr. Larson raised the question that if the corridor at a hotel is blocked because there are too many people, what is the solution? Mathematicians, of course, use their knowledge and propose a solution to build a folded queue style to handle a large number of customers.

However, Dr. Larson said: The corridor is not designed to line up and if that happens, it will create a more chaotic scene. In addition, the hotel manager will not be happy if the beautiful corridor is full of kinked cylindrical strips. In this case, we should follow a way of lining up like traditional goods, although a bit unfair, but obviously, still more beautiful.

Picture 6 of How is the most optimal queue?

Conclusion

If you have the opportunity to travel this summer, you will see some of the resorts also apply the above technique! Not long ago, I also had the opportunity to meet the technique of arranging a line in a kinked line while waiting for a cable car in Nha Trang and also wondered what is the main effect of such queues? It turned out that it was derived from queuing theory, a practical fact problem solved in a mathematical perspective.

Hopefully the article may provide some small but quite interesting information around queuing. Therefore, if in the future you feel that your goods choose slower than other goods, don't be too disturbed because, it is obvious that it can be explained by math and there are many others on All around the world, it feels like you guys. Thank you for following the article. Be happy.