Cognitive Scaffold

Preparing your thinking workspace

arrow_back_ios_new
MENTAL MODEL · M3835

Two Generals' Problem

Two Generals' Problem
CreateHigh supportDesign Thinking
Included
account_tree

Updated 2026-07-28

Loading revision record…

Summary

In computing, the Two Generals' Problem (or Chinese Generals Problem) is a thought experiment meant to illustrate the pitfalls and design challenges of attempting to coordinate an action by communicating over an unreliable link. In the experiment, two generals are only able to communicate with one another by sending a messenger through enemy territory. The experiment asks how they might reach an agreement on the timing of an attack.

Definition

In computing, the Two Generals' Problem (or Chinese Generals Problem) is a thought experiment meant to illustrate the pitfalls and design challenges of attempting to coordinate an action by communicating over an unreliable link. In the experiment, two generals are only able to communicate with one another by sending a messenger through enemy territory. The experiment asks how they might reach an agreement on the timing of an attack.

How to use

In computing, the Two Generals' Problem (or Chinese Generals Problem) is a thought experiment meant to illustrate the pitfalls and design challenges of attempting to coordinate an action by communicating over an unreliable link. In the experiment, two generals are only able to communicate with one another by sending a messenger through enemy territory. The experiment asks how they might reach an agreement on the timing of an attack.

Mechanism

On an unreliable channel, the sender can never be certain that the receiver has received the message, because the acknowledgment itself must be sent back over the same unreliable channel, leading to infinite recursion. Formally, it can be proven that no matter how many rounds of acknowledgment, it is impossible to achieve a consensus that both parties are 100% certain of—this is an unsolvable problem (related to but distinct from the Byzantine Generals Problem, which also introduces malicious nodes).

Practice

In progress 0/5

Practice this model in one real situation:

Check to track your progress (stored locally)
Learning progress0%

Cases

  • - In distributed systems, nodes cannot confirm each other's state; use timeouts and quorum to approximate consistency; use idempotent retries rather than strong consistency between microservices. - On the battlefield, messengers may be captured; instead, coordinate using agreed-upon times and signals.

Common pitfalls

  • - Believing that 'sending one more acknowledgment will make it safe'—the acknowledgment chain never closes; confusing the Two Generals' Problem with the Byzantine Generals Problem (which involves malicious nodes). - Assuming that availability and consistency can always be achieved simultaneously (ignoring the trade-offs of the CAP theorem).
Sources

Source support: Explicit

References currently contain only Wikipedia links; primary sources still need review.

  • link
    en.wikipedia.orghttps://en.wikipedia.org/wiki/Two_Generals%27_ProblemZH · Explicit
    verified
account_treeGenealogyexpand_more