Rational linear-programming feasibility is in NP ∩ coNP #
LPFeasibility is the set of finite systems of linear inequalities ∑ j, a j * x j ≤ t with
integer coefficients (Cslib.Complexity.LinearInequality) that have a rational solution, encoded
by LPFeasibility.encSystem (encList encLinearInequality) as lists of inequalities with
signed-binary integers. A system with rational coefficients is equivalent to an integer one after
clearing denominators row by row.
Both a solution and a proof of infeasibility have polynomial-size certificates:
NP. A feasible system has a solutionw / dwith integersw jandd > 0of absolute value at most2 ^ ((3L + 3) * 6L), whereLis the length of the encoded system, by the basic-solution boundMatrix.exists_int_mulVec_le.LPFeasibility.checkverifies∑ j, a j * w j ≤ d * tfor every row in polynomial time.coNP. By Farkas' lemma (Matrix.not_exists_mulVec_le_iff) an infeasible system has a nonnegative combination of its rows that reads0 ≤ swiths < 0; byMatrix.exists_int_farkas_certificateit has one with integer multipliers bounded by the same2 ^ ((3L + 3) * 6L).LPFeasibility.certCheckverifies such a certificate in polynomial time.
The verifiers are integer computations, proved polynomial-time with the plain
ComputableInPolyTime calculus. Whether LPFeasibility is in P (Khachiyan's ellipsoid method,
or interior-point methods) is not formalized here.
Main definitions #
Cslib.Complexity.LinearInequality,Cslib.Complexity.encLinearInequality: integer linear inequalities and their signed-binary encoding.Cslib.Complexity.LPFeasibility, with the instance encodingCslib.Complexity.LPFeasibility.encSystem.Cslib.Complexity.LPFeasibility.check,Cslib.Complexity.LPFeasibility.certCheck: the certificate checks for feasibility and infeasibility.
Main results #
Cslib.Complexity.LPFeasibility.mem_iff_exists_mulVec_le: the matrix form of a system.Cslib.Complexity.LPFeasibility.mem_of_check,Cslib.Complexity.LPFeasibility.notMem_of_certCheck: soundness of the checks.Cslib.Complexity.LPFeasibility.computableInPolyTime_check,Cslib.Complexity.LPFeasibility.computableInPolyTime_certCheck: the checks are polynomial-time.Cslib.Complexity.LPFeasibility.mem_NP,Cslib.Complexity.LPFeasibility.mem_coNP,Cslib.Complexity.LPFeasibility.mem_NP_inter_coNP:LPFeasibility ∈ NP ∩ coNP.
References #
- [Sch86], Sections 3.2 and 10.1
Signed-binary encoding of LinearInequality: a framed signed-binary list of coefficients
(encList encIntBin) followed by the signed-binary bound (encIntBin), preserving the exact
encoded words of encPair (encList encIntBin) encIntBin.
The tuple of the fields of encLinearInequality.
Rational linear-programming feasibility: the systems of linear inequalities with integer
coefficients that have a rational solution. A constraint ⟨a, t⟩ asks for
∑ j < a.length, a[j] * x j ≤ t; missing coefficients are zero.
The instance encoding of LPFeasibility: a framed list of rows encoded by
encLinearInequality.
The constraint matrix of C with n columns, missing coefficients read as zero.
The right-hand side of C.
The matrix form. When every row has at most n coefficients, C is feasible iff
matrix C n *ᵥ x ≤ rhs C has a rational solution.
The NP check: d > 0 and w / d satisfies every constraint, as
∑ j < a.length, a[j] * w[j] ≤ d * t.
The coNP check: q ≥ 0, every column of ∑ i, q[i] * C[i] vanishes and
∑ i, q[i] * t[i] < 0, the integer Farkas certificate of infeasibility.
Soundness of the coNP check, by Farkas' lemma (Matrix.not_exists_mulVec_le_iff).
Polynomial-time checks #
The NP check is polynomial-time.
Rational LP feasibility is in NP.
Rational LP feasibility is in coNP.
Rational LP feasibility is in NP ∩ coNP [Schrijver1986, Section 10.1].