As of Version 10, all the functionality of the GraphUtilities package is built into the Wolfram System. >>

gives a list of n Hamiltonian cycles.

gives a list of one Hamiltonian cycle.


  • HamiltonianCycles functionality is now available in the built-in Wolfram Language function FindHamiltonianCycle.
  • To use , you first need to load the Graph Utilities Package using Needs["GraphUtilities`"].
  • returns an empty list if no Hamiltonian cycle exists.
  • considers the input graph as undirected.
  • The complexity of the algorithm is such that finding all Hamiltonian cycles for a large graph can take an exponential amount of time.
Translate this page: