Documentation

CslibFrontier.Computability.PCP.Approximation.SetCover.ApproxReduction

Approximation-preserving reductions and Set Cover gap problems #

General minimization-problem interface (MinOptProblem), approximation guarantees (IsApprox), approximation-preserving reductions (ApproxPreservingReducible), and the gap promise problems for unweighted and weighted Set Cover (GapSetCover, GapWeightedSetCover), formulated for this library's multi-tape polynomial-time model.

An approximation-preserving reduction between minimization problems maps instances in polynomial time and lifts feasible solutions back in polynomial time while controlling the blowup of the approximation ratio (ApproxPreservingReducible.comp_isApprox). This directly yields a reduction from unweighted Set Cover to weighted Set Cover by assigning unit weights (approxPreservingReducible_setCover_weightedSetCover, polyTimeReducible_GapSetCover_GapWeightedSetCover).

Hardness of GapSetCover at gap r rules out polynomial-time ρ-approximation algorithms for every 0 ≤ ρ < r unless P = NP (P_eq_NP_of_setCover_approx, P_eq_NP_of_weightedSetCover_approx), using rational thresholds between ρ and r so the induced decider runs in native multi-tape polynomial time.

Main definitions #

Main results #

Optimization problems and approximation-preserving reductions #

structure Cslib.Complexity.MinOptProblem (Instance Solution : Type) :

A combinatorial minimization problem over valid instances IsValid, feasible solutions Feasible, real cost cost, and attained optimum opt.

  • IsValid : Instance → Prop

    Predicate picking out well-formed/feasible instances.

  • Feasible : Instance → Solution → Prop

    Feasible solutions for a given instance.

  • cost : Instance → Solution → ℝ

    Objective cost to minimize.

  • opt : Instance → ℝ

    Optimal value on an instance.

  • opt_le (x : Instance) (y : Solution) : self.IsValid x → self.Feasible x y → self.opt x ≤ self.cost x y

    Every feasible solution on a valid instance costs at least opt.

  • exists_opt (x : Instance) : self.IsValid x → ∃ (y : Solution), self.Feasible x y ∧ self.cost x y = self.opt x

    Valid instances admit a feasible solution achieving opt.

noncomputable def Cslib.Complexity.MinOptProblem.gapProblem {α σ : Type} (P : MinOptProblem α σ) (c s : α → ℝ) :

The gap promise problem induced by a minimization problem P with completeness threshold c and soundness threshold s, restricted to valid instances.

def Cslib.Complexity.MinOptProblem.IsApprox {α σ : Type} (P : MinOptProblem α σ) (ρ : α → ℝ) (A : α → σ) :

An algorithm A is a ρ-approximation for minimization problem P when on every valid instance it returns a feasible solution of cost at most ρ x * P.opt x.

def Cslib.Complexity.ApproxPreservingReducible {α₁ α₂ σ₁ σ₂ : Type} (P₁ : MinOptProblem α₁ σ₁) (P₂ : MinOptProblem α₂ σ₂) (encα₁ : α₁ ↪ List Bool) (encα₂ : α₂ ↪ List Bool) (encσ₁ : σ₁ ↪ List Bool) (encσ₂ : σ₂ ↪ List Bool) (g : α₁ → ℝ → ℝ) :

Polynomial-time approximation-preserving reduction from minimization problem P₁ to P₂ with ratio transformer g : α₁ → ℝ → ℝ: polynomial-time maps toInst and liftSol preserve validity and feasibility and transform any ρ₂-approximate solution of toInst x into a g x ρ₂-approximate solution of x.

theorem Cslib.Complexity.ApproxPreservingReducible.refl {α σ : Type} (P : MinOptProblem α σ) (encα : α ↪ List Bool) (encσ : σ ↪ List Bool) :
ApproxPreservingReducible P P encα encα encσ encσ fun (x : α) (ρ : ℝ) => ρ

Identity approximation-preserving reduction.

theorem Cslib.Complexity.ApproxPreservingReducible.trans {α₁ α₂ α₃ σ₁ σ₂ σ₃ : Type} {P₁ : MinOptProblem α₁ σ₁} {P₂ : MinOptProblem α₂ σ₂} {P₃ : MinOptProblem α₃ σ₃} {encα₁ : α₁ ↪ List Bool} {encα₂ : α₂ ↪ List Bool} {encα₃ : α₃ ↪ List Bool} {encσ₁ : σ₁ ↪ List Bool} {encσ₂ : σ₂ ↪ List Bool} {encσ₃ : σ₃ ↪ List Bool} {g₁ : α₁ → ℝ → ℝ} {g₂ : ℝ → ℝ} (h₁₂ : ApproxPreservingReducible P₁ P₂ encα₁ encα₂ encσ₁ encσ₂ g₁) (h₂₃ : ApproxPreservingReducible P₂ P₃ encα₂ encα₃ encσ₂ encσ₃ fun (x : α₂) => g₂) :
ApproxPreservingReducible P₁ P₃ encα₁ encα₃ encσ₁ encσ₃ fun (x : α₁) (ρ : ℝ) => g₁ x (g₂ ρ)

Transitivity of approximation-preserving reductions.

theorem Cslib.Complexity.ApproxPreservingReducible.comp_isApprox {α₁ α₂ σ₁ σ₂ : Type} {P₁ : MinOptProblem α₁ σ₁} {P₂ : MinOptProblem α₂ σ₂} {encα₁ : α₁ ↪ List Bool} {encα₂ : α₂ ↪ List Bool} {encσ₁ : σ₁ ↪ List Bool} {encσ₂ : σ₂ ↪ List Bool} {g : α₁ → ℝ → ℝ} (hred : ApproxPreservingReducible P₁ P₂ encα₁ encα₂ encσ₁ encσ₂ g) {A₂ : α₂ → σ₂} {ρ₂ : α₂ → ℝ} (hA₂ : Turing.MultiTapeTM.ComputableInPolyTime A₂ encα₂ encσ₂) (happrox : P₂.IsApprox ρ₂ A₂) :
∃ (A₁ : α₁ → σ₁), Turing.MultiTapeTM.ComputableInPolyTime A₁ encα₁ encσ₁ ∧ P₁.IsApprox (fun (x : α₁) => g x (ρ₂ (Classical.choose hred x))) A₁

Pulling a polynomial-time ρ₂-approximation algorithm back through an approximation-preserving reduction yields a polynomial-time approximation algorithm for P₁.

Set Cover optimization problems and gap promise problems #

Minimization problem view of unweighted Set Cover with index-list witnesses.

Minimization problem view of weighted Set Cover with index-list witnesses.

Unweighted Set Cover gap problem with instance-dependent threshold ratio r : SetSystem → ℝ, restricted to coverable set systems: yes-instances satisfy optCoverSize S ≤ k, while no-instances satisfy k < r S * k ≤ optCoverSize S.

Unweighted Set Cover gap problem at constant ratio r.

Weighted Set Cover gap problem with instance-dependent threshold ratio r : WeightedSetSystem → ℝ, restricted to coverable weighted set systems.

Weighted Set Cover gap problem at constant ratio r.

theorem Cslib.Complexity.mem_no_GapSetCoverFn {r : SetSystem → ℝ} {S : SetSystem} {k : ℕ} :
(S, k) ∈ (GapSetCoverFn r).no ↔ S.Coverable ∧ r S * ↑k ≤ ↑S.optCoverSize ∧ ↑k < r S * ↑k

Unweighted to Weighted Set Cover #

Equip every subset of S : SetSystem with weight 1.

Unweighted Set Cover gap reduces in polynomial time to Weighted Set Cover gap with the same threshold ratio r.

From Set Cover approximation algorithms to P = NP #

Any polynomial-time ρ-approximation algorithm (0 ≤ ρ < r) for unweighted Set Cover places GapSetCover r in PromiseP.

If GapSetCover r is NP-hard, no polynomial-time ρ-approximation algorithm with 0 ≤ ρ < r exists for unweighted Set Cover unless P = NP.

Any polynomial-time ρ-approximation algorithm (0 ≤ ρ < r) for weighted Set Cover places GapWeightedSetCover r in PromiseP.

If GapWeightedSetCover r is NP-hard, no polynomial-time ρ-approximation algorithm with 0 ≤ ρ < r exists for weighted Set Cover unless P = NP.