Why is the TSP NP-hard and the Hamiltonian path NP-complete?

Why not these two problems, namely TSP and Hamilton's path problem , like NP-complete?

They seem the same.

+4
source share
2 answers

In order for problem X to be NP-complete , it must satisfy:

  • X is in NP , given the solution of X, the solution can be checked in polynomial time.
  • X NP-hard, .. NP ( NP- (, )).

(TSP):

  • (, , ), - TSP. , , NP, , , NP-hard . NP .
  • - K, < K? (/), ( , ), NP, NP-hard (by , ). NP, NP- .
+6

NP- NP- , . , NP-, NP , NP-, NP-hard NP.

NP , / . TSP NP, - , . TSP NP-, NP-.

, "/", NP. , NP-, NP-complete.

TSP , " ?". " , X ?", NP, NP-.

+4

Source: https://habr.com/ru/post/1649462/


All Articles