Knowledge and common knowledge in a distributed environment

Joseph Y. Halpern, Yoram Moses

Introduction

In the realm of distributed systems, coordination is the fundamental challenge. Whether it is a database commit or a group of sensors synchronizing their readings, processors must act in concert based on their local information. Historically, these protocols were designed using intuitive but informal "knowledge-based" arguments—for instance, "The sender knows the receiver received the packet, so it can stop retransmitting." However, these informal arguments often masked underlying complexities, leading to proofs that were difficult to verify.

Halpern and Moses’ seminal work, "Knowledge and Common Knowledge in a Distributed Environment," transformed this "art" into a rigorous "science." By adapting epistemic logic to the context of computer science, they provided a mathematical language to reason about what processors know, what they know about each other, and how this knowledge dictates the possibility of coordinated action.

The Formal Model of Knowledge

The authors model a distributed system as a set of "runs," which are sequences of events over time. At any given moment, a processor’s "knowledge" is defined by indistinguishability. A processor is said to "know" a fact $\phi$ at a specific point in time if $\phi$ holds true in every possible execution (or "run") of the system that is consistent with that processor's current local history. If there is even one possible run where $\phi$ is false but the processor’s local state is the same, the processor cannot be said to "know" $\phi$.

The Hierarchy of Knowledge

The paper defines a hierarchy of knowledge states that a group of processors can inhabit:

  1. Distributed Knowledge ($D\phi$): The group would know $\phi$ if they could pool all their individual information. It represents the "total" information available to the system.
  2. Everyone Knows ($E\phi$): Every individual in the group knows $\phi$. However, they may not know that others know it.
  3. Common Knowledge ($C\phi$): This is the strongest form of group knowledge. It occurs when everyone knows $\phi$, everyone knows that everyone knows $\phi$, and so on, ad infinitum.

To handle common knowledge mathematically, the authors define it as the greatest fixed point of the equation $X \equiv E(\phi \wedge X)$. This framing allows for a more robust analysis than simply treating it as an infinite conjunction of "everyone knows" statements.

The Impossibility of Common Knowledge

The paper’s most significant contribution is the formal proof of the impossibility of achieving common knowledge in "practical" distributed systems. In any system characterized by communication delays or temporal uncertainty (where message delivery times are not guaranteed or processor start times vary), common knowledge cannot be gained through communication. If it was not present in the initial state of the system, it can never be attained.

This result is illustrated through the Coordinated Attack Problem. Two generals must agree to attack at the exact same time, communicating only via unreliable messengers. Because any message confirming a receipt could itself be lost, the generals can never reach the infinite level of mutual certainty required for "common knowledge," and thus can never guarantee a perfectly simultaneous attack.

Coordination and the Paradox of Practice

Halpern and Moses prove that any action requiring absolute simultaneity is logically equivalent to reaching a state of common knowledge. This presents a paradox: if common knowledge is impossible in real-world systems, how do distributed systems ever successfully coordinate?

The authors argue that while "true" common knowledge is unattainable, distributed systems rely on "weaker" variants that provide sufficient consistency for practical purposes. They introduce several attainable forms of knowledge:

  • $\epsilon$-common knowledge: Everyone knows $\phi$ within a fixed time window $\epsilon$.
  • Eventual common knowledge: Everyone will eventually know $\phi$, though the exact timing is not synchronized.
  • Timestamped common knowledge: Everyone knows that $\phi$ held true at a specific clock time $T$.

Furthermore, they introduce the concept of internal consistency, suggesting it is "safe" for a processor to act as if common knowledge exists as long as it never receives information that contradicts that assumption.

Limitations and Future Directions

While groundbreaking, the model relies on the assumption of logical omniscience—the idea that processors are perfect reasoners who instantly grasp all logical consequences of their information. In reality, processors are constrained by CPU and memory limits. Additionally, the core proofs are deterministic. The authors acknowledge that exploring "probabilistic common knowledge" and "resource-bounded knowledge" (where computation time is factored into the state of knowing) are essential next steps for the field.

Conclusion

By providing a formal logic for knowledge, Halpern and Moses established a foundation for reasoning about distributed protocols that remains relevant decades later. Their work clarifies why certain coordination tasks are fundamentally impossible and provides the tools to analyze the approximations we use to build reliable systems in an uncertain world.

Summary updated

BibTeX
@article{halpern1984knowledge,
  author = {Joseph Y. Halpern and Yoram Moses},
  title = {{Knowledge and common knowledge in a distributed environment}},
  journal = {J. ACM},
  year = {1984},
}
Figure