Some NP-Complete Problems in Quadratic and Nonlinear Programming: Copositivity Testing Is NP-Hard via Subset SumResearch Paper
Motivation
Nonlinear programming algorithms are routinely advertised as finding a local minimum. Most of them only certify first-order conditions (a KKT point), and the natural next question is whether a given feasible point is in fact a local minimum. For smooth problems where the Hessian is nonsingular this is a second-order test, but in the degenerate case the test itself becomes a combinatorial question about a quadratic form restricted to a cone.
K. G. Murty and S. N. Kabadi (Math. Programming 39 (1987) 117–129) showed that this question is intractable already in its simplest instance: deciding whether is a local minimum of a quadratic form on the nonnegative orthant is NP-complete, and so is deciding whether a square integer matrix is copositive. The paper is the standard reference for the hardness of copositivity testing, which matters for copositive programming, for second-order optimality checks in constrained optimization, and for the complexity of local search in nonconvex optimization.
Setting
Let be a real square matrix of order and . The matrix is copositive if for every (coordinatewise). The paper considers the quadratic program
and the following questions, each phrased so that "yes" is the interesting answer:
- Problem 1. Is not a local minimum of (7)?
- Problem 2. Is not bounded below on ?
- Problem 3. Is there an with (is not copositive)?
- Problem 4. Given , is there an with and ? Here is the all-ones vector.
- Problems 11, 12. With , the objective of the unconstrained problem (15): is not a local minimum of on , and is not bounded below?
The source problem is subset sum (Problem 5): given positive integers , is there with ? Let be the total number of digits in the data. The paper fixes an integer and a rational with , and defines functions of nonnegative variables :
, a homogeneous quadratic that agrees with on the set
and . The function is a quadratic form in ; the symmetric matrix , with entries computed explicitly from , is the output of the reduction.
Formalization targets
Goal: the reduction is correct
For positive integer data and as above, with the matrix of , the following are equivalent:
This is the mathematical content of Theorems 1–3 and §4: a polynomially computable map from subset sum instances to matrices under which every one of these questions has the answer of the subset sum instance.
Milestones along the paper's chain
- Problems 5 and 6 are equivalent: subset sum is solvable iff some has .
- Problems 6 and 7 are equivalent ( vs. on ).
- Problems 7 and 8 are equivalent ( vs. on ).
- Lemma 2: for an integer symmetric of size , the minimum of over is or at most .
- Problems 8 and 9 are equivalent: with iff with .
- Problem 9 is a special case of Problem 4: , and Problem 9 is Problem 4 for .
- Problems 3 and 4 are equivalent, for any and .
- Problems 1 and 2 are equivalent to Problem 3, for any .
- Problems 11 and 12 are equivalent to Problems 1 and 2, for any .
Significance
The result. The equivalence shows that checking local optimality of a feasible point, checking boundedness of a quadratic objective on a cone, and checking copositivity are all at least as hard as subset sum, hence NP-hard. Through (15) the same holds for local minimality and boundedness of a quartic polynomial with no constraints at all. These facts are the standard justification for why nonconvex solvers settle for KKT points, and the copositivity part underlies the hardness of copositive programming.
The formalization. The paper's claims are proved, and have been cited for decades, but the proof as printed is a sketch: several steps are stated as "clearly" or "it can be verified", and one step of the proof of Theorem 1 (p. 125) is false as written. The inequality for fails for slightly above , and the pointwise implication " on " has an explicit counterexample. The equivalence of Problems 6 and 7 itself survives numerical checks. A machine-checked proof of the goal settles the correctness of the reduction with the paper's own constants. No machine-checked proof of these statements exists on the platform.
Difficulty
The combinatorial direction (a subset sum solution gives a point with ) is a computation. The converse direction carries the content, in two places.
First, passing from to trades the linear penalty for a quadratic one. This is harmless on the box but not for , where is negative. The printed argument handles this coordinate by coordinate and is wrong there; a correct argument has to show that no point of with exists unless a point with does, which requires a global use of the size of .
Second, passing from to requires a quantitative gap: if on then with of only polynomially many bits. Lemma 2 provides such a gap for the unit box and integer matrices, but is not the box and has rational coefficients, so the lemma does not apply verbatim.
The remaining equivalences (Problems 1, 2, 3, 4, 11, 12 for a fixed matrix) follow from homogeneity of the quadratic form and the substitution , and are routine.
Formalization scope
The data are natural numbers and is rational; all are cast to in and . The index is Fin n, and the variables of are indexed by Fin n ⊕ Fin n with Sum.elim y s. Standing hypotheses: and (the paper's "all positive integers"); in ; and in . The size counts decimal digits. Problem 1 is local minimality relative to the orthant, Problem 11 is unconstrained local minimality, both in the Euclidean topology. Lemma 2 is stated for integer symmetric (as §4 of the paper says, "as before … symmetric"), with Schrijver's encoding size, since the paper does not define "the size of "; the "optimum is or " is stated as a disjunction without an infimum. The milestones on over assume , which the paper assumes tacitly; the goal needs no such hypothesis.
Not formalized: membership in NP (Lemma 1), the polynomial-time computability of and its encoding size, the NP-completeness of subset sum (cited by the paper from Garey–Johnson), Theorem 4, and any of the words "NP-complete" or "NP-hard". The platform's complexity layer (Turing machines over bitstrings) has no subset sum problem and no encoding of rational matrices. The matrix has rational entries; a positive integer multiple of it is the integer matrix of Theorem 3, has the same answer to every question, and the rescaling is not formalized. The §3 standing assumption "D is not PSD" is not imposed; the constructed matrix can be PSD and the equivalence holds regardless.
The goal is about the explicit matrix , whose entries are given in the definitions; it is not about "some matrix whose quadratic form is ", and the constants and are the paper's explicit bounds, not "sufficiently large" or "for some ". A formalization that quantifies existentially over the matrix or the precision would be trivially true and is ruled out.
Contributions welcome: proofs of the matrix identity and the homogeneity arguments (milestones 6–9), a proof of Lemma 2 (which needs a Cramer/Hadamard bound on basic solutions of the linear complementarity system (9)), and a correct proof of the step. The copositivity definitions and milestones 7–9 are reusable for any later work on copositive programming.
Selected references
- K. G. Murty and S. N. Kabadi, Some NP-complete problems in quadratic and nonlinear programming, Mathematical Programming 39 (1987) 117–129. https://doi.org/10.1007/BF02592948
- M. R. Garey and D. S. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness, W. H. Freeman, 1979 (subset sum, problem [SP13]).
- A. Schrijver, Theory of Linear and Integer Programming, Wiley, 1986 (encoding sizes, §2.1).