Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 5.2 — the online algorithm covers every arriving element and chooses at most (2αln⁡(1+d)+1) OPT/ln⁡2(2\alpha\ln(1+d)+1)\,OPT/\ln 2(2αln(1+d)+1)OPT/ln2 sets

Proved
BNCovPack.SetCover.lemma_5_2

by mikedeng1 · Oct 6, 2026 · Mathlib 0df444a (Lean v4.33.1)

competitive-analysisderandomizationonline-algorithmsp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1set-cover

Consider online unweighted set cover: a ground set XXX of nnn elements, a finite family S\mathcal SS of sets, all of cost 111, and d≥1d\ge1d≥1 an upper bound on the frequency of every element (the number of sets containing it). Elements arrive in a list σ\sigmaσ. Let OPT≥1OPT\ge 1OPT≥1 be a natural number such that some family of at most OPTOPTOPT sets covers every element of σ\sigmaσ. Run the algorithm of Section 5.1 with any B>0B>0B>0, any order of the sets, frequency parameter ddd and the value OPTOPTOPT, and let C\mathcal CC be the family it has chosen. Then:

  1. every element of σ\sigmaσ is covered by a set of C\mathcal CC;
  2. with r=eln⁡(e/(e−1))r=e\ln(e/(e-1))r=eln(e/(e−1)) and α=max⁡{1,ln⁡(rn/OPT)}\alpha=\max\{1,\ln(rn/OPT)\}α=max{1,ln(rn/OPT)},
∣C∣ ≤ (2αln⁡(1+d)+1) OPTln⁡2.|\mathcal C|\ \le\ \frac{\big(2\alpha\ln(1+d)+1\big)\,OPT}{\ln 2}.∣C∣ ≤ ln2(2αln(1+d)+1)OPT​.

Since α=O(log⁡(n/OPT))\alpha=O(\log(n/OPT))α=O(log(n/OPT)), this is the paper's guarantee that the deterministic online algorithm is O(log⁡dlog⁡(n/OPT))O(\log d\log(n/OPT))O(logdlog(n/OPT))-competitive for online unweighted set cover, improving the O(log⁡mlog⁡n)O(\log m\log n)O(logmlogn) of Alon et al. Because σ\sigmaσ is arbitrary, both claims hold at every time of the run.

Formalization Note The paper writes OPT⋅O(log⁡dlog⁡(n/OPT))OPT\cdot O(\log d\log(n/OPT))OPT⋅O(logdlog(n/OPT)); the proof yields (2αln⁡(1+d)+1) OPT/ln⁡2(2\alpha\ln(1+d)+1)\,OPT/\ln 2(2αln(1+d)+1)OPT/ln2, from ∑sχC(s)≤1ln⁡2α∑sw(s)+1ln⁡2OPT\sum_s\chi_{\mathcal C}(s)\le\frac{1}{\ln 2}\alpha\sum_s w(s)+\frac{1}{\ln2}OPT∑s​χC​(s)≤ln21​α∑s​w(s)+ln21​OPT and the fractional bound ∑sw(s)≤2ln⁡(1+d) OPT\sum_s w(s)\le 2\ln(1+d)\,OPT∑s​w(s)≤2ln(1+d)OPT. The paper assumes OPTOPTOPT is known and equal to the optimum; here OPTOPTOPT is any known upper bound on the optimum (at the optimum this is the paper's statement). ddd may be any upper bound on the maximum frequency (at the maximum frequency this is the paper's statement). Unit costs are the hypothesis c≡1c\equiv1c≡1 on the published instance type. The doubling wrapper for unknown OPTOPTOPT is not part of the statement.

Preamble
import Mathlib
import Definitions.Def_OnlinePrimalDual_OnlineSetCover_SetCoverInstance
import Definitions.Def_OnlinePrimalDual_OnlineSetCover_coveredBy
import Definitions.Def_BNCovPack_SetCover_Potential
import Definitions.Def_BNCovPack_SetCover_Algorithm
Formal statement
namespace BNCovPack.SetCover

open OnlinePrimalDual.OnlineSetCover

/-- **Lemma 5.2** (Buchbinder–Naor 2009, p. 14): the online unweighted set-cover algorithm of §5.1
(unit costs, fractional scheme with `ℓ = d`, rounding by the potential `Φ` with
`α = max {1, ln(r n/OPT)}`), run with any `B > 0`, any processing order of the sets, and a known
value `OPT ≥ 1` such that some family of at most `OPT` sets covers every arriving element,
(i) covers every element that is given to it, and
(ii) chooses at most `(2 α ln(1 + d) + 1) · OPT / ln 2` sets.
The paper writes `OPT · O(log d log(n/OPT))`; the proof yields `(2α ln(1+d) + 1)·OPT/ln 2`. -/
theorem lemma_5_2 {E T : Type*} [Fintype E] [Fintype T] [DecidableEq T]
    (inst : SetCoverInstance E T) (hc : ∀ s, inst.c s = 1)
    (B : ℝ) (hB : 0 < B) (d : ℕ) (hd : 1 ≤ d) (hfreq : ∀ e, (inst.elemSets e).card ≤ d)
    (OPT : ℕ) (hOPT : 1 ≤ OPT) (ord : List T) (hord : ∀ s, s ∈ ord) (σ : List E)
    (hopt : ∃ F : Finset T, F.card ≤ OPT ∧ ∀ e ∈ σ, coveredBy inst F e) :
    (∀ e ∈ σ, coveredBy inst (run inst B d OPT ord σ).cover e) ∧
    ((run inst B d OPT ord σ).cover.card : ℝ)
      ≤ (2 * alphaParam (Fintype.card E) OPT * Real.log (1 + (d : ℝ)) + 1) * (OPT : ℝ)
          / Real.log 2 := by sorry

end BNCovPack.SetCover
Source
Buchbinder, Naor, Online Primal-Dual Algorithms for Covering and Packing, Math. Oper. Res. (2009), DOI 10.1287/moor.1080.0363, p. 14, Lemma 5.2 and its proof; model p. 12, Section 5.1
Human review
  • Endorsed by Shuze Chen · Oct 6, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 6, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me