Algorithm Search⌘K

Proofs: Bliss

These are the human proofs of Bliss, at full length.

The certificate search returns a canonical form and the automorphism group order full

This proof shows: correctness, termination.

Setting. GG is a simple undirected graph on V={0,…,n−1}V = \{0, \ldots, n-1\} with a vertex coloring cc. A node of the search is an ordered partition π\pi (an array of vertices cut into cells at given start positions) with a certificate cert(π)\mathrm{cert}(\pi), the list of refinement traces from the root to π\pi. At a discrete leaf with vertex order v0,…,vn−1v_0, \ldots, v_{n-1}, the labeling is λ(vi)=i\lambda(v_i) = i and the key is cert(π)\mathrm{cert}(\pi) followed by the colors of v0,…,vn−1v_0, \ldots, v_{n-1} and the adjacency rows of GG relabeled by λ\lambda. Keys are compared as sequences (lexicographically). The full tree T(G)T(G) contains every child π↓w\pi \downarrow w, refined, for every ww in the target cell, the first largest cell. A permutation γ\gamma of VV acts on everything by renaming vertices.

Lemma 1 (invariance). For every permutation γ\gamma, the refinement of πγ\pi^\gamma in GγG^\gamma is the image under γ\gamma of the refinement of π\pi in GG, as a sequence of cells, with the same trace; individualization of γ(w)\gamma(w) in πγ\pi^\gamma is the image of individualization of ww in π\pi; the target cell has the same start; and leaves π\pi and πγ\pi^\gamma have the same key.

Proof. Every decision of REFINE depends on cell starts, cell sizes, and the numbers of neighbors in the splitter: the queue holds starts, the touched cells are processed by start, pieces are ordered by neighbor count, and the piece left out of the queue is the first largest one. These quantities do not change under renaming, and the trace records only them. The order of vertices inside a cell may change, but no later decision and no trace entry depends on it. The target cell rule uses only sizes and starts. A leaf of GγG^\gamma lists γ(v0),…,γ(vn−1)\gamma(v_0), \ldots, \gamma(v_{n-1}), whose colors and adjacencies in GγG^\gamma are those of v0,…,vn−1v_0, \ldots, v_{n-1} in GG. □\square

So γ\gamma maps T(G)T(G) onto T(Gγ)T(G^\gamma) and preserves certificates and keys; and an automorphism that fixes a node maps the subtrees of its children onto each other with equal keys.

Lemma 2 (equal keys give automorphisms). If leaves π,π′\pi, \pi' have equal keys, then γ\gamma, which maps the vertex at each position of π\pi to the vertex at the same position of π′\pi', is an automorphism. This is the map recorded in L7.

Proof. The keys end with the same colors and relabeled rows, so γ\gamma keeps colors and adjacency. □\square

Lemma 3 (the cut in L4 is safe). If a node ν\nu with certificate CC has CC worse than the best key BB, that is, at the first index where they differ CC is smaller, then every leaf below ν\nu has a key smaller than BB.

Proof. Every leaf key below ν\nu starts with CC, so it differs from BB at the same index, with the same comparison. □\square

Lemma 4 (the orbit cut in L10 is safe). Skipping a child that is in the orbit of a tried child under found automorphisms fixing the prefix loses no key.

Proof. Such automorphisms fix the node, by Lemma 1, so they map the subtree of the tried child onto the subtree of the skipped child with the same keys. □\square

Theorem. The search terminates and returns the leaf of largest key in T(G)T(G). Its form is the same for isomorphic colored graphs and different for non-isomorphic ones, and L12 returns ∣Aut(G)∣|\mathrm{Aut}(G)|.

Proof. Termination. Individualization adds a cell and refinement never merges cells, so the depth is at most nn and every node has at most nn children. REFINE stops: each queue entry is processed once, and only a split, at most n−1n - 1 of them, adds entries.

Maximum. By Lemmas 3 and 4, every cut subtree holds only keys smaller than the current best or keys already present in an explored subtree. By induction, the best key at the end is the largest key of T(G)T(G).

Canonical form. By Lemma 1, T(Gγ)T(G^\gamma) has the same keys as T(G)T(G), so the largest keys and their final parts are equal. Conversely, the final part is the colored graph relabeled by a bijection, so equal final parts imply isomorphic graphs.

Group order. Let ν0,…,νk\nu_0, \ldots, \nu_k be the first path, PdP_d the prefix and wdw_d the first child of νd\nu_d, and AdA_d the automorphisms fixing PdP_d pointwise. As in the proof for nauty, ∣Aut(G)∣=∏d∣wdAd∣|\mathrm{Aut}(G)| = \prod_d |w_d^{A_d}|, and it suffices that every explored child uu of νd\nu_d in the AdA_d-orbit of wdw_d yields a recorded automorphism in AdA_d mapping wdw_d to uu. Some β∈Ad\beta \in A_d maps the subtree of wdw_d onto that of uu, so the subtree of uu contains a leaf with the key of the first leaf, and every node on the way has a certificate equal to a prefix of the first key. L4 never cuts such nodes, because of the condition cert≠\mathrm{cert} \ne prefix of the first key, and L10 only replaces a subtree by an image under an automorphism fixing the prefix, which contains another leaf with that key. So the search reaches a leaf π\pi below uu with the key of the first leaf, and L7 records γ\gamma with γ\gamma mapping positions of νk\nu_k to positions of π\pi. Cells are split in place, so a vertex that is a singleton of νd\nu_d, and the vertex individualized from the target cell of νd\nu_d, have the same positions in all leaves below νd\nu_d. Hence γ\gamma fixes PdP_d and maps wdw_d to uu. ■\blacksquare

Back to Bliss