You May Be Headed While Trying to Solve the Problem of Two Generals!

If you like solving puzzles, problems and thought experiments that push your brain to its limits, try the “two generals problem”.

The problem involving two armies, two generals, an ambassador and an enemy army; Although it seems quite simple actually while thinking to reach a clear conclusion It can burn the brain.

“I was created to solve problems.” Even those who say can break your self-confidence Let’s go into the details of this problem. Let’s see what you think?

What is the “two generals problem” or the “two armies problem”?

There is a war in the country of “Zattiri”. The army in Zattiri is divided into 2 regions. to one of the armies “zattiri 1” army, another “zattiri 2” army let’s say. There is a general at the head of the Zattiri armies, and they communicate by messaging, that is, through messengers.

But your messages are always risk of not reaching There are also. It doesn’t matter what percentage this rate is. There is risk. The general of the Zattiri 1 army sends the following message to the general of the Zattiri 2 army:

“In 12 hours, let’s attack the enemy. You told me that you received this message. confirmation message Send. If you don’t send it, our personal army will not attack.”

The general of the Zattiri 2 army receives this message and sends the confirmation message by messenger as expected, but he also wants to confirm it in the same way. Zattiri requests a confirmation message from the general of the 1st army and If he doesn’t get the message, he won’t attack. tells.

Let’s move on to our question.

logic problem

These armies of God sent messengers to each other and Can they find common ground and launch an attack? Because they really agree 100% sure is it possible?

If you think hard enough, the result comes…

logic question

Actually, there is more than one scenario in this problem. According to the first scenario, the messenger confirms the message by entering an endless loop between the two generals. Both generals expected the envoy they sent to return. waiting for confirmation message and sends again. This cycle never ends.

In another scenario, the Zattiri 1 army wants to report the location of the attack through a messenger. The sent messenger does not return. That’s why Zattiri 1 army can’t attack because Something might have happened to the ambassador on the way. Or Zattiri 2’s army may not have accepted the place of attack and killed the ambassador.

In our last scenario, the messenger conveys the message of General Zattiri 1 to the army of Zattiri 2 and the army accepts the message. Then the ambassador sets out again towards the army of Zattiri 1 to send the message of acceptance. However, Zattiri 2 army does not attack because The messenger may have died on the way back And in this case, his army will not attack either. So the Zattiri 2 army has to make sure the message gets delivered back.

We can connect the problem to computer science by analogy.

computer

Parties; If we think of it as two computer systems instead of two generals, the problem is again the communication channel and it always creates distrust between the two systems. Computer data transmission control protocol TCP (Transmission Control Protocol) is used to terminate the connection in this system. “4 way handshake” uses the method.

The sent communication request helps the other party by answering a connection because the system at the other end of the channel responds and sends an ACK (acknowledge). That all messages have been received in full is followed by another ACK from the system that initiated the termination. Both parties know that the connection has been terminated, but the problem still occurs. It is information shared between two systems.

For example, if the first message is successful but the second message is lost a half-open connection occurs. Since the first party is not aware that the connection is closed, although TCP is a reliable protocol, it cannot solve the problem.

So what’s the result?

thought problem

No. No matter how much the messenger does, both sides He cannot be confident enough to attack.

about your problem Other scenarios and solution suggestions is there? We will be waiting with curiosity in the comments.

If you are not confused enough, you can also take a look at our content below:

RELATED NEWS

The “Two Bucket Problem” That Only Those with Algorithmic Intelligence Can Solve

RELATED NEWS

Logic Question That Shows Whether You Are Smarter Than Most of Society: The Locked Cabinet Problem

RELATED NEWS

Logic Question That Shows Whether You Are Above Average Intelligence Level: Table Tennis Problem


source site-35