attempts to find a Hamiltonian cycle.
Details and Options
- FindHamiltonianCycle functionality is now available in the built-in Wolfram Language function FindHamiltonianCycle.
- To use FindHamiltonianCycle, you first need to load the Graph Utilities Package using Needs["GraphUtilities`"].
- FindHamiltonianCycle[g] returns an empty list if no Hamiltonian cycle is found.
- FindHamiltonianCycle considers the input graph as undirected.
- FindHamiltonianCycle uses heuristic algorithms to find a Hamiltonian cycle; therefore, there is no guarantee that a Hamiltonian cycle will be found even if one exists.
Examplesopen allclose all
Basic Examples (2)
This function has been superseded by FindHamiltonianCycle in the Wolfram System:
Properties & Relations (1)
FindHamiltonianCycle uses heuristic algorithms. Unlike HamiltonianCycles, it is not guaranteed to find a Hamiltonian cycle even when one exists. But for large graphs, FindHamiltonianCycle can sometimes be faster at finding one cycle.
Wolfram Research (2007), FindHamiltonianCycle, Wolfram Language function, https://reference.wolfram.com/language/GraphUtilities/ref/FindHamiltonianCycle.html.
Wolfram Language. 2007. "FindHamiltonianCycle." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/GraphUtilities/ref/FindHamiltonianCycle.html.
Wolfram Language. (2007). FindHamiltonianCycle. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/GraphUtilities/ref/FindHamiltonianCycle.html