Documentation

CslibFrontier.Computability.PCP.Approximation.GapLin

A gap problem on linear systems over GF(2) is NP-hard #

GapLin L s is Goldreich's gapLin_{L,s} [Gol07d], §10.1.1 (printed p. 462). Its instances are systems of linear equations over GF(2) (Cslib.Complexity.XORSAT.System, equations with repeated variables allowed, under the existing XOR-SAT encoding). The yes-instances are the systems in which some assignment satisfies at least the proportion L of the equations, the no-instances those in which no assignment satisfies the proportion s of the equations or more. Proportions count equations with multiplicity. The no-instances also require s ≤ L, which keeps the two sets disjoint, as in Cslib.Complexity.PromiseProblem.gapMax.

Following the guideline of [Gol07d], Exercise 10.5 (printed p. 496), a clause ℓ₁ ∨ ℓ₂ ∨ ℓ₃ of exactly three, not necessarily distinct, literals is mapped to the seven equations stating that the literals of a nonempty subset of the three positions sum to one (Cslib.Complexity.GapLin.clauseEquations). An assignment that satisfies the clause satisfies exactly four of these equations, and one that falsifies it satisfies none (Cslib.Complexity.GapLin.countSat_clauseEquations). Hence a satisfiable formula is mapped to a system in which some assignment satisfies 4 / 7 of the equations, and a formula in which every assignment satisfies at most the proportion s₀ of the clauses to a system in which every assignment satisfies at most 4 / 7 · s₀ of the equations. Starting from the NP-hardness of MAX-E3SAT (Cslib.Complexity.GapExactThreeSAT_npHard, with s₀ = 1 - 1 / (3 * 2 ^ 77)) gives NP-hardness of gapLin_{L,s} with L = 4 / 7 and s = 4 / 7 · (1 - 1 / (6 * 2 ^ 77)), so 1 / 2 < s < L < 1. This is Exercise 10.5, a weak version of Goldreich's Theorem 10.9 (Håstad's gapLin_{1-ε, 1/2+ε}), which is not formalized here.

Main definitions #

Main results #

References #

The gap problem gapLin_{L,s} [Gol07d], §10.1.1: on systems of linear equations over GF(2), the yes-instances are the systems in which some assignment satisfies at least the proportion L of the equations, and the no-instances the systems in which no assignment satisfies the proportion s of the equations or more. Proportions count equations with multiplicity; the empty system has proportion zero. The no-instances also require s ≤ L, so that the two sets are disjoint.

theorem Cslib.Complexity.mem_yes_GapLin {L s : ℝ} {F : XORSAT.System} :
F ∈ (GapLin L s).yes ↔ ∃ (a : ℕ → Bool), L ≤ ↑(Logic.PL.AffineSystem.countSat F a) / ↑(List.length F)

The yes-instances of GapLin L s.

theorem Cslib.Complexity.mem_no_GapLin {L s : ℝ} {F : XORSAT.System} :
F ∈ (GapLin L s).no ↔ s ≤ L ∧ ∀ (a : ℕ → Bool), ↑(Logic.PL.AffineSystem.countSat F a) / ↑(List.length F) < s

The no-instances of GapLin L s.

The equation over GF(2) stating that the listed literals sum to one: its variables are those of the literals, and its right-hand side absorbs the negations.

oddEquation ls holds exactly when an odd number of the literals are true.

The seven equations of a clause, the map of Exercise 2.24 that the guideline of [Gol07d], Exercise 10.5 applies: for a clause ℓ₁ ∨ ℓ₂ ∨ ℓ₃, one equation ∑ i ∈ I, ℓᵢ = 1 for each nonempty I ⊆ {1, 2, 3}. Missing literals of shorter clauses are read as x₀; the semantics is used only for clauses of exactly three literals.

Four of seven, or none: an assignment that satisfies a clause of three literals satisfies exactly four of its seven equations, and one that falsifies it satisfies none.

On formulas with clauses of exactly three literals, the equations satisfied are four per satisfied clause.

A formula is replaced by the single clause x₀ ∨ x₀ ∨ x₀ when it has no clauses, so that a satisfiable formula always yields equations.

The reduction from MAX-E3SAT to gapLin [Gol07d], Exercise 10.5: the seven equations of every clause, after replacing the empty formula by x₀ ∨ x₀ ∨ x₀.

A satisfiable formula with clauses of exactly three literals is mapped to a system in which some assignment satisfies 4 / 7 of the equations.

theorem Cslib.Complexity.GapLin.countSat_reduce_le {φ : Logic.PL.CNF ℕ} {s₀ : ℝ} (h3 : ∀ c ∈ φ, List.length c = 3) (hs₀ : s₀ < 1) (hφ : 1 - s₀ ≤ φ.unsatVal) (σ : ℕ → Bool) :
↑(Logic.PL.AffineSystem.countSat (reduce φ) σ) / ↑(List.length (reduce φ)) ≤ 4 / 7 * s₀

If every assignment falsifies at least the proportion 1 - s₀ of the clauses, then every assignment satisfies at most 4 / 7 · s₀ of the equations.

theorem Cslib.Complexity.polyTimeReducible_GapExactThreeSAT_GapLin {s s₀ : ℝ} (hs₀ : s₀ < 1) (hs : 4 / 7 * s₀ < s) (hsL : s ≤ 4 / 7) :

MAX-E3SAT reduces to gapLin [Gol07d], Exercise 10.5: for soundness s₀ < 1 of MAX-E3SAT and every 4 / 7 · s₀ < s ≤ 4 / 7, GapLin.reduce maps satisfiable formulas to systems in which some assignment satisfies 4 / 7 of the equations, and formulas in which every assignment falsifies at least 1 - s₀ of the clauses to systems in which no assignment satisfies s of the equations.

gapLin is NP-hard [Gol07d], Exercise 10.5: distinguishing systems of linear equations over GF(2) in which some assignment satisfies 4 / 7 of the equations from those in which no assignment satisfies the proportion 4 / 7 · (1 - 1 / (6 * 2 ^ 77)) of them is NP-hard.

Goldreich, Exercise 10.5 (a weak version of Theorem 10.9) [Gol07d]: for some constants 1 / 2 < s < L < 1, the problem gapLin_{L,s} is NP-hard.