-1

This is a question that our professor uploaded yesterday, to prepare for our exam tomorrow. My problem with the question is part b (in boldface below); I'm not sure what I should do exactly.

The Traveling Salesman Problem consists of a salesman and a set of cities. The salesman has to visit each one of the cities starting from a certain one (e.g. the hometown) and returning to the same city. The challenge of the problem is that the traveling salesman wants to minimize the total length of the trip.

TSP = {(G, f, t): G = (V, E) a complete graph, f is a function V×V → Z, t ∈ Z, G is a graph that contains a traveling salesman tour with cost that does not exceed t}.

Let the HAM-CYCLE problem defined as follows: given an undirected graph G = (V, E), does there exist a simple cycle H that contains every node in V.

Let a complete graph be a graph where there is an edge “between” every possible tuple of vertices.

a-Define a certificate for TSP. Show that we can verify the certificate in deterministic polynomial time.

b-Prove that the reduction of HAM-CYCLE to TSP is polynomial-time.

c-Using the fact that HAM-CYCLE is NP-complete, what can we conclude?

ruakh
  • 175,680
  • 26
  • 273
  • 307
Faisal
  • 159
  • 9

1 Answers1

0

There are only three differences between TSP and HAM-CYCLE as you've presented them:

  • TSP assumes a complete graph, whereas HAM-CYCLE allows some pairs of vertices to not share an edge.
  • TSP assigns a cost to every edge, whereas HAM-CYCLE treats all edges as equivalent.
  • TSP seeks a tour that costs less than t, whereas HAM-CYCLE accepts any tour.

Given a graph G and an algorithm for solving TSP, we can solve HAM-CYCLE as follows:

  • Construct a complete graph G′ with the same set of vertices as G.
  • Let f (our cost function for TSP) return 0 whenever two vertices are adjacent in G, and 1 whenever they are not.
  • Apply our TSP-solving algorithm to (G′, f, t = 0), and return the result. This will find whether there's a tour of G′ that only uses edges whose counterparts exist in G.

The above is a polynomial-time reduction from HAM-CYCLE to TSP. (Do you see why?)

ruakh
  • 175,680
  • 26
  • 273
  • 307