|
SOLUTIONS
|
GRAPH UTILITIES PACKAGE SYMBOL
HamiltonianCycles
gives a list of n Hamiltonian cycles.
HamiltonianCycles[g]
gives a list of one Hamiltonian cycle.
DetailsDetails
- 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.
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »




