Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 4.2 — Algorithm 2's competitive ratio

Disproved
OnlinePrimalDual.Framework.algorithm2_competitive_ratio

by mikedeng1 · Sep 21, 2026 · Mathlib 0df444a (Lean v4.33.1)

competitive-ratiolinear-programmingonline-algorithmsprimal-dual

Let y : J → ℝ be non-negative dual values (Algorithm 2's final packing solution) and alg2X inst y the resulting primal/covering values, and assume the covering solution is feasible. Then: (i) the packing solution y is exactly feasible (∀i, dualSum inst y i ≤ c_i, no violation, unlike Algorithms 1 and 3); (ii) the covering solution is 2ln(1+d)-competitive against any feasible offline covering solution; (iii) the packing solution is 2ln(1+d)-competitive against any feasible offline packing solution.


Retired. Retired because the dual vector y was a free variable constrained only by final covering feasibility, admitting vectors Algorithm 2 never produces (disproved with y = 2 on a one-variable instance); replaced by OnlinePrimalDual.Framework.algorithm2_competitive_ratio_v2, which computes the run by raiseRun inst (alg2X inst) ord.

Preamble
import Mathlib
import Definitions.Def_OnlinePrimalDual_Framework_CoveringInstance
import Definitions.Def_OnlinePrimalDual_Framework_dualSum
import Definitions.Def_OnlinePrimalDual_Framework_alg2X
Formal statement
namespace OnlinePrimalDual.Framework

/-- **Theorem 4.2** (p. 121, PDF p. 32), Algorithm 2, the continuous algorithm. `y` is the final
dual/packing vector the algorithm produces; `alg2X inst y` is the corresponding primal/covering
vector, by Algorithm 2's own closed-form update rule. `h_feasible` is Claim (1), that the
algorithm's covering solution is primal feasible (p. 121), taken as the hypothesis
characterizing a completed run. Unlike Algorithm 1/3, Algorithm 2's packing solution is exactly
feasible, not merely approximately so (Claim (3), p. 122): `∀ i, dualSum inst y i ≤ inst.c i`.
The competitive ratios are both `2 ln(1+d)`, the constant the proof derives (Eq. (4.2), p. 121:
`∂P/∂yⱼ ≤ 2 ln(1+d) · ∂D/∂yⱼ`), stated via weak duality against an arbitrary offline-feasible
comparison solution on each side, as for Theorem 4.1. -/
theorem algorithm2_competitive_ratio {I J : Type*} [Fintype I] [Fintype J] [DecidableEq I]
    (inst : CoveringInstance I J) (y : J → ℝ) (hy_nonneg : ∀ j, 0 ≤ y j)
    (h_feasible : ∀ j, 1 ≤ ∑ i ∈ inst.S j, alg2X inst y i) :
    (∀ i : I, dualSum inst y i ≤ inst.c i) ∧
    (∀ x'' : I → ℝ, (∀ i, 0 ≤ x'' i) → (∀ j, 1 ≤ ∑ i ∈ inst.S j, x'' i) →
        ∑ i, inst.c i * alg2X inst y i ≤
          2 * Real.log (1 + inst.d) * ∑ i, inst.c i * x'' i) ∧
    (∀ y'' : J → ℝ, (∀ j, 0 ≤ y'' j) → (∀ i, dualSum inst y'' i ≤ inst.c i) →
        ∑ j, y'' j ≤ 2 * Real.log (1 + inst.d) * ∑ j, y j) := by sorry

end OnlinePrimalDual.Framework
Source
Buchbinder & Naor, The Design of Competitive Online Algorithms via a Primal-Dual Approach, FnT TCS 2009, p. 121-122, Theorem 4.2
Human review
  • Endorsed by Shuze Chen · Sep 28, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 28, 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