Documentation

CslibFrontier.Computability.Complexity.FineGrained.Sparsification

Algorithmic sparsification #

The sparsification lemma of Impagliazzo, Paturi and Zane [IPZ01] on the native machines: a depth-first search of the sparsification tree, with a decider applied at its leaves, runs within time 2 ^ (ε * n) times the sum of a polynomial and the time of the decider on formulas with at most c * n + 1 clauses, on formulas with n variables. Hence a decider for k-SAT within time 2 ^ (δ * m) times a polynomial, on formulas with m clauses, gives one within time 2 ^ ((ε + c * δ) * n) times a polynomial, on formulas with n variables (Cslib.Complexity.exists_decidableInExpTime_numVars_of_length), and the exponential time hypothesis says that 3SAT is not decidable in subexponential time in the number of clauses (Cslib.Complexity.ETH_iff_not_decidableInSubexpTime_length).

The search (Cslib.Complexity.Sparsify.search) keeps a stack of formulas and an accumulator (Cslib.Complexity.Sparsify.step). It starts from the normal form of the formula (Cslib.Logic.PL.CNF.Sparsification.normalize); at a sparse formula on top of the stack it runs the decider, and at any other formula it pushes the two children of the list-level step (Cslib.Logic.PL.CNF.Sparsification.next), which is polynomial-time. This is the depth-first search of the branching tree of the list-level rule (Cslib.BinaryBranching.exists_iterate_searchStep), so it visits every leaf within twice the number of leaves of steps, which is at most 2 ^ (ε * n) up to a constant for the thresholds given by Cslib.Logic.PL.ClauseSet.Sparsification.exists_sum_choose_le. Meanwhile the stack holds at most O(n) formulas of the tree, each with O(n + m) clauses, and the leaves, being sparse, have at most c * n + 1 clauses (Cslib.Logic.PL.ClauseSet.Sparsification.card_le_of_sparse). The search runs a fixed number 2 ^ (n / M + 2) of rounds (Cslib.Complexity.Sparsify.rounds), the last ones on the empty stack, for ε = 1 / M.

Main definitions #

Main results #

References #

@[reducible, inline]

The states of the search: a stack of formulas and an accumulator.

One step of the depth-first search of the sparsification tree, for width K and the thresholds threshold K α: a sparse formula on top of the stack is popped and the decider g is run on it; any other formula on top is replaced by its two children.

The root of the search: the normal form of a formula of width k, and the formula without clauses otherwise.

The sparsification search: run the search for rounds M φ rounds from the root, and report the accumulator.

The search is the depth-first search of the tree #

The root #

The states of the tree #

The bound 2 ∑_{j < K} θ j on the occurrences of a variable in a sparse formula.

The number of leaves is within the number of rounds: the bound on the binomial tail that Cslib.Logic.PL.ClauseSet.Sparsification.exists_sum_choose_le provides for ε = 1 / M.

theorem Cslib.Complexity.Sparsify.search_eq_true_iff {K α : ℕ} (hK : 1 ≤ K) (hα : 1 ≤ α) {k M : ℕ} (hkK : k ≤ K) (hM : LeafBound K α M) {g : Logic.PL.CNF ℕ → Bool} (hg : ∀ (ψ : Logic.PL.CNF ℕ), (∀ c ∈ ψ, List.length c ≤ k) → (g ψ = true ↔ ψ.Satisfiable)) {φ : Logic.PL.CNF ℕ} (hφ : ∀ c ∈ φ, List.length c ≤ k) :
search K α k M g φ = true ↔ φ.Satisfiable

The search decides satisfiability. If the decider decides satisfiability on formulas of width k, the search decides satisfiability on formulas of width k.

Polynomial-time parts #

Sizes #

From clauses to variables #

theorem Cslib.Complexity.exists_decidableInExpTime_numVars_of_length (k : ℕ) {ε : ℝ} (hε : 0 < ε) :
∃ (c : ℕ), ∀ (δ : ℝ), 0 ≤ δ → DecidableInExpTime (KSAT k) encCNF List.length δ → DecidableInExpTime (KSAT k) encCNF Logic.PL.CNF.numVars (ε + ↑c * δ)

Sparsification on the native machines [IPZ01]. For every width k and every ε > 0 there is a constant c such that, for every δ ≥ 0, a decider for k-SAT within time 2 ^ (δ * m) times a polynomial in the length of the encoded formula, on formulas with m clauses, gives a decider for k-SAT within time 2 ^ ((ε + c * δ) * n) times a polynomial, on formulas with n variables.

Subexponential time in the clauses gives subexponential time in the variables [IPZ01]: if k-SAT is decidable within time 2 ^ (δ * m) times a polynomial for every δ > 0, on formulas with m clauses, it is decidable within time 2 ^ (δ * n) times a polynomial for every δ > 0, on formulas with n variables.

The exponential time hypothesis in terms of clauses [IPZ01]: ETH holds exactly when 3SAT is not decidable in subexponential time in the number of clauses.