Documentation

CslibFrontier.Computability.PCP.Approximation.SetCover.LundYannakakis

Lund–Yannakakis / Feige hardness of approximating Set Cover #

The Lund–Yannakakis / Feige reduction from Label Cover (GapLabelCover) to weighted and unweighted Set Cover (GapWeightedSetCover, GapSetCover) ([LY94b]; [Fei98]).

For an encoded Label Cover instance g : Graph (β → γ) with m = g.edges.length edges and a partition gadget G : PartitionGadget γ, every edge e = (u, v, π) receives deg_L(u) * deg_R(v) copies of G's universe in the unweighted reduction toSetCoverOf (and a single copy with vertex weights deg_L(u), deg_R(v) in the weighted reduction toWeightedSetCoverOf), neutralizing non-uniform degrees in g.

Instantiating G with boolCubeGadget γ and composing with exists_GapLabelCover_npHard proves Milestone 1: GapSetCover c and GapWeightedSetCover c are NP-hard for every c > 1 (GapSetCover_npHard, GapWeightedSetCover_npHard), ruling out polynomial-time constant-factor approximation algorithms for unweighted and weighted Set Cover unless P = NP.

Instantiating G with exists_small_partitionGadget gives per-instance c * Real.log n gap theorems (exists_weightedSetCover_log_gap, exists_setCover_log_gap) for any 0 < c < 1 / (4 * log 2) and any t ≥ logGapThreshold c p g.edges.length |γ| (an explicit threshold growing like O(p * log m + log log |γ|)), conditional on the Label Cover instance having soundness ≤ 1 / t ^ 2. Obtaining unconditional complexity-theoretic hardness from this conditional reduction requires ingredients beyond the constant-round exists_GapLabelCover_npHard base: super-constant parallel repetition uses a quasi-polynomial reduction and therefore yields hardness against polynomial-time algorithms only under the stronger assumption NP ⊈ DTIME(n^{O(log log n)}) rather than P ≠ NP alone, whereas P ≠ NP hardness requires a polynomial-time low-soundness Label Cover theorem (such as Dinur–Steurer for (1 - ε) ln n).

Main definitions #

Main results #

References #

Primary texts uninspected (bibliographic metadata checked via search records only; locators unverified and no numbered paper theorems are claimed). The parameterized constructions toWeightedSetCoverOf and toSetCoverOf (explicit label lists, PartitionGadget, and deg_L(u) * deg_R(v) edge duplication) and the explicit constant threshold c < 1 / (4 * log 2) in exists_weightedSetCover_log_gap / exists_setCover_log_gap are this library's formalization.

Core Label-Cover label extraction lemma #

theorem Cslib.Complexity.exists_labelling_of_list_sets {β γ : Type} [DecidableEq γ] [Nonempty β] [Nonempty γ] (g : PCP.Encoded.Graph (β → γ)) (L : ℕ → Finset β) (R : ℕ → Finset γ) {t : ℕ} (ht : 0 < t) {ρ : ℝ} (hm : 0 < g.edges.length) (hmatch : ∀ (i : Fin g.edges.length), (L g.edges[i].src).card + (R g.edges[i].dst).card ≤ t → ∃ a ∈ L g.edges[i].src, ∃ b ∈ R g.edges[i].dst, g.edges[i].constraint a = b) (hsum : ∑ i : Fin g.edges.length, ↑((L g.edges[i].src).card + (R g.edges[i].dst).card) ≤ ρ * (2 * ↑g.edges.length)) :
(1 - 2 * ρ / ↑t) * (4 / ↑t ^ 2) ≤ 1 - (g.toGraph projectionEval).unsatVal

Core Lund–Yannakakis label-extraction lemma: given candidate label sets L u : Finset β and R v : Finset γ such that every edge (u, v) with |L u| + |R v| ≤ t has a matching pair (a, b) ∈ L u × R v and ∑ e, (|L e.src| + |R e.dst|) ≤ ρ * (2 * m), some deterministic labelling satisfies at least (1 - 2 * ρ / t) * (4 / t ^ 2) of the edges of g.

Reductions to Weighted and Unweighted Set Cover #

Deduplicated list of left endpoints appearing in g.edges.

Deduplicated list of right endpoints appearing in g.edges.

Left degree of vertex u in g.edges.

Right degree of vertex v in g.edges.

Weighted reduction #

Ground elements for the weighted Set Cover reduction: pairs Nat.pair e x for edge index e < g.edges.length and gadget element x < G.size.

def Cslib.Complexity.SetCoverReduction.weightedLeftSet {β γ : Type} (fallback : γ) (G : PCP.PartitionGadget γ) (g : PCP.Encoded.Graph (β → γ)) (u : ℕ) (a : β) :

Left candidate sets (u, a) in the weighted reduction, weighted by degL g u.

def Cslib.Complexity.SetCoverReduction.weightedRightSet {β γ : Type} (fallback : γ) (G : PCP.PartitionGadget γ) (g : PCP.Encoded.Graph (β → γ)) (v : ℕ) (b : γ) :

Right candidate sets (v, b) in the weighted reduction, weighted by degR g v.

Left item list (u, a) for the weighted reduction.

Right item list (v, b) for the weighted reduction.

def Cslib.Complexity.SetCoverReduction.weightedSetSystemOf {β γ : Type} (bs : List β) (gs : List γ) (fallback : γ) (G : PCP.PartitionGadget γ) (g : PCP.Encoded.Graph (β → γ)) :

Weighted set system constructed by the Lund–Yannakakis / Feige reduction.

def Cslib.Complexity.SetCoverReduction.toWeightedSetCoverOf {β γ : Type} (bs : List β) (gs : List γ) (fallback : γ) (G : PCP.PartitionGadget γ) (g : PCP.Encoded.Graph (β → γ)) :

Computable weighted Set Cover reduction from Label Cover parameterized by explicit label lists bs, gs, a fallback label fallback : γ, and a partition gadget G.

theorem Cslib.Complexity.SetCoverReduction.weightedSetSystemOf_ground_length {β γ : Type} {bs : List β} {gs : List γ} {fallback : γ} {G : PCP.PartitionGadget γ} {g : PCP.Encoded.Graph (β → γ)} :
(weightedSetSystemOf bs gs fallback G g).ground.length = g.edges.length * G.size
theorem Cslib.Complexity.SetCoverReduction.weightedSetSystemOf_coverable {β γ : Type} [Nonempty β] {bs : List β} {gs : List γ} {fallback : γ} (hbs_all : ∀ (a : β), a ∈ bs) (hgs_all : ∀ (b : γ), b ∈ gs) (G : PCP.PartitionGadget γ) (g : PCP.Encoded.Graph (β → γ)) :
(weightedSetSystemOf bs gs fallback G g).Coverable
theorem Cslib.Complexity.SetCoverReduction.weightedSetSystemOf_complete {β γ : Type} [DecidableEq γ] [Nonempty β] [Nonempty γ] {bs : List β} {gs : List γ} {fallback : γ} (hbs_all : ∀ (a : β), a ∈ bs) (hgs_all : ∀ (b : γ), b ∈ gs) (G : PCP.PartitionGadget γ) (g : PCP.Encoded.Graph (β → γ)) (hsat : 1 ≤ 1 - (g.toGraph projectionEval).unsatVal) :
theorem Cslib.Complexity.SetCoverReduction.weightedSetSystemOf_sound_of_isCover {β γ : Type} [DecidableEq γ] [Nonempty β] [Nonempty γ] {bs : List β} {gs : List γ} {fallback : γ} {G : PCP.PartitionGadget γ} {t : ℕ} (ht : 0 < t) (hsep : G.Separates t) {g : PCP.Encoded.Graph (β → γ)} (hm : 0 < g.edges.length) {ρ : ℝ} {C : Finset (Fin (weightedSetSystemOf bs gs fallback G g).sets.length)} (hC : (weightedSetSystemOf bs gs fallback G g).IsCover C) (hwt : ↑((weightedSetSystemOf bs gs fallback G g).coverWeight C) ≤ ρ * (2 * ↑g.edges.length)) :
(1 - 2 * ρ / ↑t) * (4 / ↑t ^ 2) ≤ 1 - (g.toGraph projectionEval).unsatVal
theorem Cslib.Complexity.SetCoverReduction.weightedSetSystemOf_sound {β γ : Type} [DecidableEq γ] [Nonempty β] [Nonempty γ] {bs : List β} {gs : List γ} {fallback : γ} (hbs_all : ∀ (a : β), a ∈ bs) (hgs_all : ∀ (b : γ), b ∈ gs) {G : PCP.PartitionGadget γ} {t : ℕ} (ht : 0 < t) (hsep : G.Separates t) {g : PCP.Encoded.Graph (β → γ)} (hm : 0 < g.edges.length) {ρ : ℝ} (hwt : ↑(weightedSetSystemOf bs gs fallback G g).optCoverWeight ≤ ρ * (2 * ↑g.edges.length)) :
(1 - 2 * ρ / ↑t) * (4 / ↑t ^ 2) ≤ 1 - (g.toGraph projectionEval).unsatVal

Unweighted reduction #

Ground elements for the unweighted Set Cover reduction: quadruples (e, x, r₁, r₂) encoded as Nat.pair (Nat.pair e x) (Nat.pair r₁ r₂) for each edge e, gadget element x < G.size, left copy r₁ < degL g e.src, and right copy r₂ < degR g e.dst.

def Cslib.Complexity.SetCoverReduction.unweightedLeftSet {β γ : Type} (fallback : γ) (G : PCP.PartitionGadget γ) (g : PCP.Encoded.Graph (β → γ)) (u r₁ : ℕ) (a : β) :

Left candidate sets (u, r₁, a) in the unweighted reduction.

def Cslib.Complexity.SetCoverReduction.unweightedRightSet {β γ : Type} (fallback : γ) (G : PCP.PartitionGadget γ) (g : PCP.Encoded.Graph (β → γ)) (v r₂ : ℕ) (b : γ) :

Right candidate sets (v, r₂, b) in the unweighted reduction.

Left item list (u, r₁, a) for the unweighted reduction.

Right item list (v, r₂, b) for the unweighted reduction.

def Cslib.Complexity.SetCoverReduction.setSystemOf {β γ : Type} (bs : List β) (gs : List γ) (fallback : γ) (G : PCP.PartitionGadget γ) (g : PCP.Encoded.Graph (β → γ)) :

Unweighted set system constructed by the Lund–Yannakakis / Feige reduction.

def Cslib.Complexity.SetCoverReduction.toSetCoverOf {β γ : Type} (bs : List β) (gs : List γ) (fallback : γ) (G : PCP.PartitionGadget γ) (g : PCP.Encoded.Graph (β → γ)) :

Computable unweighted Set Cover reduction from Label Cover parameterized by explicit label lists bs, gs, a fallback label fallback : γ, and a partition gadget G.

theorem Cslib.Complexity.SetCoverReduction.setSystemOf_ground_length_le {β γ : Type} {bs : List β} {gs : List γ} {fallback : γ} {G : PCP.PartitionGadget γ} {g : PCP.Encoded.Graph (β → γ)} :
(setSystemOf bs gs fallback G g).ground.length ≤ g.edges.length ^ 3 * G.size
theorem Cslib.Complexity.SetCoverReduction.setSystemOf_ground_length_ge {β γ : Type} {bs : List β} {gs : List γ} {fallback : γ} {G : PCP.PartitionGadget γ} {g : PCP.Encoded.Graph (β → γ)} (hm : 0 < g.edges.length) :
G.size ≤ (setSystemOf bs gs fallback G g).ground.length
theorem Cslib.Complexity.SetCoverReduction.setSystemOf_ground_length_pos {β γ : Type} {bs : List β} {gs : List γ} {fallback : γ} {G : PCP.PartitionGadget γ} {g : PCP.Encoded.Graph (β → γ)} (hm : 0 < g.edges.length) (hG : 0 < G.size) :
0 < (setSystemOf bs gs fallback G g).ground.length
theorem Cslib.Complexity.SetCoverReduction.setSystemOf_coverable {β γ : Type} [Nonempty β] {bs : List β} {gs : List γ} {fallback : γ} (hbs_all : ∀ (a : β), a ∈ bs) (hgs_all : ∀ (b : γ), b ∈ gs) (G : PCP.PartitionGadget γ) (g : PCP.Encoded.Graph (β → γ)) :
(setSystemOf bs gs fallback G g).Coverable
theorem Cslib.Complexity.SetCoverReduction.setSystemOf_complete {β γ : Type} [DecidableEq γ] [Nonempty β] [Nonempty γ] {bs : List β} {gs : List γ} {fallback : γ} (hbs_all : ∀ (a : β), a ∈ bs) (hgs_all : ∀ (b : γ), b ∈ gs) (G : PCP.PartitionGadget γ) (g : PCP.Encoded.Graph (β → γ)) (hsat : 1 ≤ 1 - (g.toGraph projectionEval).unsatVal) :
(setSystemOf bs gs fallback G g).optCoverSize ≤ 2 * g.edges.length
theorem Cslib.Complexity.SetCoverReduction.setSystemOf_sound_of_isCover {β γ : Type} [DecidableEq γ] [Nonempty β] [Nonempty γ] {bs : List β} {gs : List γ} {fallback : γ} {G : PCP.PartitionGadget γ} {t : ℕ} (ht : 0 < t) (hsep : G.Separates t) {g : PCP.Encoded.Graph (β → γ)} (hm : 0 < g.edges.length) {ρ : ℝ} {C : Finset (Fin (setSystemOf bs gs fallback G g).sets.length)} (hC : (setSystemOf bs gs fallback G g).IsCover C) (hcard : ↑C.card ≤ ρ * (2 * ↑g.edges.length)) :
(1 - 2 * ρ / ↑t) * (4 / ↑t ^ 2) ≤ 1 - (g.toGraph projectionEval).unsatVal
theorem Cslib.Complexity.SetCoverReduction.setSystemOf_sound {β γ : Type} [DecidableEq γ] [Nonempty β] [Nonempty γ] {bs : List β} {gs : List γ} {fallback : γ} (hbs_all : ∀ (a : β), a ∈ bs) (hgs_all : ∀ (b : γ), b ∈ gs) {G : PCP.PartitionGadget γ} {t : ℕ} (ht : 0 < t) (hsep : G.Separates t) {g : PCP.Encoded.Graph (β → γ)} (hm : 0 < g.edges.length) {ρ : ℝ} (hcard : ↑(setSystemOf bs gs fallback G g).optCoverSize ≤ ρ * (2 * ↑g.edges.length)) :
(1 - 2 * ρ / ↑t) * (4 / ↑t ^ 2) ≤ 1 - (g.toGraph projectionEval).unsatVal

Polynomial-time certificates #

Hardness endpoints: Milestone 1 and c ln n gap #

theorem Cslib.Complexity.polyTimeReducible_GapLabelCover_GapWeightedSetCover {β γ : Type} [Finite β] [Nonempty β] [Finite γ] [DecidableEq γ] [Nonempty γ] (encC : (β → γ) ↪ List Bool) {G : PCP.PartitionGadget γ} {t : ℕ} (ht : 0 < t) (hsep : G.Separates t) {r s : ℝ} (hr : 1 < r) (hs : s < (1 - 2 * r / ↑t) * (4 / ↑t ^ 2)) :

Gap-preserving polynomial-time reduction from GapLabelCover to GapWeightedSetCover.

theorem Cslib.Complexity.polyTimeReducible_GapLabelCover_GapSetCover {β γ : Type} [Finite β] [Nonempty β] [Finite γ] [DecidableEq γ] [Nonempty γ] (encC : (β → γ) ↪ List Bool) {G : PCP.PartitionGadget γ} {t : ℕ} (ht : 0 < t) (hsep : G.Separates t) {r s : ℝ} (hr : 1 < r) (hs : s < (1 - 2 * r / ↑t) * (4 / ↑t ^ 2)) :

Gap-preserving polynomial-time reduction from GapLabelCover to GapSetCover.

Milestone 1 (unweighted Set Cover): GapSetCover c is NP-hard for every constant c > 1, unconditionally from exists_GapLabelCover_npHard and boolCubeGadget.

Milestone 1 (weighted Set Cover): GapWeightedSetCover c is NP-hard for every constant c > 1.

theorem Cslib.Complexity.GapSetCover_notMem_PromiseP {c : ℝ} (hc : 1 < c) {α : Type} {enc : α ↪ List Bool} (hpne : P enc ≠ NP enc) :

If P ≠ NP, GapSetCover c does not lie in PromiseP for any c > 1.

If P ≠ NP, GapWeightedSetCover c does not lie in PromiseP for any c > 1.

No polynomial-time constant-factor approximation algorithm exists for unweighted Set Cover unless P = NP.

No polynomial-time constant-factor approximation algorithm exists for weighted Set Cover unless P = NP.

noncomputable def Cslib.Complexity.logGapThreshold (c : ℝ) (p m cardGamma : ℕ) :

Explicit lower threshold on the separation parameter t in terms of c, polynomial blowup degree p, edge count m, and label cardinality cardGamma for the c * Real.log n gap reductions. Asymptotically this threshold grows as O(p * log m + log log cardGamma) for fixed 0 < c < 1 / (4 * log 2).

theorem Cslib.Complexity.four_le_logGapThreshold (c : ℝ) (p m cardGamma : ℕ) :
4 ≤ logGapThreshold c p m cardGamma

logGapThreshold is always at least 4.

theorem Cslib.Complexity.exists_weightedSetCover_log_gap {β γ : Type} [Fintype β] [Nonempty β] [Fintype γ] [DecidableEq γ] [Nonempty γ] {c : ℝ} (hc0 : 0 < c) (hc : c < 1 / (4 * Real.log 2)) (g : PCP.Encoded.Graph (β → γ)) (hm : 0 < g.edges.length) {t : ℕ} (ht : logGapThreshold c 1 g.edges.length (Fintype.card γ) ≤ t) :

Per-instance logarithmic gap for weighted Set Cover (c * ln n) for any 0 < c < 1 / (4 * log 2) and any separation parameter t ≥ logGapThreshold c 1 g.edges.length |γ| (using the O(t * 2 ^ t * log |γ|) separating partition gadget exists_small_partitionGadget), conditional on 1 - unsatVal ≤ 1 / t ^ 2. Upgrading this conditional reduction to hardness requires either super-constant parallel repetition via a quasi-polynomial reduction (assuming NP ⊈ DTIME(n^{O(log log n)}), not P ≠ NP alone) or polynomial-time low-soundness Label Cover such as Dinur–Steurer (for P ≠ NP).

theorem Cslib.Complexity.exists_setCover_log_gap {β γ : Type} [Fintype β] [Nonempty β] [Fintype γ] [DecidableEq γ] [Nonempty γ] {c : ℝ} (hc0 : 0 < c) (hc : c < 1 / (4 * Real.log 2)) (g : PCP.Encoded.Graph (β → γ)) (hm : 0 < g.edges.length) {t : ℕ} (ht : logGapThreshold c 3 g.edges.length (Fintype.card γ) ≤ t) :
4 ≤ t ∧ ∃ (G : PCP.PartitionGadget γ), G.Separates t ∧ G.size = 2 ^ t * (t * Nat.clog 2 (2 * Fintype.card γ + 1) + 1) ∧ have bs := Finset.univ.toList; have gs := Finset.univ.toList; have S := SetCoverReduction.setSystemOf bs gs (Classical.arbitrary γ) G g; have k := 2 * g.edges.length; S.Coverable ∧ (1 ≤ 1 - (g.toGraph projectionEval).unsatVal → (S, k) ∈ (GapSetCoverFn fun (X : SetSystem) => c * Real.log ↑X.ground.length).yes) ∧ (1 - (g.toGraph projectionEval).unsatVal ≤ 1 / ↑t ^ 2 → (S, k) ∈ (GapSetCoverFn fun (X : SetSystem) => c * Real.log ↑X.ground.length).no)

Per-instance logarithmic gap for unweighted Set Cover (c * ln n) for any 0 < c < 1 / (4 * log 2) and any separation parameter t ≥ logGapThreshold c 3 g.edges.length |γ|, conditional on Label Cover soundness ≤ 1 / t ^ 2. Upgrading this conditional reduction beyond the constant-round exists_GapLabelCover_npHard base requires either super-constant parallel repetition via a quasi-polynomial reduction (assuming NP ⊈ DTIME(n^{O(log log n)}), not P ≠ NP alone) or polynomial-time low-soundness Label Cover such as Dinur–Steurer (for P ≠ NP).