Algorithm Search⌘K

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. GG is a permutation group on Ω={0,…,n−1}\Omega = \{0, \ldots, n-1\}, given by generators; products apply the left factor first, (gh)(d)=h(g(d))(gh)(d) = h(g(d)). For a GG-invariant window Δ\Delta and strings x,yx, y on Ω\Omega, IsoGΔ(x,y)={g∈G:x(d)=y(g(d)) ∀d∈Δ}\mathrm{Iso}^\Delta_G(x, y) = \{ g \in G : x(d) = y(g(d)) \ \forall d \in \Delta \}. The routine returns (A,τ)(A, \tau) with IsoGΔ(x,y)=Aτ\mathrm{Iso}^\Delta_G(x, y) = A\tau, 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 τ∈IsoGΔ(x,y)\tau \in \mathrm{Iso}^\Delta_G(x, y), then IsoGΔ(x,y)=Aτ\mathrm{Iso}^\Delta_G(x, y) = A\tau with A=IsoGΔ(x,x)A = \mathrm{Iso}^\Delta_G(x, x), a subgroup.

Proof. AA is a subgroup because Δ\Delta is GG-invariant. For a∈Aa \in A, y(τ(a(d)))=x(a(d))=x(d)y(\tau(a(d))) = x(a(d)) = x(d). For gg in the set, a=gτ−1a = g\tau^{-1} satisfies x(a(d))=y(τ(a(d)))=y(g(d))=x(d)x(a(d)) = y(\tau(a(d))) = y(g(d)) = x(d). □\square

Lemma 2 (shift). For H≤Sym(Ω)H \le \mathrm{Sym}(\Omega) keeping Δ\Delta and any tt: the elements htht with x(d)=y((ht)(d))x(d) = y((ht)(d)) on Δ\Delta are exactly IsoHΔ(x,y∘t) t\mathrm{Iso}^\Delta_H(x, y \circ t)\,t, because y((ht)(d))=(y∘t)(h(d))y((ht)(d)) = (y \circ t)(h(d)). □\square

Lemma 3 (L2, chain rule). If O1,…,OrO_1, \ldots, O_r are the GG-orbits on Δ\Delta, then after handling O1,…,OiO_1, \ldots, O_i the pair (A,τ)(A, \tau) satisfies Aτ=IsoGO1∪⋯∪Oi(x,y)A\tau = \mathrm{Iso}^{O_1 \cup \cdots \cup O_i}_G(x, y).

Proof. Induction on ii, starting from Aτ=GA\tau = G. Each Oi+1O_{i+1} is invariant under A≤GA \le G, and by Lemma 2 the elements of AτA\tau that also satisfy the condition on Oi+1O_{i+1} form IsoAOi+1(x,y∘τ) τ\mathrm{Iso}^{O_{i+1}}_A(x, y \circ \tau)\,\tau; the recursive call returns it as A′gA'g, and the new pair is (A′,gτ)(A', g\tau). □\square

Lemma 4 (L3 to L7, cosets of the kernel). Let GG be transitive on Δ\Delta with ∣Δ∣≥2|\Delta| \ge 2, B\mathcal B a block system with at least two blocks, NN the kernel of the action on B\mathcal B, and TT a transversal. Then IsoGΔ(x,y)=⋃t∈TIsoNΔ(x,y∘t) t\mathrm{Iso}^\Delta_G(x, y) = \bigcup_{t \in T} \mathrm{Iso}^\Delta_N(x, y \circ t)\,t, and when this is not empty it equals ⟨A,τtτ1−1⟩τ1\langle A, \tau_t \tau_1^{-1} \rangle \tau_1.

Proof. The Schreier generators ts ts‾−1t s \,\overline{ts}^{-1} generate NN by Schreier's lemma. Every block is NN-invariant, so Δ\Delta is. The union is Lemma 2 applied to G=⋃tNtG = \bigcup_t Nt. Every nonempty term is AgttA g_t t with the same A=AutNΔ(x)A = \mathrm{Aut}^\Delta_N(x) by Lemma 1. With K=AutGΔ(x)K = \mathrm{Aut}^\Delta_G(x), the union is Kτ1K\tau_1 by Lemma 1; A≤KA \le K and τtτ1−1∈K\tau_t\tau_1^{-1} \in K; and each k∈Kk \in K has kτ1∈Aτtk\tau_1 \in A\tau_t for some tt, so k∈Aτtτ1−1k \in A\tau_t\tau_1^{-1}. □\square

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 IsoGΔ(x,y)\mathrm{Iso}^\Delta_G(x, y) as a coset, or none if it is empty.

Proof. Induction on (∣Δ∣,s)(|\Delta|, s) in lexicographic order, with s=1s = 1 when GG is transitive on Δ\Delta. Calls in L2 are on proper orbits, which are smaller. The calls in L6 keep Δ\Delta, but NN keeps each of at least two blocks, so it is intransitive and ss drops. The base case Δ={d}\Delta = \{d\} holds because GG fixes dd. The other cases are Lemmas 3 and 4. □\square

Lemma 5 (joint color refinement). If φ\varphi is an isomorphism from (X,c1)(X, c_1) to (Y,c2)(Y, c_2), then after every round of refinement on the disjoint union, with shared color names, φ\varphi 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 φ\varphi maps neighbors bijectively to neighbors with the same old colors. □\square

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 2n2n colors.

Theorem 2 (graph isomorphism). GRAPH-ISOMORPHISM returns an isomorphism and ∣Aut(X,c1)∣|\mathrm{Aut}(X, c_1)| when X≅YX \cong Y, and none otherwise.

Proof. After renaming YY so that each refined color class sits on the same vertices as in XX, an isomorphism is a permutation in G=∏cSym(class c)G = \prod_c \mathrm{Sym}(\text{class } c) that maps the edge set of XX onto that of the renamed YY. On the window of vertex pairs, with xx and yy marking edges, these are exactly the elements of IsoG(x,y)\mathrm{Iso}_G(x, y); composing with the inverse renaming gives an isomorphism to YY. A=AutG(x)A = \mathrm{Aut}_G(x) is the group of automorphisms that keep the refined colors, which by Lemma 5 is the whole automorphism group of (X,c1)(X, c_1), and GG acts faithfully on the vertices, so ∣A∣|A| is the answer. □\square

Termination. The measure (∣Δ∣,s)(|\Delta|, s) 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. ■\blacksquare

Back to Babai's quasipolynomial graph isomorphism algorithm