CoNP-Completeness of Matrix Copositivity #
Testing whether an encoded symmetric rational matrix M is copositive—meaning x ⬝ᵥ M *ᵥ x ≥ 0
for all entrywise nonnegative vectors x—is coNP-complete, and testing non-copositivity is
NP-complete. The completeness statements are credited to [MK87] (secondary search
summaries indicate that [MK87] proves hardness by reducing from subset sum rather than
Clique; the published text was not inspected). This library's Clique/Motzkin–Straus
reduction (polyTimeReducible_Clique_NonCopositive), the row-list representation SymRatMatrix,
binary encoding encSymRatMatrix, denominator-cleared verifier NonCopositive.check, and the
KKT/Cramer bounded integer witness derivation are original to this formalization.
By Matrix.exists_nat_dotProduct_lt_zero_of_rat, a symmetric rational matrix fails to be
copositive if and only if it admits a polynomially bit-bounded nonnegative integer vector p with
p ⬝ᵥ M *ᵥ p < 0. A polynomial-time verifier clears denominators by multiplying by the product
D of entry denominators and evaluates p ⬝ᵥ M_int *ᵥ p < 0, placing NonCopositive in NP
and Copositive in coNP. In the reverse direction, the Motzkin–Straus copositivity
characterization (SimpleGraph.exists_nonneg_dotProduct_copositiveCliqueMatrix_lt_zero_iff) gives
a polynomial-time many-one reduction from Clique to NonCopositive.
Main definitions #
Cslib.Complexity.SymRatMatrix,Cslib.Complexity.encSymRatMatrix: symmetric rational square matrices represented by row lists and their binary encoding viaTuring.MultiTapeTM.encRat.Cslib.Complexity.Copositive,Cslib.Complexity.NonCopositive: the copositivity and non-copositivity decision problems.Cslib.Complexity.NonCopositive.check: polynomial-time verifier relation forNonCopositive.Cslib.Complexity.cliqueToSymRatMatrix: polynomial-time reduction fromCliquetoNonCopositive.
Main results #
Cslib.Complexity.NonCopositive.mem_NP,Cslib.Complexity.Copositive.mem_coNP:NP/coNPmembership using the bounded nonnegative integer witness theorem.Cslib.Complexity.polyTimeReducible_Clique_NonCopositive: polynomial-time many-one reductionClique ≤ₚ NonCopositive.Cslib.Complexity.NonCopositive_npHard,Cslib.Complexity.NonCopositive_npComplete:NP-completeness ofNonCopositive.Cslib.Complexity.Copositive_coNPHard,Cslib.Complexity.Copositive_coNPComplete:coNP-completeness ofCopositive.
References #
- [MS65] T. S. Motzkin and E. G. Straus, Maxima for graphs and a new proof of a theorem of Turán, Canadian Journal of Mathematics 17, 1965, 533–540 (bibliographic metadata only; the published text is uninspected, and no internal theorem numbers are claimed).
- [MK87] K. G. Murty and S. N. Kabadi, Some NP-complete problems in quadratic and nonlinear programming, Mathematical Programming 39(2), 1987, 117–129 (bibliographic metadata only; the published text is uninspected, and no internal theorem numbers are claimed).
Symmetric rational matrix encoding #
A square symmetric rational matrix represented by its list of rows.
The rows of the matrix.
Every row has length equal to the number of rows.
Symmetry of entries under index transposition.
Binary encoding of symmetric rational matrices via their row lists.
Binary encoding of (M, p) pairs for NonCopositive verification.
Interpret a SymRatMatrix as an n × n Matrix over ℚ, where n = M.rows.length.
The language of symmetric rational matrices that are copositive.
The language of symmetric rational matrices that are not copositive.
Copositivity of a SymRatMatrix over ℚ coincides with copositivity over ℝ.
NP verifier for non-copositivity #
Common denominator for all entries of a rational matrix M: the product of its denominators.
Integerized matrix obtained by multiplying each entry of M by M.commonDenom.
Polynomial-time verifier relation for NonCopositive: p has length M.rows.length and
p ⬝ᵥ M.intRows *ᵥ p < 0.
Reduction from Clique to NonCopositive #
Entry (u, v) of the reduction matrix for (G, k).
Row list produced by the reduction from a Clique instance (G, k) to a symmetric rational
matrix. For k ≥ 2 on a graph with nonempty vertex list, this is the Motzkin–Straus matrix
(k - 2) J - (k - 1) A_G.
Polynomial-time many-one reduction mapping a Clique instance (G, k) to a symmetric
rational matrix M such that (G, k) ∈ Clique ↔ M ∈ NonCopositive.
Polynomial-time many-one reduction from Clique to NonCopositive.
NonCopositive is NP-hard (proved here via Clique and Motzkin–Straus; [MK87]
establishes completeness in the literature, reported via subset sum).
NonCopositive is NP-complete (completeness statement credited to [MK87];
library proof combines bounded integer witness verification with Clique/Motzkin–Straus).
Copositive is coNP-hard (proved here via Clique and Motzkin–Straus).
Copositive is coNP-complete (completeness statement credited to [MK87];
library proof uses NonCopositive membership and the Clique/Motzkin–Straus reduction).