AI Grounds
Open AI Grounds on a desktop
These interactive lessons need a larger screen. Please continue on a desktop or laptop computer.
AI Grounds
These interactive lessons need a larger screen. Please continue on a desktop or laptop computer.
Guided discovery
Commit colors, open one edge, and separate a local check from repeated evidence.
A coloring gives each vertex one of three colors. Valid edges join different colors. A commitment hides a value and prevents changing it after the challenge. This visual simulation makes no cryptographic commitments; both roles and their example colors live in this browser.
No round committed
Commit before choosing a challenge. Open only one edge per round. Open random edge samples uniformly with replacement after commitment; selecting an edge is a controlled example.
Current verifier view: no colors opened; press Commit round first.
| Vertex | Verifier view |
|---|---|
| A | Not committed |
| B | Not committed |
| C | Not committed |
| D | Not committed |
| E | Not committed |
| F | Not committed |
| G | Not committed |
| H | Not committed |
Edges: A-B, B-C, C-D, D-E, E-F, F-G, G-H, H-A, A-E.
0 completed openings in this view. Only the most recent 20 are retained. Switching prover or restarting an exercise clears history.
| Round | Edge | Endpoint colors | Verdict | Challenge | Origin |
|---|
The fixed cheating coloring has seven passing edges and two invalid edges (C-D, A-E). One uniform random edge passes with probability 7/9 and catches it with probability 2/9. The honest coloring passes every edge under this idealized model.
This changes a theoretical probability, never runs rounds or adds transcript rows. Use arrow keys on the slider. Press Enter or leave the number field to apply an exact edit.
P(all k checks pass | this fixed invalid coloring) = (7/9)^6 = 0.22137735.
About 22.1377% escape. This is not a probability that the prover is honest.
Assume uniform independent edge challenges, with replacement, and fresh commitments each round. The same edge may repeat. A manually selected sequence, sampling without replacement, or a different malicious strategy needs a different calculation.
Points are integer round counts; segments connect them for reading. At k=0, no checks means all-pass probability 1. Exact values are in the optional table.
| k | All-pass probability |
|---|---|
| 0 | 1 |
| 1 | 0.77777778 |
| 2 | 0.60493827 |
| 3 | 0.47050754 |
| 4 | 0.36595031 |
| 5 | 0.28462802 |
| 6 | 0.22137735 |
| 7 | 0.17218238 |
| 8 | 0.13391963 |
| 9 | 0.10415971 |
| 10 | 0.08101311 |
| 11 | 0.063010197 |
| 12 | 0.049007931 |
| 13 | 0.03811728 |
| 14 | 0.029646773 |
| 15 | 0.023058601 |
| 16 | 0.017934468 |
| 17 | 0.01394903 |
| 18 | 0.010849246 |
| 19 | 0.0084383023 |
| 20 | 0.006563124 |
Eight vertices, nine public edges and two fixed supplied colorings. The graph is colorable; the cheating example supplies an invalid coloring, not a graph with no valid coloring. A global color permutation preserves all equality/difference checks. Real commitments must hide and bind, and opening checks must match the original commitments; grey boxes only illustrate these constraints.
New rounds independently sample one of six color permutations. A repeated visible color pair can occur by chance. A round number is an identifier, not the permutation or a secrecy measurement. Opening many edges of one committed coloring would leak that coloring, so each commitment can be opened once. Randomness does not make the page itself a secure protocol: the source contains the example colorings, both roles execute together and no cryptographic commitments or formal simulator run here.
Under ideal hiding commitments, an honest edge’s six ordered distinct color pairs are equally likely after a uniform permutation. They can be simulated without its original coloring; that is the intuition for zero knowledge. A complete cryptographic proof, arbitrary adversarial strategies and modern proof systems are outside this illustration.
Yuval Ishai’s graph-coloring protocol explanation · Yale cryptography notes: commitments and graph coloring