简体   繁体   中英

Is Shortest Hamiltonian path NP-hard?

Hamiltonian Path is a path that connects all nodes without repeat and it is an NP-complete problem.

  1. Is the Shortest Hamiltonian Path (SHP) NP-hard?

  2. What is the difference between travelling salesman problem with SHP?

I assume the SHP problem is the Hamiltonian problem on the edge weighted graph. It is NP-hard because it is at least as hard as the Hamiltonian problem. Assume you have an algorithm to solve the SHP problem, then you apply the algorithm on a weighted graph with all edge weights are 1, it will solve the Hamiltonian problem with the same time complexity.

TSP requires to return to the original vertex and you can visit each vertex more one once. SHP asks for the path which visits every vertex exactly once.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM