18.04.2013 Views

The.Algorithm.Design.Manual.Springer-Verlag.1998

The.Algorithm.Design.Manual.Springer-Verlag.1998

The.Algorithm.Design.Manual.Springer-Verlag.1998

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Hamiltonian Cycle<br />

Next: Graph Partition Up: Graph Problems: Hard Problems Previous: Traveling Salesman Problem<br />

Hamiltonian Cycle<br />

Input description: A graph G = (V,E).<br />

Problem description: Find an ordering of the vertices such that each vertex is visited exactly once.<br />

Discussion: <strong>The</strong> problem of finding a Hamiltonian cycle or path in a graph is a special case of the<br />

traveling salesman problem, one where each pair of vertices with an edge between them is considered to<br />

have distance 1, while nonedge vertex pairs are separated by distance .<br />

Closely related is the problem of finding the longest path or cycle in a graph, which occasionally arises in<br />

pattern recognition problems. Let the vertices in the graph correspond to possible symbols, and let<br />

edges link symbols that can possibly be next to each other. <strong>The</strong> longest path through this graph is likely<br />

the correct interpretation.<br />

<strong>The</strong> problems of finding longest cycles and paths are both NP-complete, even on very restrictive classes<br />

of unweighted graphs. <strong>The</strong>re are several possible lines of attack, however:<br />

● Do you have to visit all the vertices or all the edges? - First verify that you really have a<br />

Hamiltonian cycle problem. As discussed in Section , fast algorithms exist for edge-tour, or<br />

file:///E|/BOOK/BOOK4/NODE176.HTM (1 of 3) [19/1/2003 1:31:23]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!