Math 2.0

Operations research, mathematical programming Combinatorial optimization Problem

Travelling salesman problem

Builds on GraphHamiltonian cycleNP-hardnessNP-completenessP

Problem

Let n≥3n \ge 3, and let KnK_n be the complete graph on the vertex set {1,…,n}\set{1, \dots, n}. Let ww assign to each edge {i,j}\set{i, j} a nonnegative weight w(i,j)w(i, j), the distance between cities ii and jj. A tour is a Hamiltonian cycle in KnK_n, and its length is the sum of the weights of its edges. The travelling salesman problem asks for a tour of minimum length. In the decision version, an input (n,w,B)(n, w, B) with a number BB is given, and the question is whether some tour has length at most BB.

Remarks

The decision version is NP-complete, and the optimization version is NP-hard. Hardness follows from the Hamiltonian cycle problem. Given a graph GG on nn vertices, give weight 11 to its edges and weight 22 to the other pairs. Then GG has a Hamiltonian cycle exactly when some tour has length nn. Trying all (n−1)!/2(n-1)!/2 tours solves the problem. The Held–Karp dynamic programming algorithm takes O(n22n)O(n^2 2^n) steps. When ww satisfies the triangle inequality, Christofides' algorithm finds a tour at most 3/23/2 times the optimum in polynomial time. Without the triangle inequality, no polynomial-time algorithm achieves any constant approximation factor unless P=NP\mathrm{P} = \mathrm{NP}.

Reading path

To understand this page from the ground up, read these 6 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Graph concept
  2. Hamiltonian cycle concept
  3. NP-completeness concept
  4. NP-hardness concept
  5. P concept
  6. Travelling salesman problem problem

Where this leads

5 pages build on this one.

Further reading

  1. Web https://en.wikipedia.org/wiki/Travelling_salesman_problem
About this page
TagXJRHJX2241
URIm2://XJRHJX2241
Kindproblem
WritingW0 stub
MSC90C27, 68Q17
StatusThis copy of the site has no build data. Run m2 status XJRHJX2241.
AboutHamiltonian cycle
UsesGraph, Hamiltonian cycle, NP-hardness, NP-completeness, P
Same as
Changed3 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

Used by