3 ms·
Given a solution to the decision version of TSP, you can verify whether that solution is valid in polynomial time - just check if it does visit the nodes and is
by beecafe 5y ago
Given a solution to the decision version of TSP, you can verify whether that solution is valid in polynomial time - just check if it does visit the nodes and is of the claimed length.
A normal Turing machine could perform this check in poly time, and a nondeterministic one could check all solutions (exponentially many) in poly time, hence NP.