Hardness of HAM

HAM is NP-complete. First, we'll show that deciding if a directed graph has a Hamiltonian circuit is NP hard. We'll reduce 3-CNF-SAT to it.

Idea: We have a gadget for each clause and an assignment-selection gadget that makes us choose Boolean values for each of the variables one at a time.

Picture...

Now, we can turn any undirected instance into a directed instance by expanding each node into a trio of nodes: for incoming edges, outgoing edges, and a middle node to force us to go from in to out. Why do we need the middle node?

Picture...


next up previous
Next: Linking HAM and TSP Up: TRAVELING SALESPERSON PROBLEM Previous: Hamiltonian Circuit