Traveling Salesman with exceptions

366 Views Asked by At

Assume a regular TSP problem with n cities. However, in this particular problem, we do not have to visit all the n cities, only a specific subset of them, m, where m<=n. The cities in n but not in m don't need to be visited, but they might if the path m1->m2 is larger than m1->n1->m2 for example.

Is this problem still NP-hard ? If yes, to which problem can it be reduced to or what proof could be used to show that it's still NP-hard?

Thanks in advance.

EDIT: m >= 3. We have at least an starting city, an ending city and m-2 cities in between that must be visited.

1

There are 1 best solutions below

2
On

This problem, as stated, is too vague to answer. What is critical is the relationship between $m,n$. If $m=n$, then this is identical to TSP. If $m=n-1$ or similar, it is polynomially equivalent to TSP. If $m=2$, then the problem is polynomial-time: find the shortest path between the two vertices with Dijkstra's algorithm.