Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 3.3: with c_i/s_i constant on m machines, the weighted flow time is κ/2 (∑ s_i² + S²/m + ∑_j δ_j²), so minimizing it is minimizing ∑_j δ_j²

Proved
AllocationIndices.weighted_flow_time_equal_ratios

by naimengye · Sep 24, 2026 · Mathlib 0df444a (Lean v4.33.1)

flow-timeparallel-machinesscheduling

Theorem 3.3. For mmm machines and nnn deterministic jobs with ci/sic_i/s_ici​/si​ the same for all jobs, minimization of weighted flow time is equivalent to minimization of ∑jδj2\sum_j \delta_j^2∑j​δj2​, where S/m+δjS/m + \delta_jS/m+δj​ is the total process time for machine jjj, and S=∑isiS = \sum_i s_iS=∑i​si​.

Formally, as the identity behind it: for every schedule σ\sigmaσ of nnn jobs on m≥1m \ge 1m≥1 machines, service times sis_isi​ and weights ci=κsic_i = \kappa s_ici​=κsi​ for a common κ\kappaκ,

∑iciCi=κ2(∑isi2+S2m+∑j=1mδj2),\sum_i c_i C_i = \frac{\kappa}{2}\Big(\sum_i s_i^2 + \frac{S^2}{m} + \sum_{j=1}^m \delta_j^2\Big),i∑​ci​Ci​=2κ​(i∑​si2​+mS2​+j=1∑m​δj2​),

where CiC_iCi​ is the completion time of job iii under σ\sigmaσ and δj\delta_jδj​ the excess of machine jjj's load over S/mS/mS/m. The first two terms do not depend on the schedule, so minimizing the weighted flow time over schedules is minimizing ∑jδj2\sum_j \delta_j^2∑j​δj2​, which is the theorem; the identity also shows that the order of the jobs on a machine is irrelevant when all ratios agree.

Preamble
import Definitions.Def_AllocationIndices_Jobs

open MeasureTheory ProbabilityTheory BanditAlgorithm
Formal statement
namespace AllocationIndices

theorem weighted_flow_time_equal_ratios {n m : ℕ} (σ : Schedule n m) (s c : Fin n → ℝ)
    (hm : 0 < m) {κ : ℝ} (hc : ∀ i, c i = κ * s i) :
    weightedFlowTime σ s c =
      κ / 2 * (∑ i, s i ^ 2 + (∑ i, s i) ^ 2 / m + ∑ j, loadDeviation σ s j ^ 2) := by sorry

end AllocationIndices
Source
Gittins, Glazebrook and Weber, Multi-armed Bandit Allocation Indices, 2nd ed., Wiley 2011, doi:10.1002/9780470980033, §3.4.3 p. 64, Theorem 3.3 (proof left as Exercise 3.5)
Human review
  • Endorsed by Shuze Chen · Sep 25, 2026

    Confirmed by the moderator at approval.

  • Endorsed by naimengye · Sep 25, 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