Max-TSP 2026-10-14
Find a maximum-weight Hamiltonian cycle in a complete weighted graph or complete directed graph. Nonnegative weights admit a cycle-cover patching half-approximation for Max-TSP without a triangle inequality. For integer weights, changing to , with , changes an -vertex tour's weight from to . Consequently the strict-threshold decision version is NP-complete: minimum-tour threshold becomes maximum-tour threshold .
Past exam of the mathematics course of the University of Cambridge 2008 iii Paper 38 5 Solution Created 2026-10-03 Updated 2026-10-14
Use a complete directed graph on cities, with integral arc costs and a threshold . A symmetric cost matrix also represents the undirected travelling salesman problem by orienting a tour. Let the binary variable indicate that city follows city , and forbid self-arcs. The decision integer programming formulation asks whether the following system has a solution:The in-degree and out-degree equations make the selected arcs a cycle cover of a directed graph. Any proper graph cycle on a city set would violate its subset inequality, so the selected arcs form one Hamiltonian cycle. Conversely, a Hamiltonian cycle obeys every inequality: a proper subset cannot contain all the successor arcs of its graph vertices. Thus the binary feasibility system is equivalent to the decision travelling salesman problem. The subset formulation has exponentially many inequalities, which is harmless for this formulation; verifying a proposed tour does not require listing them.
To call this decision problem NP-complete means two separate things. It belongs to NP: a yes-instance has a polynomial-length certificate in computational complexity, namely the cyclic ordering of the cities, and a deterministic algorithm checks distinct visits, the return to the start, and the total cost in polynomial time in the binary input length. It is also NP-hard: every decision problem in NP has a polynomial-time many-one reduction to it, preserving yes and no answers. This is a statement about worst-case computation on finite encodings, not a proof that every individual tour is hard to find or that no polynomial algorithm exists; that last conclusion would require .
For the strict-threshold decision Max-TSP, choose an integer and replace each arc cost by . Every tour uses exactly arcs, soSet the new threshold to . Its encoding length, the transformed matrix's encoding length and the computation time are all polynomial in the original input length. If thresholds are required to be nonnegative, take ; the same identity works. Symmetry of costs is preserved. This is a polynomial-time many-one reduction from decision travelling salesman problem to decision Max-TSP, so the latter is NP-hard. A tour is again a polynomially verifiable certificate in computational complexity, now checking strict excess over , soFor the approximation algorithm, use the standard nonnegative-length setting on a complete graph; no triangle inequality is required. Solve the maximum-weight assignment problem with diagonal assignments forbidden, for example by applying the Hungarian algorithm to the negative weights. The resulting cycle cover of a directed graph has weight with , since every tour is an allowed assignment.
If it already has a single graph cycle, it is an optimal tour. Otherwise remove a least-weight arc from each graph cycle. A graph cycle of arcs and weight loses at most . The remaining arcs form vertex-disjoint graph paths covering all cities. Join the endpoint of each graph path to the start of the next, cyclically. The required arcs exist by completeness, and their nonnegative weights cannot diminish the retained weight. The resulting single Hamiltonian cycle therefore satisfiesThe Hungarian algorithm takes arithmetic operations, and finding the graph cycles, cutting them and patching the graph paths takes further operations. For rational or integer weights these operations have polynomial encoding length, giving polynomial time. With symmetric costs, the same directed construction is a valid undirected tour after forgetting its orientation. This is the cycle-cover patching half-approximation for Max-TSP.
Nonnegativity is essential to this multiplicative guarantee. If arbitrary signed weights were allowed, giving every arc cost would make every tour have weight , while half the optimum is . No tour could achieve the requested bound. Thus “length” has its usual nonnegative meaning in the approximation assertion.