Skip to content
SpecializedSource checked

Nauty Canonical Labeling

Nauty Canonical Labeling addresses canonical graph labeling by partitioning and refining vertex sets to produce canonical graph forms.

Quick Facts

Compact metadata for implementation and discovery.

Category
Graph Traversal
Difficulty
Advanced
Family
Graph Isomorphism
Tier
Specialized
Status
Verified
Review
Source Checked
Sources
1
Formulas
0
Relationships
4
Code example
Not ready
Visualization
Ready

Overview

Nauty Canonical Labeling is a graph isomorphism method for canonical graph labeling. It works by partitioning and refining vertex sets to produce canonical graph forms.

Core Concepts

canonical graph labelinggraph isomorphismgraph traversal

Quick facts

Complexity

Runtime and memory behavior at a glance.

Best

O(V + E)

Average

O((V + E) log V)

Worst

O(V^2 + E)

Space

O(V + E)

When to Use

  • Use Nauty Canonical Labeling when solving canonical graph labeling and you want to benefit from partitioning and refining vertex sets to produce canonical graph forms.
  • Choose it when O((V + E) log V) average/worst-case time and O(V + E) memory match your workload profile.
  • Prefer it over Weisfeiler-Lehman Refinement or VF2 Graph Isomorphism when the problem structure favors canonical graph labeling.

When Not to Use

  • Avoid when the graph model does not match the method's direction, weight, or connectivity assumptions.
  • Avoid when a simpler traversal gives the same information with less bookkeeping.

What It Does

  • Computes canonical graph labeling within Graph Isomorphism workloads (O((V + E) log V) time, O(V + E) space).
  • Works by partitioning and refining vertex sets to produce canonical graph forms.
  • Maintains key invariants across canonical graph labeling, graph isomorphism, graph traversal.

Use Cases

  • Production and research workloads requiring canonical graph labeling via partitioning and refining vertex sets to produce canonical graph forms.
  • Graph Isomorphism pipelines where O((V + E) log V) time and O(V + E) space fit system constraints.
  • Engineering comparisons against Weisfeiler-Lehman Refinement and VF2 Graph Isomorphism when tuning canonical graph labeling.

Inputs

  • Two graphs G_1, G_2 or a single graph G = (V, E) with vertex partitions

Outputs

  • Canonical graph certificate and automorphism group generators

Pseudocode

  1. 1.Construct the graph representation G = (V, E) and initialize auxiliary structures for canonical graph labeling (graph isomorphism).
  2. 2.Seed the initial frontier, partition, or residual capacities according to Nauty Canonical Labeling's invariants.
  3. 3.Iteratively process vertices or edges by partitioning and refining vertex sets to produce canonical graph forms.
  4. 4.Maintain structural invariants (canonical graph labeling, graph isomorphism, graph traversal) and prune or contract resolved subproblems.
  5. 5.Extract and return the final canonical graph labeling structure from the converged graph state.

Canonical Example

Input
Two graphs G_1, G_2 or a single graph G = (V, E) with vertex partitions configured for a representative canonical graph labeling test case
Output
Canonical graph certificate and automorphism group generators satisfying Nauty Canonical Labeling invariants
Explanation
Nauty Canonical Labeling processes the input by partitioning and refining vertex sets to produce canonical graph forms, tracking canonical graph labeling and graph isomorphism to produce the verified canonical graph labeling result.

Implementation Notes

  • Represent vertices and edges explicitly before optimizing storage.
  • Keep graph direction, weights, and multiedges clear in tests.
  • Record tie-breaking when multiple valid outputs exist.

Common Pitfalls

  • Using the method on the wrong graph type, such as directed versus undirected or weighted versus unweighted.
  • Forgetting disconnected components or isolated vertices.
  • Letting tie-breaking hide nondeterministic output in tests.

Interactive Mechanism Walkthrough

Graph Frontier & Edge Relaxation

Show partitioning and refining vertex sets to produce canonical graph forms on a small canonical graph labeling example.

Nauty Canonical Labeling mechanism walkthrough step 1 of 5suvwxt
Step 1 of 5: Construct the graph representation G = (V, E) and initialize auxiliary structures for canonical graph labeling (graph isomorphism).
graph-traversal-mechanism

Notes

Nauty Canonical Labeling operates in O((V + E) log V) time and O(V + E) space within the Graph Isomorphism family. Often compared with Weisfeiler-Lehman Refinement and VF2 Graph Isomorphism.

Sources (1)

What each reference supports for this entry.

Practical Graph Isomorphism II

Paper

Reference for nauty canonical labeling, partition refinement, and graph automorphism search.

Open source

Explore Next

Good next jumps from the relationship graph, ranked for useful discovery.

Nauty Canonical Labeling and Weisfeiler-Lehman Refinement are practical alternatives within canonical graph labeling, with different assumptions and tradeoffs.

Alternative toVF2 Graph Isomorphism

Nauty Canonical Labeling and VF2 Graph Isomorphism are practical alternatives within canonical graph labeling, with different assumptions and tradeoffs.

Tags

GraphTraversal