Documentation

CslibFrontier.Computability.PCP.Approximation.LabelCover.MinRep

Weighted Min-Rep: from Label Cover to CMMSA #

A library reduction, adapting the Min-Rep problem [Kor01], turns a Label Cover instance into an instance of CMMSA [Hirahara2022, Section II.B, p. 974] (Cslib.Complexity.GapCMMSA). For an instance with m edges, left labels β and right labels γ:

A labelling satisfying every edge selects one variable per vertex, of total weight 2m (minRep_mem_yes). Conversely, let an assignment of weight at most 2gm satisfy every φ_e, and let A_u and B_v be the labels it selects at the vertices. Labelling every vertex uniformly at random from its selected labels satisfies each edge e from u to v with probability at least 1 / (|A_u| |B_v|). The degree weights make ∑_e (|A_u| + |B_v|) at most the weight 2gm, and the tangent line of t ↦ 4 / t² at t = 2g turns this into an expected m / g² satisfied edges. So a Label Cover instance of value at most δ < 1 / g² gives a no-instance (minRep_mem_no).

Variable layout. The left ends of the edges are listed with multiplicity (srcs), and so are the right ends (dsts). Every entry of these lists gets a block of nβ (respectively nγ) variables, so the instance has m (nβ + nγ) variables: a vertex of degree d gets d blocks. The formulas use only the block at the vertex's first occurrence (blockVar). The other d - 1 blocks are padding: their variables weigh d like the used ones, appear in no formula and are never needed. Only ends of edges get variables, so every weight is positive, as CMMSAInstance.WellFormed requires. An instance with no edges maps to a fixed yes-instance with threshold 1. Labels are numbered through fixed equivalences β ≃ Fin nβ and γ ≃ Fin nγ.

The construction and the gap-preservation argument are library results adapting the Min-Rep idea to CMMSA, with proportion σ = 1 and a constant gap g. The paper's hardness of CMMSA, for g = Δ^ε and σ = Δ^{-ε}, needs Label Cover with polynomially small soundness [Hirahara2022, Section II.B] and is not proved here.

Main definitions #

Main results #

References #

The construction #

The variable of the label a of the vertex u in the block of the vertex list L starting at off, with n labels per entry: the block at the first occurrence of u in L.

The weights of the blocks of the vertex list L, with n labels per entry: one block of n variables for every entry of L, repeated vertices included, each weighing the number of occurrences of its vertex in L. Only the block at a vertex's first occurrence is used by blockVar.

The left ends of the edges, with multiplicity.

The right ends of the edges, with multiplicity.

def Cslib.PCP.Encoded.LabelCoverMinRep.formula {β γ : Type} {nβ nγ : ℕ} (eβ : β ≃ Fin nβ) (eγ : γ ≃ Fin nγ) (G : Graph (β → γ)) (d : Edge (β → γ)) :

The formula ⋁_a (x_{u,a} ∧ y_{v,π a}) of an edge from u to v with projection π.

def Cslib.PCP.Encoded.LabelCoverMinRep.minRep {β γ : Type} {nβ nγ : ℕ} (eβ : β ≃ Fin nβ) (eγ : γ ≃ Fin nγ) (G : Graph (β → γ)) :

The weighted Min-Rep instance of a Label Cover instance: one block of degree-weighted variables per edge end (so m (nβ + nγ) variables, the blocks after a vertex's first occurrence appearing in no formula), one formula per edge and the threshold 2m (or 1 without edges).

Variables and weights #

theorem Cslib.PCP.Encoded.LabelCoverMinRep.getD_blockWeights {L : List ℕ} {n k a : ℕ} (hk : k < L.length) (ha : a < n) :
(blockWeights L n).getD (k * n + a) 0 = List.count L[k] L

The weight of the variable of the label a of the k-th vertex is that vertex's degree.

theorem Cslib.PCP.Encoded.LabelCoverMinRep.blockVar_lt {L : List ℕ} {off n u a : ℕ} (hu : u ∈ L) (ha : a < n) :
blockVar L off n u a < off + L.length * n
theorem Cslib.PCP.Encoded.LabelCoverMinRep.mem_srcs {C : Type} {G : Graph C} {d : Edge C} (hd : d ∈ G.edges) :
theorem Cslib.PCP.Encoded.LabelCoverMinRep.mem_dsts {C : Type} {G : Graph C} {d : Edge C} (hd : d ∈ G.edges) :
theorem Cslib.PCP.Encoded.LabelCoverMinRep.getD_weights_left {β γ : Type} {nβ nγ : ℕ} (eβ : β ≃ Fin nβ) (eγ : γ ≃ Fin nγ) {G : Graph (β → γ)} {u a : ℕ} (hu : u ∈ srcs G) (ha : a < nβ) :
(minRep eβ eγ G).weights.getD (blockVar (srcs G) 0 nβ u a) 0 = List.count u (srcs G)

A left variable weighs the degree of its vertex.

theorem Cslib.PCP.Encoded.LabelCoverMinRep.getD_weights_right {β γ : Type} {nβ nγ : ℕ} (eβ : β ≃ Fin nβ) (eγ : γ ≃ Fin nγ) {G : Graph (β → γ)} {v b : ℕ} (hv : v ∈ dsts G) (hb : b < nγ) :
(minRep eβ eγ G).weights.getD (blockVar (dsts G) ((srcs G).length * nβ) nγ v b) 0 = List.count v (dsts G)

A right variable weighs the degree of its vertex.

theorem Cslib.PCP.Encoded.LabelCoverMinRep.eval_formula {β γ : Type} {nβ nγ : ℕ} (eβ : β ≃ Fin nβ) (eγ : γ ≃ Fin nγ) (G : Graph (β → γ)) (d : Edge (β → γ)) (T : Finset ℕ) :
Logic.PL.DNF.eval (fun (i : ℕ) => decide (i ∈ T)) (formula eβ eγ G d) = true ↔ ∃ (a : Fin nβ), blockVar (srcs G) 0 nβ d.src ↑a ∈ T ∧ blockVar (dsts G) ((srcs G).length * nβ) nγ d.dst ↑(eγ (d.constraint (eβ.symm a))) ∈ T

The formula of an edge holds exactly when some label of its left end and its projection at its right end are both selected.

Well-formedness and completeness #

theorem Cslib.PCP.Encoded.LabelCoverMinRep.length_flatten_formula {β γ : Type} {nβ nγ : ℕ} (eβ : β ≃ Fin nβ) (eγ : γ ≃ Fin nγ) (G : Graph (β → γ)) (d : Edge (β → γ)) :
(List.flatten (formula eβ eγ G d)).length = 2 * nβ
theorem Cslib.PCP.Encoded.LabelCoverMinRep.wellFormed_minRep {β γ : Type} {nβ nγ : ℕ} (eβ : β ≃ Fin nβ) (eγ : γ ≃ Fin nγ) [Nonempty β] (G : Graph (β → γ)) :
(minRep eβ eγ G).WellFormed (2 * nβ)

The output is well formed, with 2 nβ literal occurrences per formula.

theorem Cslib.PCP.Encoded.LabelCoverMinRep.minRep_mem_yes {β γ : Type} {nβ nγ : ℕ} (eβ : β ≃ Fin nβ) (eγ : γ ≃ Fin nγ) [Nonempty β] [DecidableEq γ] {G : Graph (β → γ)} {Δ : ℕ} {g σ : ℝ} (hG : (G.toGraph Complexity.projectionEval).Satisfiable) (hΔ : 2 * nβ ≤ Δ) :
minRep eβ eγ G ∈ (Complexity.GapCMMSA Δ g σ).yes

Completeness. A satisfiable Label Cover instance gives a yes-instance: selecting the variable of the label of every end of an edge costs 2m.

Soundness #

theorem Cslib.PCP.Encoded.LabelCoverMinRep.minRep_mem_no {β γ : Type} {nβ nγ : ℕ} (eβ : β ≃ Fin nβ) (eγ : γ ≃ Fin nγ) [Nonempty β] [DecidableEq γ] {G : Graph (β → γ)} {Δ : ℕ} {g δ : ℝ} (hΔ : 2 * nβ ≤ Δ) (hg : 1 ≤ g) (hδ : δ < 1 / g ^ 2) (hG : 1 - (G.toGraph Complexity.projectionEval).unsatVal ≤ δ) :
minRep eβ eγ G ∈ (Complexity.GapCMMSA Δ g 1).no

Soundness. A Label Cover instance of value at most δ < 1 / g² gives a no-instance with gap g and proportion 1: every assignment of weight at most 2gm falsifies some formula.

Running time #

theorem Cslib.PCP.Encoded.LabelCoverMinRep.isPolyTime_minRep {β γ : Type} {nβ nγ : ℕ} (eβ : β ≃ Fin nβ) (eγ : γ ≃ Fin nγ) [Finite β] [Finite γ] {encC : (β → γ) ↪ List Bool} :

The Min-Rep construction is polynomial-time for fixed finite label sets. The unary vertex numbers of the input bound the variable numbers, and the input's edge list bounds the unary weights and threshold.

Weighted Min-Rep reduction, a library reduction adapting the Min-Rep problem [Kor01]: perfect-completeness Label Cover of soundness δ < 1 / g² reduces to CMMSA with at most 2 |β| literals per formula, gap g and proportion 1.

CMMSA is NP-hard for every constant gap: for every g ≥ 1 there is a bound Δ on the literals of each formula for which GapCMMSA Δ g 1 is NP-hard, by weighted Min-Rep from small-soundness Label Cover (exists_GapLabelCover_npHard).