Traveling Salesman Problem is NP-Complete

Problem Statement
There are two versions of the Traveling Salesman Problem.

The function version:
 * Given a complete weighted graph $G$ with positive integer weights find a Hamilton Cycle in $G$ with minimum weight.

The decision version:
 * Given a complete weighted graph $G$ with positive integer weights and a maximum weight $m$ decide if $G$ has a Hamilton Cycle with a total weight of at most $m$.

Theorem
Both versions of the Traveling Salesman Problem are NP-complete.

The Function Version of the Problem is Reducible to the Decision Version of the Problem
The size of the Traveling Salesman Problem can be measured by $log(s) * n^2$ where $n$ is the number of cities and $s$ is the maximum weight of any edge of the graph.

The following algorithm solves the function version of the Traveling Salesman problem by solving $O(log(s)) + O(n^2)$ instances of the decision problem.

Input: A weighted graph $G$

Output: The Minimum Hamilton Cycle in $G$

Auxiliary Functions: $f \left( {G,m} \right) = 1$ if $G$ contains a Hamilton Cycle with weight at most $m$, and equals $0$ otherwise

determining $m$
Set $Max$ initially at $s*n$.

Set $min$ initially at $0$.

While $min+1 \neq Max$
 * Set $cut$ at $\lfloor {\frac{min + Max}{2}} \rfloor$.
 * Calculate $f \left( {G, cut } \right)$ if the value is $1$ replace $min$ with $cut$. Otherwise replace $Max$ with $cut$.

At this point $min$ is the weight of the minimum path through $G$. Call that number $m$.

calculating the path
Pick a starting vertex as a focus vertex. Call it $v$. The solution path starts at $v$.

Until the solution path is a Hamilton Cycle:


 * Pick one of the edges going out of the focus vertex that has not been considered before in this algorithm. Call that edge $\left({v,u}\right)$.
 * Change the weight of $\left({v,u}\right)$ with a larger number (such as $m$).
 * If $f \left( {G, m } \right) = 1$ leave the edge at the higher weight
 * Otherwise add $u$ to the end of the solution set, return the weight of the edge to the original weight, and change the focus vertex to $u$.

At this point the solution path is the minimal Hamilton Cycle in the original graph. This polynomially reduces the function problem to the decision problem.

Likewise the decision problem can be reduced to the function problem by finding the minimal Hamilton Cycle in $G$, adding the weights of the included edges together and checking to see if that number is less then $m$. Because they are both polynomially reducible to each other we can show that they are both NP and NP-hard by showing that one of them is.

The Traveling Salesman Problem is NP
Given a graph $G$, an upper bound $m$, and a possible solution in the form of a Hamilton path it is possible to verify or reject that solution with $n$ additions and a single numerical comparison. This can be accomplished in polynomial time. Because a  potential solution can be verified or rejected in polynomial time the decision version of the Traveling Salesman Problem is NP. This implies both versions are NP.

The Traveling Salesman Problem is NP-hard
The Directed Hamilton Cycle Problem is NP-hard. By reducing that problem to the Traveling Salesman problem we can show that the Traveling Salesman Problem is NP-hard.

The reduction is fairly straightforward. Given a directed graph $G$ with $n$ vertices construct a new weighted complete graph $G^{\prime}$ the same vertices where the weight of the edge $\left( {v, u}\right)$ has weight $1$ if the edge $\left( {v , u}\right)$ is in the original graph $G$, and the edge has weight $ n + 1 $ otherwise.

$G$ has a Hamilton Cycle if there is a Hamilton Cycle in $G^{\prime}$ with a total weight of $n$.

The Directed Hamilton Cycle problem reduces to the Traveling Salesman Problem, therefore the Traveling Salesman Problem is NP-hard.

Because the Traveling Salesman problem is both NP and NP-hard the Traveling Salesman Problem is NP-complete.