# De Econometrist

De Econometrist neemt een statistische kijk op de wereld.

Overig Programming

# You got that?

When asked for the most important elements in human life, many could agree on “communication” being high up on the list. It is essential and fundamental to every aspect of life, with few exceptions to be discovered. Up to this day, many methods have been come up with for sending messages across the globe, some being more reliable than others. The field of communication, being a magnet for technological innovation, sees many advances involving reliability and speed, but one issue remains: How can one be sure every message is received?

### The two generals

Sending a message is one thing, but making sure the other party has received and understood your message is another. To illustrate this, consider the following problem, called “the two generals’ problem”:
Two generals are planning to attack a castle. They know that together they can take over the castle, but their individual armies are not strong enough. They therefore have to coordinate the attack in such a way that they attack at precisely the same time, or the attack will fail. General A can send a messenger to general B, stating a time to start the attack. However, the message can be intercepted by the enemy, so general A cannot start the attack until he has received an acknowledgement from the other general. This seems like the trivial solution, but it is not: The messenger carrying the acknowledgement can also be intercepted. But even if this message comes through to general A, how can general B be sure of this? He knows that if his acknowledgement was intercepted by the enemy, general A will not attack! Therefore, general B cannot attack until he knows his response has been received. An acknowledgement could be sent stating that the acknowledgement has been received, but this brings about the same problem again.. In this situation, it is impossible to reach the state of common consensus or, in other words, the state where both generals know that the other general knows the time of the attack, and that the other general knows that they know the time of the attack. This problem is proven to be unsolvable.

### Computer communication

The two generals’ problem seems very specific and situational at first, but it is similar to many contemporary situations concerning communication. More specifically, in computer communication, the ‘infinite acknowledgement loop’ often causes a problem. A message or file can be sent to another device or network, but the transmission process is complete only when the transmitter knows its message has been received. The receiver therefore has to make sure to send an acknowledgement stating it has received the message, but the same issue arises as does in the two general problem. Ofcourse, workably programming this infinite loop of sending affirmations is impossible, but compromises can be made. This two generals’ problem only appears in communication over channels that are not fully reliable and clearly most digital communication is not wholly reliable. However, one could argue that for most types of communication, a watertight system is not quite necessary. A compromise could be made so that some probability of getting a message across would be enough, without requiring acknowledgement of receival. In most cases, very important messages or files are transferred over reliable channels anyway.
Another agreement could be to send just one or two acknowledgements and assume that if the first two transmissions were received without any issues, the last will be as well.

### Minor miscommunication

Most of the times this goes right. Recently, however, an example was made of how communication can go terribly wrong; Nowadays, many people order their food online to let it be delivered to their house. Using a mobile application, one can put an order together and send that order to the server of the delivery company. The application has to make sure that the order came through in the server, for which the server has to respond with an affirmation. If this affirmation does not get sent, or somehow does not reach the phone in question, the application may try to resend the order, or show the user a message stating the order has not come through.

One could now imagine what happens when the order does get through, but the acknowledgement does not: multiple orders are placed for the same customer. This is exactly what happened to hundreds of hungry people across the UK. Some restaurants noticed the double orders, but many did not, resulting in double or even triple deliveries and payments. In this case, the customer was general A, and the delivery company was general B. The message had come across, but the acknowledgement had not, and the delivery company attacked without the customer knowing!

Dit artikel is geschreven door: Pieter Dilg

Deel dit artikel:

By Daniele Zedda • 18 February

← PREV POST

By Daniele Zedda • 18 February

NEXT POST → 34
Share on