Mapping Problems to Prove TSP Solves HCP

  • Thread starter Thread starter STEMucator
  • Start date Start date
  • Tags Tags
    Mapping
Click For Summary
SUMMARY

This discussion centers on the mapping between the Traveling Salesman Problem (TSP) and the Hamiltonian Cycle Problem (HCP). The correct mapping involves defining the cities as nodes (C = V) and establishing a distance function where d(v_i, v_j) = 1 if v_i, v_j are connected, and d(v_i, v_j) = 2 if they are not. The solution to the TSP can be utilized to determine the existence of a Hamiltonian Cycle by checking if the minimum path length is less than or equal to a specified number of nodes (n). This relationship highlights the polynomial reducibility of these NP-Complete problems.

PREREQUISITES
  • Understanding of NP-Complete problems
  • Familiarity with graph theory concepts, particularly nodes and edges
  • Knowledge of distance functions in graph mapping
  • Basic comprehension of computational complexity
NEXT STEPS
  • Study the polynomial-time reductions between NP-Complete problems
  • Explore the classic textbook "Computers and Intractability: A Guide to the Theory of NP-Completeness" by M.R. Garey and D.S. Johnson
  • Learn about graph traversal algorithms and their applications in solving TSP and HCP
  • Investigate other NP-Complete problems and their relationships
USEFUL FOR

Students and researchers in computer science, particularly those focusing on algorithms, computational complexity, and graph theory. This discussion is also beneficial for anyone looking to understand the relationship between TSP and HCP.

STEMucator
Homework Helper
Messages
2,076
Reaction score
140

Homework Statement



I wasn't sure where to post this in particular, so I apologize if this is in the wrong section.

I've been getting interested in the topic of problem mapping lately. I came across this problem while reading and I'm not quite sure if I have the right idea or not.

The Question :

A problem mapping means to create an instance of one problem out of the details (or data)
of another. Suppose you wanted to prove that a solution to the Traveling Salesman Problem would provide a solution to the Hamilton Cycle problem.

What is the correct mapping to use given the current information?

Homework Equations



Traveling Salesmen Problem ( TSP ) : http://gyazo.com/8944e64b668d3ea898662b083450d3d5

Hamiltonian Cycle Problem ( HCP ) : http://gyazo.com/865cb36a67f72cbd9db71913e1a4e076

The Attempt at a Solution



Well, the way I thought about this was to recognize the important details of the problems and create a map from one problem to the other. The reason this would work is because we already have a solution to one of the problems, namely the TSP ( Barring its computational limits which are exponential, i.e ##2^n## ).

So first things first. I map the cities to the nodes so ##C = V##.

Now I need a way to tell the distances between the cities, but since I'm trying to map the problem, it reduces to finding distances between nodes. Suppose I denote this distance by ##d_{i,j} ≥ 0##. The distance between cities is zero only when we are already at the destination of course.

So presume we have to travel some ##n > 0## number of nodes to reach our destination, and we have a distance function ##d(v_i, v_j)## which can tell the distance between two vertices which depend on ##i## and ##j##.

Let :

##d(v_i, v_j) = 1## if ##v_i, v_j \in E##.
##d(v_i, v_j) = 2## if ##v_i, v_j \notin E##.

We can now travel along each node and find a path with a positive distance to the destination.

If the minimum length found from the start to the destination is ≤ n, then the set of cities has a Hamilton Cycle, otherwise it does not.

So the proper mapping is :

##C = V##
##d(v_i, v_j) = 1## if ##v_i, v_j \in E##.
##d(v_i, v_j) = 2## if ##v_i, v_j \notin E##.
##B = n##
 
Physics news on Phys.org
That all seems reasonable.
 
Zondrina said:

Homework Statement



I wasn't sure where to post this in particular, so I apologize if this is in the wrong section.

I've been getting interested in the topic of problem mapping lately. I came across this problem while reading and I'm not quite sure if I have the right idea or not.

The Question :

A problem mapping means to create an instance of one problem out of the details (or data)
of another. Suppose you wanted to prove that a solution to the Traveling Salesman Problem would provide a solution to the Hamilton Cycle problem.

What is the correct mapping to use given the current information?

Homework Equations



Traveling Salesmen Problem ( TSP ) : http://gyazo.com/8944e64b668d3ea898662b083450d3d5

Hamiltonian Cycle Problem ( HCP ) : http://gyazo.com/865cb36a67f72cbd9db71913e1a4e076

The Attempt at a Solution



Well, the way I thought about this was to recognize the important details of the problems and create a map from one problem to the other. The reason this would work is because we already have a solution to one of the problems, namely the TSP ( Barring its computational limits which are exponential, i.e ##2^n## ).

So first things first. I map the cities to the nodes so ##C = V##.

Now I need a way to tell the distances between the cities, but since I'm trying to map the problem, it reduces to finding distances between nodes. Suppose I denote this distance by ##d_{i,j} ≥ 0##. The distance between cities is zero only when we are already at the destination of course.

So presume we have to travel some ##n > 0## number of nodes to reach our destination, and we have a distance function ##d(v_i, v_j)## which can tell the distance between two vertices which depend on ##i## and ##j##.

Let :

##d(v_i, v_j) = 1## if ##v_i, v_j \in E##.
##d(v_i, v_j) = 2## if ##v_i, v_j \notin E##.

We can now travel along each node and find a path with a positive distance to the destination.

If the minimum length found from the start to the destination is ≤ n, then the set of cities has a Hamilton Cycle, otherwise it does not.

So the proper mapping is :

##C = V##
##d(v_i, v_j) = 1## if ##v_i, v_j \in E##.
##d(v_i, v_j) = 2## if ##v_i, v_j \notin E##.
##B = n##

All this is pretty standard, and is well-discussed in computational complexity textbooks. Hamiltonian cycle and TSP are two instances of NP-Complete problems, and so are each reducible (in polynomially-bounded transformations) from one to the other. A lot of this stuff is presented in the old classic "Computers and Intractability: A Guide to the Theory of NP-Completeness", by M.R. Garey and D.S. Johnson, Freeman (1979). Or, you can Google "NP-Complete".
 

Similar threads

Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
15
Views
2K
Replies
9
Views
2K
Replies
3
Views
2K
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
3
Views
3K
Replies
8
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K