Documentation

CslibFrontier.Logics.Propositional.CNF.KWiseIndependent

Limited independence fools clause counts #

A clause with j distinct literals and no complementary pair is falsified by a uniformly random assignment with probability 2 ^ -j, and this computation reads the values of only j variables. So a k-wise independent family of assignments falsifies each clause with probability at most 2 ^ -min k j, and by linearity of expectation it falsifies on average at most Σ_c 2 ^ -min k |c| clauses Alon and Spencer, Section 16.2. When every clause has at least k distinct literals some member of the family falsifies at most 2 ^ -k of the clauses, the bound that a uniformly random assignment gives for MAX-Ek-SAT. A family with polynomially many seeds can then be searched exhaustively; CslibFrontier.Logics.Propositional.CNF.ParitySearch does this for k = 3.

The assignments are h i ∘ e, where the bits h i x are k-wise independent over the seed i (Cslib.Probability.IsKWiseIndependentHash) and e maps the variables of the formula injectively to the points x. Clauses may repeat literals; a clause containing a complementary pair is never falsified.

Main results #

References #

theorem Cslib.Logic.PL.indicator_eval_eq_false_le_prod {V : Type u_1} [DecidableEq V] (σ : V → Bool) (c : Clause V) {S : Finset (Literal V)} (hS : S ⊆ List.toFinset c) :
(if Clause.eval σ c = false then 1 else 0) ≤ ∏ l ∈ S, if σ l.1 = !l.2 then 1 else 0

The indicator that σ falsifies c is at most the product, over any set of literals of c, of the indicators that σ falsifies each of them.

theorem Cslib.Logic.PL.expect_indicator_eval_eq_false_le {V : Type u_1} {ι : Type u_2} {X : Type u_3} [Fintype ι] [DecidableEq V] {k : ℕ} {h : ι → X → Bool} (hh : Probability.IsKWiseIndependentHash k h) {e : V → X} (c : Clause V) (he : ∀ l ∈ c, ∀ l' ∈ c, e l.1 = e l'.1 → l.1 = l'.1) :
(Finset.univ.expect fun (i : ι) => if Clause.eval (h i ∘ e) c = false then 1 else 0) ≤ 2⁻¹ ^ min k (List.toFinset c).card

Limited independence and one clause: if the bits h i x are k-wise independent and e is injective on the variables of c, then the assignment h i ∘ e falsifies c with probability at most 2 ^ -min k |c|, where |c| is the number of distinct literals of c.

theorem Cslib.Logic.PL.expect_countUnsat_le {V : Type u_1} {ι : Type u_2} {X : Type u_3} [Fintype ι] [DecidableEq V] {k : ℕ} {h : ι → X → Bool} (hh : Probability.IsKWiseIndependentHash k h) {e : V → X} (φ : CNF V) (he : ∀ v ∈ φ.vars, ∀ w ∈ φ.vars, e v = e w → v = w) :
(Finset.univ.expect fun (i : ι) => ↑(CNF.countUnsat (h i ∘ e) φ)) ≤ (List.map (fun (c : Clause V) => 2⁻¹ ^ min k (List.toFinset c).card) φ).sum

Limited independence and clause counts: if the bits h i x are k-wise independent and e is injective on the variables of φ, then the expected number of clauses that h i ∘ e falsifies is at most Σ_c 2 ^ -min k |c|, counting distinct literals.

theorem Cslib.Logic.PL.exists_countUnsat_le {V : Type u_1} {ι : Type u_2} {X : Type u_3} [Fintype ι] [DecidableEq V] {k : ℕ} {h : ι → X → Bool} (hh : Probability.IsKWiseIndependentHash k h) {e : V → X} (φ : CNF V) (he : ∀ v ∈ φ.vars, ∀ w ∈ φ.vars, e v = e w → v = w) :
∃ (i : ι), ↑(CNF.countUnsat (h i ∘ e) φ) ≤ (List.map (fun (c : Clause V) => 2⁻¹ ^ min k (List.toFinset c).card) φ).sum

Some seed attains the bound of Cslib.Logic.PL.expect_countUnsat_le.

theorem Cslib.Logic.PL.exists_two_pow_mul_countUnsat_le {V : Type u_1} {ι : Type u_2} {X : Type u_3} [Fintype ι] [DecidableEq V] {k : ℕ} {h : ι → X → Bool} (hh : Probability.IsKWiseIndependentHash k h) {e : V → X} {φ : CNF V} (he : ∀ v ∈ φ.vars, ∀ w ∈ φ.vars, e v = e w → v = w) (hk : ∀ c ∈ φ, k ≤ (List.toFinset c).card) :
∃ (i : ι), 2 ^ k * CNF.countUnsat (h i ∘ e) φ ≤ List.length φ

Limited independence for MAX-Ek-SAT: if every clause has at least k distinct literals, some seed of a k-wise independent family falsifies at most 2 ^ -k of the clauses.