A canonical labeling of a graph is an ordering or renaming of its vertices that produces a
distinguished labeled graph
isomorphic to
. The resulting graph
is a canonical form:
two graphs are isomorphic
exactly when their canonical forms are identical
(McKay and Piperno 2014). The terminology is not uniform, and "canonical labeling"
is sometimes also used for the resulting labeled graph. The complexity class of canonical
labeling is not known.
Efficient canonical-labeling methods therefore yield efficient tests for isomorphic graphs. Important software implementations include nauty and Traces (McKay and Piperno 2014), bliss (Junttila and Kaski 2007), saucy, and conauto (McKay and Piperno 2014). In the Wolfram Language, canonical labeling is implemented by CanonicalGraph[g].