Eight Famous Algorithms Are the Same Algorithm

Plain-language explainer for doi:10.5281/zenodo.20684509 (#415)


The central idea in one sentence

Elastic hashing, matrix multiplication tiling, max-flow, cache coherence, SLAM loop closure, the Mittag-Leffler theorem, distributed consensus, and persistent homology are all the same computation — they differ only in what they are computing over, not in what they are doing.


The pattern they all share

Each of these algorithms tries to assemble locally consistent data into a globally consistent whole. In each case:

  • Local data exists and is individually fine
  • The trouble comes when assembling it globally
  • The assembly fails when a certain obstruction — measured by the first sheaf cohomology group $H^1$ — is non-zero
  • Performance degrades in proportion to how large $H^1$ is
  • The algorithm succeeds by applying coboundary corrections that keep $H^1$ small

This is not an analogy. It is the same mathematical theorem — the Čech cohomology exact sequence — instantiated in eight different domains.


The five opcodes

Every one of the eight algorithms uses exactly the same five operations, just applied to different objects:

Opcode What it does Example
SPLIT Creates a local section Insert a key / push flow / write to cache
SPLAT Evaluates a local section Look up a key / measure flow conservation
FLOP Kills one $H^1$ class Firebreak / augmenting path / invalidation message
TWIST Gauge transformation Relabel without changing the $H^1$ class
FLIP Hodge star / duality Flow reversal / Poincaré duality

The correctness condition in every domain is the same equation: SPLAT∘SPLIT = 0 (the Pentagon identity, $d^2 = 0$). This is simultaneously flow conservation, cache coherence, consensus safety, the Čech cocycle condition, and the topological boundary condition $\partial^2 = 0$ in persistent homology.


Why this matters: the temperature parameter

In every domain, there is a natural temperature $\beta$ that controls how aggressively corrections are applied:

  • $\beta = 0$: greedy — no corrections, $H^1$ grows freely, performance degrades
  • $\beta \to \infty$: fully elastic — maximum corrections, $H^1$ stays small, optimal performance

The paper conjectures that the critical temperature — the minimum $\beta$ needed to keep $H^1$ bounded — is universal:

\[\beta^*(\rho) = \frac{3}{8} \ln\!\left(\frac{1}{1-\rho}\right)\]

where $\rho$ is the load factor. This formula was previously derived for the broken-Fano thermodynamic engine (Paper 325); its appearance across eight unrelated domains suggests it is a fundamental constant of local-to-global assembly algorithms.


Three new engineering proposals

The unification immediately suggests importing techniques across domains:

  • β-Raft: probabilistic distributed consensus — accept a proposal with probability $\propto e^{-\beta \cdot H^1_\mathrm{local}}$, trading consistency probability for throughput
  • Elastic cache coherence: load-adaptive write-combining buffers with threshold $\sim \log^2(\text{cache size})/(1-\text{pressure})$
  • β-SLAM: trigger loop closure selectively when accumulated drift exceeds $\beta^*(\rho)$, preventing incorrect closures from corrupting the global pose graph

For the full technical treatment, see doi:10.5281/zenodo.20684509