Proofs: Babai's quasipolynomial graph isomorphism algorithm
These are the human proofs of Babai's quasipolynomial graph isomorphism algorithm, at full length.
The framework model of Babai's algorithm decides string and graph isomorphism full
This proof shows: correctness, termination.
This proof is about the implementation on this page: Luks's recursion with the giant case detected and solved by running over all cosets. It does not prove Babai's quasipolynomial bound, which rests on the tools described on the page and in Babai's paper.
Setting. is a permutation group on , given by generators; products apply the left factor first, . For a -invariant window and strings on , . The routine returns with , or none when the set is empty. The Schreier-Sims structure returns generators of the same group as its input, since every input generator is either kept or sifts to a product of transversal elements.
Lemma 1 (cosets). If , then with , a subgroup.
Proof. is a subgroup because is -invariant. For , . For in the set, satisfies .
Lemma 2 (shift). For keeping and any : the elements with on are exactly , because .
Lemma 3 (L2, chain rule). If are the -orbits on , then after handling the pair satisfies .
Proof. Induction on , starting from . Each is invariant under , and by Lemma 2 the elements of that also satisfy the condition on form ; the recursive call returns it as , and the new pair is .
Lemma 4 (L3 to L7, cosets of the kernel). Let be transitive on with , a block system with at least two blocks, the kernel of the action on , and a transversal. Then , and when this is not empty it equals .
Proof. The Schreier generators generate by Schreier's lemma. Every block is -invariant, so is. The union is Lemma 2 applied to . Every nonempty term is with the same by Lemma 1. With , the union is by Lemma 1; and ; and each has for some , so .
The giant test in L4 only computes an order and updates a counter, so it does not change the result.
Theorem 1 (string isomorphism). STRING-ISO returns as a coset, or none if it is empty.
Proof. Induction on in lexicographic order, with when is transitive on . Calls in L2 are on proper orbits, which are smaller. The calls in L6 keep , but keeps each of at least two blocks, so it is intransitive and drops. The base case holds because fixes . The other cases are Lemmas 3 and 4.
Lemma 5 (joint color refinement). If is an isomorphism from to , then after every round of refinement on the disjoint union, with shared color names, maps each vertex to a vertex of the same color. So the color counts of the two graphs agree in every round.
Proof. Induction on rounds. A vertex's new color is its old color with the multiset of its neighbors' old colors, and maps neighbors bijectively to neighbors with the same old colors.
So when the counts differ the graphs are not isomorphic, and otherwise the isomorphisms are exactly the isomorphisms that keep the refined colors. Refinement stops, because each round that does not end it adds a color, and there are at most colors.
Theorem 2 (graph isomorphism). GRAPH-ISOMORPHISM returns an isomorphism and when , and none otherwise.
Proof. After renaming so that each refined color class sits on the same vertices as in , an isomorphism is a permutation in that maps the edge set of onto that of the renamed . On the window of vertex pairs, with and marking edges, these are exactly the elements of ; composing with the inverse renaming gives an isomorphism to . is the group of automorphisms that keep the refined colors, which by Lemma 5 is the whole automorphism group of , and acts faithfully on the vertices, so is the answer.
Termination. The measure decreases at every recursive call; loops run over finite orbits, transversals and generator lists; color refinement adds a color per round; and Schreier-Sims enlarges a basic orbit or the base with every new strong generator.