Let the verifier ask questions and proofs become far more powerful. Catch a lying prover with the sum-check protocol, and prove you know a colouring without revealing it
NP is what you can prove by handing over a written proof. Let the checker flip coins and ask follow-up questions instead, and something astonishing happens: far harder statements become provable, with a vanishing chance of error. It even becomes possible to prove that you know something without giving away what it is.
Press Run 20 rounds and watch a prover with unlimited power name the scrambled graph every time. Then choose The same graph in disguise and watch the record fall apart, or answer as the prover yourself.
Teal is the verifier and what it sends; violet is the prover; lime is the secret coin. All three pairs have 8 vertices. “Unlimited search” tries relabellings of G₀ until one gives H, and answers G₁ if none does; on graphs this small that takes microseconds, but no polynomial-time method is known in general. A perfect record is evidence, never certainty: after k rounds a bluffer has survived with probability 2−k.
To prove that two graphs are isomorphic, write down the matching of vertices: the problem is in NP. To prove that they are not isomorphic, nobody knows what to write down. Graph non-isomorphism is in co-NP and is not known to be in NP. The protocol in the demo, due to Goldreich, Micali and Wigderson (1986), proves it anyway. If the graphs differ, the scrambled graph H is isomorphic to exactly one of them, and a prover with unlimited computing power can find out which. If they are the same graph, H has exactly the same distribution whichever way the coin fell, so no prover of any power can beat one half per round, and k rounds in a row succeed with probability 2−k.
Interactive proofs were introduced by Goldwasser, Micali and Rackoff (1985) and, in the form of Arthur–Merlin games, by Babai (1985). The class IP contains the problems that have one: the verifier runs in polynomial time and may flip coins; the prover is unbounded and untrusted. Two conditions are required. Completeness: for a true statement, some prover makes the verifier accept with high probability. Soundness: for a false statement, no prover whatever makes the verifier accept except with small probability. Repeating the conversation drives both errors down exponentially.
Both additions are needed. Take away the coins and the prover can predict every question, so the whole conversation can be written out in advance and the class falls back to NP. What the verifier ends up with is also different in kind from a written proof: overwhelming statistical evidence, with no certificate to show anyone else. The demo’s graphs have 8 vertices, where the prover’s search takes microseconds; the protocol itself is the real one.
A prover claims a wrong count of satisfying assignments. Press Reset, then Step through the rounds and watch the lie pushed along until the verifier’s single evaluation exposes it. Then shrink the field to p = 7 and run 2,000 attempts, or cheat by hand.
Dashed: the proved bound n·d/p. Rose: the share of 2,000 false claims that were accepted, each with fresh coins, by the prover who “keeps the lie consistent”. Nothing has been run yet.
Violet is the prover, teal the verifier, lime the verifier’s random field elements. A polynomial of degree at most d is sent as its values at 0, 1, …, d. The emerald and rose tags marking claims as true or false are for your eyes only: the verifier cannot see them and never needs to. This is a toy: the formula has at most 6 variables and 6 clauses, and for p = 7 and p = 11 the count is only known mod p. A real run uses a prime larger than 2n, so the count is exact and n·d/p is negligible.
The claim “this formula has exactly K satisfying assignments” is a counting statement, believed to lie far beyond NP: no short certificate for it is known. Arithmetisation turns the formula into a polynomial P over the field Fp that equals 1 at satisfying 0/1 points and 0 at the others, so K is the sum of P over all 2n such points. In round i the prover sends a one-variable polynomial gi: the sum with the earlier variables fixed to the verifier’s random values and the later ones added over 0 and 1. The verifier checks gi(0) + gi(1) against the current claim, picks a random ri, and the claim becomes gi(ri). After n rounds what is left is a claim about P at one point, which the verifier computes without help.
Why a liar is caught: two different polynomials of degree at most d agree on at most d points. A prover defending a false claim must send a gi that is not the true polynomial, since the true one adds up to the true value. The false gi then disagrees with the true one at all but d of the p possible values of ri, so the next claim is almost always false too. The lie is pushed from round to round down to the final check, where there is no prover left to ask. Over n rounds a false claim is accepted with probability at most n·d/p. The verifier does n rounds of a few field operations and one evaluation of P; the honest prover adds up exponentially many terms.
Lund, Fortnow, Karloff and Nisan (1990) used sum-check to give interactive proofs for counting problems, and within weeks Shamir (1990) extended the idea to every problem solvable in polynomial space: IP = PSPACE. The argument works with the formula’s algebraic structure and does not relativise, which makes it one of the few techniques known to get past the first of the barriers (See also: The Barriers).
The demo is a toy in its sizes only. With at most 6 variables the verifier could count for itself, and in the fields with 7 and 11 elements the count is only pinned down modulo p and a lie survives noticeably often. A real run uses a prime much larger than 2n. The measured survival rates illustrate the bound on a few small formulas; the guarantee comes from the proof. Sum-check is not a museum piece: it is a core component of the succinct proof systems used in verifiable computation today.
Tap any edge to have its two locked boxes opened, as often as you like, and try to piece the colouring together. Then switch to the cheating prover to see how fast it is caught, and to the simulator, which fakes the same rounds knowing no colouring at all.
Each box is a commitment: a digest of the colour and a random nonce, of which the first four hex digits are shown. Lime marks the edge the verifier picked; violet the prover’s or simulator’s side. Behind the curtain in cheating mode, tap a box to change its colour; dashed rose edges are bad. The hash here is a toy 32-bit stand-in: a real protocol needs a cryptographic commitment, and then real and simulated views are indistinguishable to any efficient observer rather than literally identical. The graph has 10 vertices and 15 edges.
Each round the prover shuffles the names of the three colours, commits to every vertex’s colour, and opens the two commitments on the one edge the verifier picks. A prover with a proper colouring always passes. A prover without one has at least one edge whose ends match, and it locked its boxes before the edge was chosen, so each round it is caught with probability at least 1/|E|. It survives k rounds with probability at most (1 − 1/|E|)k, which falls below any threshold after a number of rounds proportional to |E|.
What does the verifier learn? Each round it sees two different colours, and because the names were freshly shuffled they are a uniformly random ordered pair, whatever the colouring is. The definition of zero knowledge, due to Goldwasser, Micali and Rackoff (1985), makes this precise with a simulator: a procedure that knows no colouring and still outputs transcripts distributed like the verifier’s view. The one here bets on an edge, fills only its two boxes, and rewinds whenever the verifier asks for a different edge, which takes |E| attempts per round on average. Whatever the verifier sees, it could have generated alone, so it has learned nothing but the truth of the statement.
Goldreich, Micali and Wigderson (1986) showed that, assuming commitments exist (one-way functions suffice), every problem in NP has a zero-knowledge proof: 3-colouring is NP-complete, so any NP statement can be translated into a graph and proved with this protocol. That result is conditional on the assumption. The demo’s commitment is a toy 32-bit hash, neither hiding nor binding against a real adversary; with a cryptographic commitment the real and simulated views are indistinguishable to any efficient observer rather than literally identical. Goldwasser and Micali received the Turing Award in 2012.
Further up: with two provers who cannot talk to each other, interactive proofs capture nondeterministic exponential time, MIP = NEXP (Babai, Fortnow and Lund, 1991). If the two provers share quantum entanglement, MIP* = RE (Ji, Natarajan, Vidick, Wright and Yuen, 2020): they can prove statements as hard as the halting problem. Zero-knowledge proofs are now deployed at scale in cryptographic systems. See also: Secrets and One-Way Functions.
Spot a mistake or have an idea?