The Design of Competitive Online Algorithms via a Primal-Dual Approach II: The Online Set-Cover ProblemTextbook
Motivation
Section 4 of this survey derives a simple randomized -competitive algorithm for the online set-cover problem, by rounding the fractional solution the online packing-covering framework produces. An intriguing question the survey poses next: can the same guarantee be achieved deterministically? The standard tool for removing randomness, the method of conditional expectations, requires finding a pessimistic estimator — a potential function whose value the algorithm can track and whose behavior certifies the randomized algorithm's guarantee step by step. Chapter 5 constructs exactly this potential function for the weighted online set-cover problem, and shows that greedily minimizing it online reproduces the randomized algorithm's competitive ratio with no randomness at all. This mission formalizes that construction: the potential function itself (Lemma 5.1) and the correctness guarantee it buys (Theorem 5.2).
Setting
Fix a finite universe of elements and a finite family of sets with positive costs , both known to the algorithm in advance (only which elements will actually need covering, and in what order, is unknown). A monotonically increasing assignment of fractional weights to sets is produced online by a fractional subroutine (any - competitive online fractional algorithm — the survey's own Section 4.2 supplies one). An element's weight is . Given a target (a guessed upper bound on the optimal integral cover's cost — the survey handles an unknown optimum by doubling this guess across phases, outside this chapter's own scope), the algorithm maintains a chosen cover and the potential
where and is 's characteristic function. Whenever a set 's weight increases, the algorithm computes both with and without adding to and chooses whichever keeps from exceeding its value before the step (failing only if neither does, which Lemma 5.1 shows cannot happen when ).
Formalization targets
Theorem 5.2 (goal, p. 139): given the invariant that Lemma 5.1 maintains throughout a run, (i) every element of weight is covered, and (ii) the chosen cover costs at most .
Lemma 5.1 (milestone, p. 137): the potential function never increases in expectation across a weight-augmenting step, under the algorithm's own randomized choice of whether to add the augmented set to the cover (the internal argument — via the method of conditional expectations — that certifies the deterministic algorithm's choice rule never fails).
Significance
This chapter answers, for the online set-cover problem specifically, a question that recurs
throughout online algorithm design: when can a randomized guarantee be derandomized online? The
potential-function technique here is the survey's own template for the answer (it recurs,
per the chapter's Notes section, in the routing algorithm of Chapter 9 and the ad-auctions
algorithm of Chapter 10, both formalized as separate missions in this series) — a self-contained,
reusable instance of "derandomization via an explicit pessimistic estimator" in the online
setting, distinct from the offline set-cover primal-dual and dual-fitting algorithms of this
book's own Chapter 2, already on the platform (PrimalDualOnline.SetCover.*, checked below: a
static instance with no arrival order and no potential function, a genuinely different model).
Difficulty
The central formalization challenge is that Lemma 5.1's own statement, "", denotes the potential's value in expectation under the algorithm's randomized choice — not a single deterministic before/after pair — since the lemma is proved via a probabilistic argument (adding to the cover with probability ) whose role is purely internal to justifying the deterministic algorithm's rule (choose whichever of the two options controls ). Stating the lemma as a bare inequality between two potential values, without the mixture, would either be false (the "add " branch alone can increase ) or would silently smuggle in the derandomized choice as a hypothesis rather than proving it is always available. This mission states the expectation explicitly as a probability-weighted average of the two branch potentials, matching the actual analytic content of the book's proof (equations 5.1-5.6) rather than its final one-line restatement.
Formalization scope
SetCoverInstance E T bundles elemSets : E → Finset T (the sets containing an element) and
positive costs c. elementWeight and coveredBy are literal transcriptions of and
"". potential transcribes 's displayed formula verbatim, with n cast from
Fintype.card E. potential_nonincreasing (Lemma 5.1) is the expectation inequality described
above. algorithm_correctness (Theorem 5.2) takes the potential invariant Φ < n² as a
hypothesis (the state Lemma 5.1, applied repeatedly from the initial value , is
what the book's own proof shows every reachable state satisfies) together with an explicit ratio
β standing for "the fractional solution is O(log m)-competitive" (∑ wₛcₛ ≤ βα) — the
book imports this fact from Section 4 as a black-box subroutine rather than re-deriving a
specific numeric constant in this chapter, and this mission does the same rather than re-deriving
Chapter 4's own constant under the (different) substitution the book's prose glosses
over. The conclusion is then the fully explicit α · log n · (3β + 2), matching the book's own
derivation (displayed inequality, p. 139-140) with O(log m) replaced by the parameter β.
This correctly rules out the trivializing formalization in which the O(log m log n) bound is
left as an unquantified existential constant, or in which Φ's invariant is assumed directly as
an unmotivated free hypothesis rather than the fact Lemma 5.1 is what actually establishes.
Reals throughout; Real.log, Real.exp, Real.rpow (via the ^ notation on reals) for the
book's own log, exp and n^{2w_e}. Nothing here is reused from 04-framework
(concurrent draft; per this series' own rule, drafts do not import drafts) even though this
chapter's fractional subroutine is conceptually the same online covering framework — restated
here only as the abstract ratio β, not as a Lean dependency. Welcome contributions: completing
the two sorrys, and formalizing the doubling-across-phases wrapper (Section 5.1's "Obtaining a
Deterministic Algorithm" discussion) that removes the need to know α ≥ c(C_OPT) in advance.
Selected references
- N. Buchbinder, J. Naor. The Design of Competitive Online Algorithms via a Primal-Dual Approach. Foundations and Trends in Theoretical Computer Science, 3(2-3):93-263, 2009. https://doi.org/10.1561/0400000024
- N. Alon, B. Awerbuch, Y. Azar, N. Buchbinder, J. Naor. The online set cover problem. STOC 2003 / SIAM J. Comput. 39(2), 2009 (cited by this book's Chapter 5 Notes as [3]).