Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Theorem 8 — Delayed SWPT has a competitive ratio of 2

Open
DelayedSWPT.Main.competitive_ratio_two

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

competitive-analysisonline-algorithmsp2o-batch-pfp1ap2o-gran-per-chapterp2o-plan-paperp2o-v1scheduling

Consider the single-machine problem of minimizing total weighted completion time ∑jwjCj\sum_j w_j C_j∑j​wj​Cj​ with release dates and no preemption, with integer release dates rj≥0r_j \ge 0rj​≥0, integer processing times pj≥1p_j \ge 1pj​≥1 and positive weights wjw_jwj​. Let π\piπ be the schedule produced by the online algorithm Delayed SWPT. Then 222 is the least ρ\rhoρ such that

∑jwjCj(π)≤ρ∑jwjCj(S)\sum_{j} w_j C_j(\pi) \le \rho \sum_j w_j C_j(S)j∑​wj​Cj​(π)≤ρj∑​wj​Cj​(S)

for every instance and every feasible (offline) schedule SSS of that instance. In words: Delayed SWPT is 222-competitive, and no smaller constant is valid for this algorithm.

Since no online algorithm for this problem has a competitive ratio below 2 (Hoogeveen and Vestjens, 1996), Delayed SWPT is a best possible online algorithm; that general lower bound is not part of this statement.

Formalization Note The competitive ratio is defined (p. 686) as the least such ρ\rhoρ, so the statement is IsLeast of the set of valid ρ\rhoρ. Comparing with every feasible schedule is the same as comparing with the offline optimum and needs no existence of an optimum. The lower half concerns Delayed SWPT only (a one-job instance with r=0r = 0r=0, p=1p = 1p=1 suffices).

Preamble
import Mathlib
import Definitions.Def_DelayedSWPT_Model_dswpt
Formal statement
namespace DelayedSWPT.Main

open DelayedSWPT.Model

/-- Theorem 8 of Anderson and Potts (2004), p. 696: Delayed SWPT has a competitive ratio of 2.
The competitive ratio (p. 686) is the least `ρ` such that on every instance the Delayed SWPT
schedule costs at most `ρ` times every feasible (offline) schedule. -/
theorem competitive_ratio_two :
    IsLeast {ρ : ℝ | ∀ (n : ℕ) (I : Instance n) (S : Fin n → ℕ), IsFeasible I.r I.p S →
      cost I.w I.p (dswpt I) ≤ ρ * cost I.w I.p S} 2 := by sorry

end DelayedSWPT.Main
Source
Anderson and Potts, Online Scheduling of a Single Machine to Minimize Total Weighted Completion Time, Math. Oper. Res. 29(3) (2004), p. 696, Theorem 8; competitive ratio defined on p. 686
Human review
  • Endorsed by Shuze Chen · Oct 4, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 4, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me