Past exam of the mathematics course of the University of Cambridge 2007 iii Paper 40 2 Solution Created 2026-10-03 Updated 2026-10-14
An integer program for the travelling salesman problem must exclude disconnected cycle covers, not merely require one incoming and one outgoing edge. Here is a compact order formulation of the travelling salesman problem. The one-city case is trivial. For , use binary variables for directed edges, , and integer variables for . Minimize subject toThe degree equations give a collection of disjoint directed cycles. Along any selected edge between nondistinguished cities, the last inequality gives . Summing around a cycle avoiding city would yield for its positive length . Thus every cycle must contain city , so there is exactly one tour. Conversely, number the cities after city in tour order, giving . Selected edges satisfy the order inequalities. Unselected edges impose no additional restriction, since . This proves equivalence with tours, including symmetric-distance instances represented by directed variables.
There are variables and rows. For the bit count, store only nonzero coefficients and their indices. The degree equations have entries in total; each order inequality has three entries, so these too have entries. Indices and the coefficients bounded by need bits each. The objective has distance coefficients, each needing at most bits because the PDF's bound is . ThereforeWriting an unnecessarily dense constraint matrix would give a larger encoding; it is the sparse explicit encoding that establishes the requested bound. For the decision version add . A threshold can be capped at , so its relevant binary length is ; negative thresholds can be rejected immediately for nonnegative distances.
A decision problem belongs to NP if its yes-instances have certificates of polynomial length checkable in deterministic polynomial time. It is NP-complete if it belongs to NP and every NP problem has a polynomial-time many-one reduction to it. The preceding construction is a polynomial-time reduction from travelling-salesman decision to integer-linear feasibility. If the former is NP-complete, the latter is consequently NP-hard.
For completeness we must also establish membership in NP for general integer-linear feasibility, rather than just for the binary instances produced by the reduction. An arbitrary feasible integer assignment could be numerically enormous; what is needed is the existence of a short one. We give a small integer feasibility witness by homogeneous cone decomposition.
Split each unrestricted integer variable into the difference of two nonnegative integer variables and add nonnegative integer slacks to inequalities. This gives , , with variables and integer data bounded in absolute value by . Both and are polynomially bounded by the original input length. Consider the homogeneous coneEvery vector in this cone is a nonnegative combination of at most support-minimal rays. To prove this, choose a nonnegative kernel vector of minimal nonempty support contained in the support of a given vector, subtract with the smallest positive coordinate ratio, and repeat. Each subtraction strictly reduces support. On a minimal support the kernel is one-dimensional: an independent kernel direction would let us perturb a positive vector to the boundary of its support without making it zero, contradicting minimality. Cofactors of independent rows therefore give an integer nonnegative generator of each such ray. Every coordinate is bounded byusing the elementary determinant bound. This proves the needed support-minimal rays of a nonnegative kernel facts directly.
Start with any integer feasible and decompose in this way. A ray whose last coordinate is a positive integer normalizes to a point with and ; the coefficients of these normalized points sum to one. Rays with last coordinate zero have integer nonnegative first coordinates with and coordinates at most . Hencewith at most ray terms. Subtract from . The result is still integer, nonnegative and feasible, and satisfiesIts binary length is polynomial, since . The assignment can be checked by exact integer arithmetic in polynomial time. Thus general integer-linear feasibility is in NP. Combining this with the reduction proves