Colour refinement 2026-11-05
Colour refinement repeatedly separates vertices of a graph according to the colours of their neighbours. Its colours are labels for classes of vertices with the same currently visible structure; they are not a proper vertex colouring requiring adjacent vertices to differ. In individualization-refinement graph search, colour refinement reduces ambiguity before the algorithm branches.[ref]
Let be a vertex's colour after round . One conceptual update assigns a common new colour exactly when both the previous colour and neighbour-colour multiset agree:
The encoding must give distinct labels to distinct signatures. Retaining prevents old classes from merging. When no class splits, the resulting partition of a set is an equitable partition: vertices in the same cell have equal numbers of neighbours in every cell.
For an original example, start all vertices of the six-vertex path graph with the same colour. The first round separates endpoints from internal vertices . The next separates , which each have an endpoint neighbour, from , which do not. The three cells
are then stable. Reflection of the path exchanges the two vertices in each cell, so the remaining pairs are compatible with a genuine graph automorphism.
Colour refinement is invariant under vertex relabeling. To compare two graphs, colour signatures must be encoded consistently across both, for example by refining their disjoint union of graphs with shared initial colour meanings. A different count of vertices in a resulting colour class certifies graph non-isomorphism.
Agreement is weaker than isomorphism. Starting with one colour, both the complete bipartite graph and the triangular prism graph remain one six-vertex cell because every vertex has three neighbours. Yet the prism has triangles and has none. This failure motivates individualizing vertices and searching further; stable colour classes are not, in general, proof that all their vertices are related by graph automorphisms.
Complete graph invariant 2026-11-05
A complete graph invariant is a graph invariant whose value determines a graph up to graph isomorphism. For graphs in a specified class, completeness means
An ordinary invariant only requires the forward preservation statement . Completeness adds the converse: equal values must exclude graph non-isomorphism.
A direct construction proves that complete invariants exist for finite undirected simple graphs. For an -vertex graph, label its vertices and list the entries above the diagonal of its adjacency matrix in the fixed order . This gives a binary string. Repeat for every labeling and choose the least string in lexicographic order. Define to be the pair consisting of and this least string. Including distinguishes graphs whose edge string is empty but whose vertex counts differ.
Relabeling a graph permutes the same collection of candidate strings, so isomorphic graphs have the same minimum. Conversely, if two minima and vertex counts agree, some labeling of each graph gives exactly the same adjacency entries. Matching vertices with those labels is an isomorphism. This proves both directions, without assuming that the construction is computationally fast.
For an original three-vertex example, a path's possible strings are , and in the order . Its invariant is . A triangle instead gives . The difference certifies non-isomorphism. For larger graphs the naive construction may examine labelings, so mathematical completeness alone supplies no practical speed guarantee.
Canonical graph labeling produces a standardized labeled representative and is closely connected to this construction. The authors of nauty and Traces identify canonical-label production as one of their programs' tasks.[ref] A particular program's chosen representative need not be the lexicographically least string used in this illustrative definition; comparisons must use the same canonization convention.
Vertex count, edge count and degree sequence are useful inexpensive invariants but are not complete. The example in graph non-isomorphism gives equal values for all three while connectedness differs. Completeness concerns the information retained, separately from the effort required to compute it.
Graph invariant 2026-11-05
A graph invariant assigns a value to a graph in a way preserved by graph isomorphism. For an invariant ,
The value may be a number, a sequence or another mathematical object whose equality has been specified. Isomorphism preserves adjacency while allowing a relabeling of vertices; a drawing's page coordinates are therefore not a graph invariant.[ref]
Examples include vertex count, edge count, the sorted degree sequence and the number of connected components of a graph. If even one invariant differs, it proves graph non-isomorphism. Equality of an invariant usually supplies only a necessary condition. For example, a six-vertex cycle graph and two disjoint triangles both have six vertices, six edges and six degrees equal to2, but only the cycle is a connected graph. The example in graph non-isomorphism proves the obstruction through connectedness.
The adjacency matrix gives an algebraic way to construct invariants. Relabeling a graph replaces by for a permutation matrix . Hence
For a finite undirected simple graph, the th diagonal entry of counts three-step closed walks from vertex . Every triangle gives two traversal directions and three possible starting vertices, so the number of triangles in a graph is
The six-cycle has no triangles and trace zero; two disjoint triangles have trace12 and triangle count2. This invariant distinguishes them even though their degree sequences agree.
A complete graph invariant would satisfy the reverse implication too: equal values would guarantee graph isomorphism. Being easy to compute and being complete are separate properties. Combining several inexpensive invariants can reject many non-isomorphic pairs, but a surviving pair still requires a justification that the chosen information determines its adjacency structure.
Interactive proof system 2026-11-05
An interactive proof system is a protocol in which a prover in an interactive proof exchanges messages with a verifier in an interactive proof to establish a public statement. The verifier is a randomized algorithm running in polynomial time; the prover need not have that resource bound. Completeness of an interactive proof and soundness of an interactive proof specify acceptance behavior on true and false statements.[ref]
For a decision problem represented by a set , write the acceptance bounds as
The first condition supplies an honest proving strategy; the second constrains every cheating strategy, including adaptive answers. The bounds need a useful separation between and .
Graph non-isomorphism gives a concrete protocol. Given two graphs on the same number of vertices, the verifier secretly chooses a uniform bit , randomly relabels using a permutation, and sends the result . The prover guesses which input graph was chosen; the verifier accepts exactly when the guess equals .[ref]
If the graphs are non-isomorphic, an unrestricted prover can identify the correct isomorphism class and always answer correctly. If they are isomorphic, the two ways of generating have identical probability distributions, so gives no information about and any guess succeeds with probability . The verifier's secret random choice creates the test. This soundness argument alone makes no claim that the protocol is a zero-knowledge proof.