Theorem 4.3 — Algorithm 3's competitive ratio (goal)
DisprovedOnlinePrimalDual.Framework.algorithm3_competitive_ratioLet y : J → ℝ be non-negative dual values (Algorithm 3's final packing solution) and
alg3X inst y the resulting primal/covering values, and assume the covering solution is
feasible. Then: (i) the packing solution y violates each dual constraint by a factor of at
most 1+ln d; (ii) the covering solution is 2(1+ln d)-competitive against any feasible
offline covering solution; (iii) the packing solution is 2-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 3 never produces (disproved with y = 100 on a one-variable instance); replaced by OnlinePrimalDual.Framework.algorithm3_competitive_ratio_v2, which computes the run by raiseRun inst (alg3X inst) ord.
import Mathlib import Definitions.Def_OnlinePrimalDual_Framework_CoveringInstance import Definitions.Def_OnlinePrimalDual_Framework_dualSum import Definitions.Def_OnlinePrimalDual_Framework_alg3X
namespace OnlinePrimalDual.Framework
/-- **Theorem 4.3** (p. 124, PDF p. 35), Algorithm 3, the complementary-slackness algorithm — the
goal of this mission. `y` is the final dual/packing vector; `alg3X inst y` is the corresponding
primal/covering vector by Algorithm 3's own closed-form update rule (steps (1b)-(1c)).
`h_feasible` is Claim (1), that the algorithm's covering solution is primal feasible (p. 125),
taken as the hypothesis characterizing a completed run. The three conclusions are the book's own
bullets with the exact constants its proof derives: the dual/packing solution `y` violates each
constraint by a factor of at most `1 + ln d` (proof of Claim (2), p. 125, "∑ yⱼ ≤ cᵢ(1 + ln d)");
the covering solution is `2(1 + ln d)`-competitive against any feasible offline covering solution
(Claim (3), `P ≤ 2D`, p. 125-126, combined with the violation bound rescaling `y` to feasibility);
the packing solution is `2`-competitive against any feasible offline packing solution (`P ≤ 2D`
combined with weak duality both ways, `OPTpacking ≤ OPTcovering ≤ P ≤ 2D`), exactly as for
Theorem 4.1's analogous bullet. -/
theorem algorithm3_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, alg3X inst y i) :
(∀ i : I, dualSum inst y i ≤ inst.c i * (1 + Real.log inst.d)) ∧
(∀ x'' : I → ℝ, (∀ i, 0 ≤ x'' i) → (∀ j, 1 ≤ ∑ i ∈ inst.S j, x'' i) →
∑ i, inst.c i * alg3X inst y i ≤
2 * (1 + Real.log 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 * ∑ j, y j) := by sorry
end OnlinePrimalDual.Framework
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.