attempts to find a Hamiltonian cycle.


  • To use , you first need to load the Graph Utilities Package using Needs["GraphUtilities`"].
  • FindHamiltonianCycle[g] returns an empty list if no Hamiltonian cycle is found.
  • considers the input graph as undirected.
  • uses heuristic algorithms to find a Hamiltonian cycle; therefore, there is no guarantee that a Hamiltonian cycle will be found even if one exists.
New to Mathematica? Find your learning path »
Have a question? Ask support »