a huge weight α|V|+1 on missing edges

UHC ≤p TSP-OPT

For every α≥1\alpha\ge1: if the optimization version of general TSPTSP admits an α\alpha-approximation, then P=NP\mathrm{P}=\mathrm{NP}. In fact this is an equivalence: some approximation exists   ⟺  P=NP\iff \mathrm{P}=\mathrm{NP}.

The construction

Background to the phrasing. There is no proven "hardness" in the NP world: we never proved an NP-hard problem cannot be solved efficiently, only that it is hard relative to the rest of NP\mathrm{NP}. So — especially for optimization problems, for which NP-hardness is not formally defined (it is defined via reductions between languages) — the results one can state are conditional hardness results: "if X were possible, then P=NP\mathrm{P}=\mathrm{NP}".

The algorithm. Let α≥1\alpha\ge1 and suppose for contradiction an α\alpha-approximation AA exists. Build an algorithm taking an undirected G=(V,E)G=(V,E):

  1. Build the complete graph G^=(V,E^)\hat G=(V,\hat E) on the same vertex set, and for every e∈E^e\in\hat E set w(e)={1e∈Eα∣V∣+1e∉Ew(e)=\begin{cases}1 & e\in E\\ \alpha|V|+1 & e\notin E\end{cases}
  2. Run AA on (G^,w)(\hat G,w).
  3. If the returned value is ≤α∣V∣\le\alpha|V| — accept; otherwise — reject.

This is almost the construction of UHC≤pTSPUHC\le_p TSP, but there the weights were 11 and 22, whereas here a "missing" edge weighs a huge amount. That hugeness is what buys the gap against α\alpha.

This object is not a mapping reduction. It is an algorithm calling another algorithm as a subroutine and interpreting the answer — the kind of "reduction" familiar from algorithms courses. Hence the phrasing "the algorithm decides UHCUHC", not "there is a reduction".

Visualization

Guided construction

General TSP has no constant approximation

Step 1 of 7
n = |V| = 5 · α = 2 · α|V|+1 = 11 · threshold αn = 10
Two five-vertex graphs completed with huge weights, and the gap between the two possible optimaOn the left a Hamiltonian graph whose optimal tour costs five; on the right a non-Hamiltonian bowtie whose cheapest tour must buy an edge of weight eleven and costs fifteen. A shared axis shows the yes interval from five to ten, the accept threshold at ten, and the no interval from fifteen upward, with an empty band between them.G ∈ UHCbowtie + chord {2,4}12345G ∉ UHCbowtie: 3 is a cut vertex12345
Original edge, w = 1
Why a Hamiltonian cycle existsThe chord {2,4} closes the cycle 1→2→4→5→3→1, which visits every vertex exactly once using only edges of G.
Why none exists in the bowtieDeleting vertex 3 leaves the two components {1,2} and {4,5}. A Hamiltonian cycle would have to pass through 3 twice to visit both, which a cycle cannot do.

Correctness — both directions

UHC ∈ ⟹ TSP-OPT ∈

G∈UHCG\in UHC. Then GG has a Hamiltonian cycle C0C_0. It exists in G^\hat G too (as E⊆E^E\subseteq\hat E), all its edges lying in EE and so weighing 11 each. A Hamiltonian cycle has exactly n=∣V∣n=|V| edges, so w(C0)=nw(C_0)=n.

Moreover every Hamiltonian cycle consists of nn edges each weighing at least 11, so OPT(G^,w)≥n\mathrm{OPT}(\hat G,w)\ge n; with the above, OPT(G^,w)=n\mathrm{OPT}(\hat G,w)=n exactly.

Since AA is an α\alpha-approximation for a minimization problem, its output satisfies w(A(G^,w))  ≤  α⋅OPT(G^,w)  =  αn.w(A(\hat G,w))\;\le\;\alpha\cdot\mathrm{OPT}(\hat G,w)\;=\;\alpha n . So step 3 accepts — as required.

TSP-OPT ∈ ⟹ UHC ∈

G∉UHCG\notin UHC. Then GG has no Hamiltonian cycle. Let CC be any Hamiltonian cycle in G^\hat G (one exists, as G^\hat G is complete). Since CC is not a Hamiltonian cycle of GG, it must contain an edge e∗∉Ee^*\notin E, so w(e∗)=αn+1w(e^*)=\alpha n+1. The other n−1n-1 edges contribute at least 11 each, so w(C)  ≥  (αn+1)+(n−1)  =  αn+n  >  αn.w(C)\;\ge\;(\alpha n+1)+(n-1)\;=\;\alpha n+n\;>\;\alpha n . This holds for every Hamiltonian cycle of G^\hat G, in particular the minimum one, so OPT(G^,w)>αn\mathrm{OPT}(\hat G,w)>\alpha n.

The approximation algorithm returns a feasible solution, and a feasible solution cannot be cheaper than the optimum, so w(A(G^,w))≥OPT(G^,w)>αnw(A(\hat G,w))\ge\mathrm{OPT}(\hat G,w)>\alpha n as well. So step 3 rejects — as required.

Note that both sides of the inequality were used. The forward direction used the "interesting" side (ALG≤α OPT\mathrm{ALG}\le\alpha\,\mathrm{OPT}); the backward direction used the trivial side (ALG≥OPT\mathrm{ALG}\ge\mathrm{OPT}), which follows from the output being feasible. Without the feasibility requirement the second direction would collapse.

Conclusion. The algorithm decides UHCUHC in polynomial time, so UHC∈PUHC\in\mathrm{P}. But UHCUHC is NP-hard, so every L∈NPL\in\mathrm{NP} satisfies L≤pUHC∈PL\le_p UHC\in\mathrm{P}, i.e. NP⊆P\mathrm{NP}\subseteq\mathrm{P}; with the trivial containment, P=NP\mathrm{P}=\mathrm{NP}.

Cost of the reduction

TimeO(|V|²) plus one call to A
SpaceO(|V|²)
Output sizeO(|V|²) for the constructed instance

Step 1 costs O(∣V∣2)O(|V|^2): the complete graph has (∣V∣2)\binom{|V|}{2} edges, each needing a test and a weight. The weight α∣V∣+1\alpha|V|+1 takes O(log⁡(α∣V∣))O(\log(\alpha|V|)) bits — a large but short number, which is exactly the difference between "a big number" and "a number you cannot write down".

Step 2 is polynomial because an approximation algorithm is by definition a polynomial algorithm, and ∣(G^,w)∣≤O(∣G∣2)|(\hat G,w)|\le O(|G|^2) with a polynomial of a polynomial being a polynomial. Step 3 is one comparison.

What it buys

General TSPTSP has no constant-factor approximation at all, unless P=NP\mathrm{P}=\mathrm{NP}. The full equivalence: an approximation at some ratio exists   ⟺  P=NP\iff\mathrm{P}=\mathrm{NP} — the converse being immediate, since if P=NP\mathrm{P}=\mathrm{NP} the optimization version can be solved exactly by binary search on the objective value, i.e. approximated within factor 11.

Pitfalls

  • The weights violate the triangle inequality wholesale — an expensive edge between two vertices joined by a cheap path. So the theorem speaks about general TSPTSP only, and does not contradict the 22-approximation for the metric version. That is the central point: exactly where the barrier breaks once the triangle inequality is imposed.

  • If α\alpha is not an integer, αn+1\alpha n+1 is not either. One may work with rational weights (and then α\alpha must be rational for it to be writable in polynomial time), or use ⌈αn⌉+1\lceil\alpha n\rceil+1; then w(C)≥⌈αn⌉+1+(n−1)>αnw(C)\ge\lceil\alpha n\rceil+1+(n-1)>\alpha n and the proof goes through word for word.

The chain

Rests on

Where this was read from

  • Lesson 13משפט 4: לכל α≥1\alpha \ge 1 — אם ניתן לקרב את בעיית הסוכן הנוסע הכללית ביחס α\alpha, אז P=NP\mathrm{P}=\mathrm{NP}
  • Guided exercisemetric-tsp-approximation
  • Both technical remarks — handling non-integral α\alpha, and the explicit note that the triangle inequality is violated — are not stated in the lecture; they are completions written into the lesson file.