next up previous
Next: Up: Previous:

Hamiltonian Cycles

A Hamiltonian Cycle of an undirected graph G = (V, E) is a simple cycle that contains each vertex in V.



Hamiltonian Cycle Decision Problem: Does a graph G have a Hamiltonian Cycle?

Language: HAM-CYCLE = {$\langle$G$\rangle$$\mid$ G contains a Hamiltonian Cycle}



\psfig{figure=figures/f26-1.ps}



Naive Solution: Try all possible cycles.



If encode graph as an adjacency matrix and n = \(\mid\langle\)G \(\rangle\mid\), then the number of vertices m in G is \(\Omega(\sqrt{n})\). There are m! permutations of vertices (possible cycles); thus, running time is \(\Omega(m!)\) = \(\Omega(\sqrt{n}!)\) = \(\Omega(2^{\sqrt{n}})\), which is $\neq$ O(nk) for any constant k.

In fact, HAM-CYCLE is NP-Complete.


next up previous
Next: Up: Previous: