Documentation

CslibFrontier.Computability.Complexity.Problems.CMMSA

Collective Minimum Monotone Satisfying Assignment #

An instance of CMMSA [Hirahara2022, Section II.B, p. 974] is a list of weights w(i) of variables i < n, a threshold θ and a list of monotone DNF formulas φ₁, …, φₘ over those variables. An assignment is the set S of variables it sets to true, and its weight is ∑_{i ∈ S} w(i). The gap problem GapCMMSA Δ g σ separates

Both sides require the instance to be well formed for the bound Δ (CMMSAInstance.WellFormed). In the paper the gap and the proportion are g = Δ^ε and σ = Δ^{-ε}, with Δ bounding the number of literals of each formula. Here g and σ are arbitrary parameters, and the no-instances also require 1 ≤ g and σ ≤ 1, so that the two sides are disjoint. The library's own hardness result is for constant g and σ = 1, where a no-instance is one in which every light assignment falsifies some formula (mem_no_GapCMMSA_one); see CslibFrontier.Computability.PCP.Approximation.LabelCover.MinRep.

Instance shape. The paper leaves the shape of an instance implicit. WellFormed asks for positive weights and threshold, nonempty formulas and terms, positive literals, variables below n, and at most Δ literal occurrences per formula. These are the conditions that the planned reduction from CMMSA to partial MCSP, issue #4362, uses. A zero threshold or a zero weight breaks its size accounting, and an empty term or formula leaves its secret sharing undefined.

Encoding. Weights and threshold are written in unary (CMMSAInstance.encoding): a reduction out of CMMSA may build tables whose size is polynomial in the weights and the threshold, which is polynomial in the input length only when these are unary. Variable numbers inside the formulas are binary (encDNFOver encNat).

Main definitions #

Main results #

References #

An instance of CMMSA: weights of the variables i < weights.length, a threshold and a list of DNF formulas over the variables.

  • weights : List ℕ

    The weight of each variable; the variables are the indices below weights.length.

  • threshold : ℕ

    The weight θ allowed to a satisfying assignment of a yes-instance.

  • formulas : List (Logic.PL.DNF ℕ)

    The formulas, read with multiplicity.

Instances For
    theorem Cslib.Complexity.CMMSAInstance.ext {x y : CMMSAInstance} (weights : x.weights = y.weights) (threshold : x.threshold = y.threshold) (formulas : x.formulas = y.formulas) :
    x = y

    The weight ∑_{i ∈ S} w(i) of the assignment setting exactly the variables in S to true.

    The number of formulas, counted with multiplicity, that the assignment setting exactly the variables in S to true satisfies.

    The shape of a CMMSA instance whose formulas have at most Δ literal occurrences each.

    theorem Cslib.Complexity.CMMSAInstance.WellFormed.mono {I : CMMSAInstance} {Δ Δ' : ℕ} (h : I.WellFormed Δ) (hΔ : Δ ≤ Δ') :

    A bound on the literals of each formula is also a bound for every larger Δ.

    Every formula of a well-formed instance has at most Δ terms, since its terms are nonempty.

    Every term of a well-formed instance has at most Δ literals.

    theorem Cslib.Complexity.CMMSAInstance.encoding_weights_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → CMMSAInstance} :
    theorem Cslib.Complexity.CMMSAInstance.encoding_mk_inO {γ : Type} {encIn : γ ↪ List Bool} {x0 : γ → List ℕ} {T0 S0 x1 T1 S1 : γ → ℕ} {x2 : γ → List (Logic.PL.DNF ℕ)} {T2 S2 : γ → ℕ} (h0 : Turing.MultiTapeTM.ComputableInO x0 encIn (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encUnary) T0 S0) (h1 : Turing.MultiTapeTM.ComputableInO x1 encIn Turing.MultiTapeTM.encUnary T1 S1) (h2 : Turing.MultiTapeTM.ComputableInO x2 encIn (Turing.MultiTapeTM.encList (Logic.PL.encDNFOver Turing.MultiTapeTM.encNat)) T2 S2) :
    Turing.MultiTapeTM.ComputableInO (fun (x : γ) => { weights := x0 x, threshold := x1 x, formulas := x2 x }) encIn encoding (fun (x : γ) => T0 x + (T1 x + T2 x)) fun (x : γ) => S0 x + (S1 x + S2 x)
    theorem Cslib.Complexity.CMMSAInstance.encoding_mk_budget {γ : Type} {encIn : γ ↪ List Bool} {budget : γ → ℕ} {x0 : γ → List ℕ} {x1 : γ → ℕ} {x2 : γ → List (Logic.PL.DNF ℕ)} (h0 : Turing.MultiTapeTM.ComputableInSpace x0 encIn (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encUnary) budget) (h1 : Turing.MultiTapeTM.ComputableInSpace x1 encIn Turing.MultiTapeTM.encUnary budget) (h2 : Turing.MultiTapeTM.ComputableInSpace x2 encIn (Turing.MultiTapeTM.encList (Logic.PL.encDNFOver Turing.MultiTapeTM.encNat)) budget) :
    Turing.MultiTapeTM.ComputableInSpace (fun (x : γ) => { weights := x0 x, threshold := x1 x, formulas := x2 x }) encIn encoding budget
    theorem Cslib.Complexity.CMMSAInstance.encoding_threshold_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → CMMSAInstance} :
    @[reducible, inline]

    The tuple of the fields of encoding.

    Unary weights and threshold, binary variables: an instance is encoded as the framed list of its unary weights, its framed unary threshold and the list of its formulas over binary variable numbers (encDNFOver encNat).

    Reading the weights is polynomial-time.

    Reading the threshold is polynomial-time.

    theorem Cslib.Complexity.CMMSAInstance.isPolyTime_mk {Input : Type} {input : Input ↪ List Bool} {weights : Input → List ℕ} {threshold : Input → ℕ} {formulas : Input → List (Logic.PL.DNF ℕ)} (hweights : Turing.MultiTapeTM.ComputableInPolyTime weights input (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encUnary)) (hthreshold : Turing.MultiTapeTM.ComputableInPolyTime threshold input Turing.MultiTapeTM.encUnary) (hformulas : Turing.MultiTapeTM.ComputableInPolyTime formulas input (Turing.MultiTapeTM.encList (Logic.PL.encDNFOver Turing.MultiTapeTM.encNat))) :
    Turing.MultiTapeTM.ComputableInPolyTime (fun (x : Input) => { weights := weights x, threshold := threshold x, formulas := formulas x }) input encoding

    Assembling computed weights, threshold and formulas into an instance is polynomial-time.

    Gap CMMSA [Hirahara2022, Section II.B, p. 974] with at most Δ literal occurrences per formula, gap g and proportion σ. The yes-instances have an assignment of weight at most θ satisfying every formula. The no-instances have 1 ≤ g and σ ≤ 1, and every assignment of weight at most g θ satisfies fewer than σ m of the m formulas. Both are well formed (CMMSAInstance.WellFormed), and assignments set only variables of the instance.

    theorem Cslib.Complexity.mem_yes_GapCMMSA {Δ : ℕ} {g σ : ℝ} {I : CMMSAInstance} :
    I ∈ (GapCMMSA Δ g σ).yes ↔ I.WellFormed Δ ∧ ∃ S ⊆ Finset.range I.weights.length, I.weight S ≤ I.threshold ∧ ∀ φ ∈ I.formulas, Logic.PL.DNF.eval (fun (i : ℕ) => decide (i ∈ S)) φ = true
    theorem Cslib.Complexity.mem_no_GapCMMSA {Δ : ℕ} {g σ : ℝ} {I : CMMSAInstance} :
    I ∈ (GapCMMSA Δ g σ).no ↔ I.WellFormed Δ ∧ 1 ≤ g ∧ σ ≤ 1 ∧ ∀ S ⊆ Finset.range I.weights.length, ↑(I.weight S) ≤ g * ↑I.threshold → ↑(I.satCount S) < σ * ↑I.formulas.length
    theorem Cslib.Complexity.mem_no_GapCMMSA_one {Δ : ℕ} {g : ℝ} {I : CMMSAInstance} :
    I ∈ (GapCMMSA Δ g 1).no ↔ I.WellFormed Δ ∧ 1 ≤ g ∧ ∀ S ⊆ Finset.range I.weights.length, ↑(I.weight S) ≤ g * ↑I.threshold → ∃ φ ∈ I.formulas, Logic.PL.DNF.eval (fun (i : ℕ) => decide (i ∈ S)) φ = false

    At σ = 1, a no-instance is one in which every assignment of weight at most g θ falsifies some formula.