Documentation

CslibFrontier.Computability.Complexity.Problems.IntegerProgramming

Zero-one integer programming #

ZeroOneIP is the feasibility problem of zero-one integer programming in equality form: a system of linear equations ∑ j, a j * x j = t with natural coefficients and right-hand sides, encoded in binary, has a solution with every x j ∈ {0, 1}. Each equation c : ZeroOneIP.Equation stores the coefficients c.coeffs of the variables 0, 1, … (with missing coefficients zero) and the right-hand side c.rhs.

Karp states zero-one integer programming with integer coefficients and inequalities [Kar72]; the equality form with natural coefficients is the special case used here, and it is already NP-complete. A subset sum instance is a single equation, so SubsetSum reduces to ZeroOneIP, and composing with Sipser's digit construction reduces ThreeSAT to ZeroOneIP.

Main definitions #

Main results #

References #

A linear equality constraint ∑ j, coeffs[j] * x j = rhs in a zero-one integer program, with missing coefficients treated as zero.

  • coeffs : List ℕ

    The coefficients of variables 0, 1, ….

  • rhs : ℕ

    The right-hand side target.

Instances For

    Binary encoding of a zero-one linear equation as (coeffs, rhs).

    Instances For
      @[reducible, inline]

      The tuple of the fields of encEquation.

      Instances For
        theorem Cslib.Complexity.ZeroOneIP.encEquation_mk_budget {γ : Type} {encIn : γ ↪ List Bool} {budget : γ → ℕ} {x0 : γ → List ℕ} {x1 : γ → ℕ} (h0 : Turing.MultiTapeTM.ComputableInSpace x0 encIn (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encNat) budget) (h1 : Turing.MultiTapeTM.ComputableInSpace x1 encIn Turing.MultiTapeTM.encNat budget) :
        Turing.MultiTapeTM.ComputableInSpace (fun (x : γ) => { coeffs := x0 x, rhs := x1 x }) encIn encEquation budget
        theorem Cslib.Complexity.ZeroOneIP.encEquation_rhs_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Equation} :
        theorem Cslib.Complexity.ZeroOneIP.encEquation_mk_inO {γ : Type} {encIn : γ ↪ List Bool} {x0 : γ → List ℕ} {T0 S0 x1 T1 S1 : γ → ℕ} (h0 : Turing.MultiTapeTM.ComputableInO x0 encIn (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encNat) T0 S0) (h1 : Turing.MultiTapeTM.ComputableInO x1 encIn Turing.MultiTapeTM.encNat T1 S1) :
        Turing.MultiTapeTM.ComputableInO (fun (x : γ) => { coeffs := x0 x, rhs := x1 x }) encIn encEquation (fun (x : γ) => T0 x + T1 x) fun (x : γ) => S0 x + S1 x
        theorem Cslib.Complexity.ZeroOneIP.encEquation_coeffs_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Equation} :

        The systems of linear equations with natural coefficients that have a zero-one solution, the equality form of Karp's zero-one integer programming [Kar72]. An equation c asks for ∑ j < c.coeffs.length, c.coeffs[j] * x j = c.rhs.

        Instances For
          @[reducible, inline]

          Instances of ZeroOneIP: the equations (coeffs, rhs), each framed, an equation being its list coeffs of coefficients, framed, each coefficient framed, then its right-hand side rhs; all numbers in binary.

          Instances For

            The verifier for ZeroOneIP: the certificate, read as the values of the variables, satisfies every equation.

            Instances For

              A subset sum instance as a single equation.

              Instances For

                ThreeSAT reduces to ZeroOneIP in polynomial time, through Sipser's digit construction.

                Zero-one integer programming is NP-complete, in equality form with natural coefficients in binary [Kar72].