I want to change the original TSP problem as follows: the cost to visit a city is not related to the previous city that it visited just now, but only on its position in the sequence. Is the problem of finding the minimal cost tour still NP-complete?
Asked
Active
Viewed 36 times
1
-
the quesiton can also be expressed that" there exist at least one solution to traverse all cities once,but i want to find the solution with lowest cost" – yingwan Mar 08 '18 at 13:26
-
the original problem is at "https://cs.stackexchange.com/questions/89092/topological-sort-np-hard-prove" – yingwan Mar 09 '18 at 01:25
1 Answers
1
Your problem is the same as minimum-weight perfect matching in a bipartite graph. If there are $n$ cities, consider the bipartite graph in which one side consists of vertices $p_1,\ldots,p_n$, the other side consists of vertices $c_1,\ldots,c_n$, and the weight of the edge $(p_i,x_j)$ is the cost of city $j$ at position $i$.
A minimum-weight perfect matching in a bipartite graph can be found efficiently (this is known as the assignment problem). In particular, the problem is not NP-hard unless P=NP.

Yuval Filmus
- 276,994
- 27
- 311
- 503
-
thanks a lot for your careful explanation,but I have a question that the assignment has a restricted condition that some task must be assigned bofore others, this is to say those tasks have to Satisfies the partial order relation. – yingwan Mar 08 '18 at 14:11
-
I am a student and meet this problem during my research. Thanks a lot for your kindly reply, Can I have your email so that I can consult you further, My email is [email protected] – yingwan Mar 08 '18 at 14:14
-
Now that you know what your problem is called, you can look for the assignment problem with constraints. – Yuval Filmus Mar 08 '18 at 15:04