Mapping Problems to Prove TSP Solves HCP

  • Thread starter STEMucator
  • Start date
  • Tags
    Mapping
In summary, the conversation discusses the concept of problem mapping and how it can be used to prove that a solution to the Traveling Salesman Problem would also provide a solution to the Hamilton Cycle problem. The proper mapping involves recognizing important details and creating a map from one problem to the other, using a distance function and a minimum length calculation. This concept is well-discussed in computational complexity textbooks and is a commonly known aspect of NP-Complete problems.
  • #1
STEMucator
Homework Helper
2,076
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
  • #2
That all seems reasonable.
 
  • #3
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".
 

Related to Mapping Problems to Prove TSP Solves HCP

1. What is the Traveling Salesman Problem (TSP)?

The Traveling Salesman Problem (TSP) is a classic mathematical problem that involves finding the shortest possible route that visits a given set of cities and returns to the starting city. It is a well-known problem in the field of computer science and is considered to be one of the most difficult problems to solve.

2. What is the Hamiltonian Cycle Problem (HCP)?

The Hamiltonian Cycle Problem (HCP) is another classic mathematical problem that involves finding a cycle that visits every vertex of a given graph exactly once. It is closely related to the TSP, as finding a Hamiltonian cycle in a graph is equivalent to solving the TSP for that graph.

3. How does mapping problems to TSP help solve the HCP?

By mapping the HCP to the TSP, we can use existing algorithms and techniques that have been developed to solve the TSP. This saves time and effort, as trying to develop a separate algorithm for the HCP can be more challenging and time-consuming.

4. What are some common mapping techniques used to solve the HCP using the TSP?

Some common mapping techniques include using a complete graph, where each vertex in the graph represents a city in the TSP instance, and using a directed graph, where the edges represent the distances between cities in the TSP instance. Other techniques involve converting the HCP into a TSP instance by adding dummy vertices and edges.

5. Are there any limitations to using the TSP to solve the HCP?

While mapping the HCP to the TSP can be an effective way to solve the problem, it is not a guaranteed solution. This is because the TSP is an NP-hard problem, meaning that it is difficult to find an optimal solution in a reasonable amount of time. Therefore, while using the TSP to solve the HCP can be helpful, it may not always result in the most efficient solution.

Similar threads

  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
15
Views
1K
  • Calculus and Beyond Homework Help
Replies
9
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
727
Replies
5
Views
1K
  • Programming and Computer Science
Replies
8
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
Back
Top