37

I would like to know what is the problem name for TSP w/o considering the way of going back to starting point and what is the algorithm to solve this.

I looked into Shortest path problem but that is not what I am looking for, the problem only find the shortest path from 2 assigned points. But what I am looking for is the problem which we give n points and inputting only 1 starting point. Then, find the shortest path traveling all points exactly once. (end point can be any point.)

I also looked into Hamiltonian path problem but it seems not to solve my defined problem but rather find whether there is Hamiltonian path or not.

Please suggest me, Thank you!

A-letubby
  • 6,440
  • 8
  • 34
  • 46
  • 1
    A minimum spanning path perhaps? :) – carlpett Jul 18 '11 at 13:57
  • 2
    Shortest Hamiltonian Path? I just made it up, too. – Szocske Jul 18 '11 at 14:00
  • 36
    The divorced salesman – Chris Eberle Jul 18 '11 at 14:13
  • I'm sorry for unclear question. I would like to know the name because I want some keyword to find some solution. – A-letubby Jul 19 '11 at 15:16
  • For easy understanding(I think), let's imagine I am the traveler and I want to travel to all the countries in this world starting from my country (each only once include my country), longer distance between 2 countries is, more expensive the cost is. If I reach the last country I will live there and spend all of my life there. What is the least expense? If I use TSP, I think some good solution might be cut out since there is the condition that at last I have to be home. – A-letubby Jul 19 '11 at 15:28

2 Answers2

37

I've found the answer to my question in this book. It is the same with Computer wiring problem which occurs repeatedly in the design of computers and other digital systems. The purpose is to minimize the total wire length. So, it is indeed a minimum length Hamiltonian path.

What the book suggests is to create a dummy point whose distances to every other points is 0. Therefore, the problem becomes an (n+1)-city symmetric TSP. After solving, just delete dummy point and then the minimum length Hamiltonian path is solved and we can get the TSP path without returning back the start point.

A-letubby
  • 6,440
  • 8
  • 34
  • 46
2

If I understand correctly, you want to find the shortest path (that starts from some vertex s) and goes through all the nodes in the graph without visiting the same node twice. A simpler problem, is the hamiltonian path problem. It asks, like you said, weather there exists such a path or not. Since that problem is NP-hard, and it's easier than your problem, solving your problem is at least NP-Hard. Well, that isn't true because your problem is not a decision problem. But what it does say is that we can almost be sure that there is no polynomial algorithm for your problem.

You can resort to approximation. There is a pretty cool approximation for the metric TSP here: http://en.wikipedia.org/wiki/Travelling_salesman_problem#Metric_TSP.

Guy
  • 12,478
  • 25
  • 61
  • 86
  • 1
    If you have an algorithm to test whether a path shorter than X exists, it can usually be turned into an algorithm to find the length of the shortest path using binary search at no increase of complexity. Then again the question of the length of the shortest path can be turned into an algorithm to find the shortest path by dropping edges. This has to do with the decision problem being NP-Complete, thus allowing for reduction of seemingly more complex problems. – LiKao Jul 18 '11 at 14:28
  • You're not contradicting my answer right? You agree that the problem proposed probably doesn't have a polynomial algorithm that solves it - right? – Guy Jul 18 '11 at 14:38
  • @Guy He's not contradicting you, he's just commenting on you remark about decision problems. This is definately NP-complete, but your proof lacks something: Hamiltion path does not have a fixed starting point, afaik. Also, your remark "easier" is sloppy in a proof. You could say "If you could solve the decision of Divorced-TSP with a bounds large enough (sum of all edges), then you can solve Hamiltonian Path" (which btw imho hasn't been proven here yet). – Albert Hendriks Jul 18 '11 at 19:03
  • @Guy: No I am not contradicting on your point that this problem does not have a simple solution. As far as I can tell the problem seems NP-complete (I do not have a proof though). All I wanted to point out was that the decision problem cannot have a lower complexity than the calculation problem, because of the polynomial reduction. So if Divorced-TSP is NP-Complete the corresponding decision problem will be NP-Complete as well. – LiKao Jul 19 '11 at 09:10
  • P.s. it should be obvious that the other way of reduction is trivial so this just prooves that the classes of the calculation-problem and the decision problem have to be equal. This does not say in which class they are in though. – LiKao Jul 19 '11 at 09:12