GraphTheory[SpecialGraphs]
HanoiGraph
construct Hanoi graph
Calling Sequence
Parameters
Description
Examples
Compatibility
HanoiGraph(n)
n
-
positive integer
HanoiGraph(n) returns the Hanoi graph, an undirected graph whose edges correspond to allowed moves of the tower of Hanoi problem.
The graph has 3n vertices and 323n−32 edges.
withGraphTheory:
withSpecialGraphs:
H3≔HanoiGraph3
H3≔Graph 1: an undirected graph with 27 vertices and 39 edges
The GraphTheory[SpecialGraphs][HanoiGraph] command was introduced in Maple 2025.
For more information on Maple 2025 changes, see Updates in Maple 2025.
See Also
SpecialGraphs
SpecialGraphs[DeBruijnGraph]
Download Help Document