List Scheduling on Identical Machines #
This module models non-preemptive scheduling of n jobs with processing times p : Fin n → α
on m identical machines (P || C_max in the three-field notation). An assignment
σ : Fin n → Fin m has machine loads load p σ and makespan makespan p σ; optMakespan m p
is the minimum over all m ^ n assignments. With the jobs processed in list order, job j starts
on machine σ j at time prefixLoad p σ j (σ j), the load of that machine over the earlier jobs.
IsListSchedule p σ states that every job goes to a machine of minimum load over the earlier
jobs ([Gra66]), and listSchedule is the computable rule with lowest-index tie-breaking.
Main definitions #
Cslib.Algorithms.Lean.Scheduling.load,prefixLoad,makespan,optMakespan: machine loads, loads over the firstkjobs, makespan and optimal makespan.IsListSchedule: Graham's list-scheduling rule as a property of an assignment.argminFin,listScheduleAux,listSchedule: computable least-loaded machine and list scheduling.grahamTight: the tight instance withm (m - 1)unit jobs and one job of lengthm.
Main results #
sum_le_card_nsmul_optMakespan,le_optMakespan: the lower bounds∑ p ≤ m · OPTandp j ≤ OPT([WS11], (2.4) and (2.3)).IsListSchedule.card_mul_makespan_le,IsListSchedule.makespan_le_optMakespan: Graham's boundC_LS ≤ (2 - 1/m) · OPT([Gra66], §II, Theorem (p. 1570) withn = n'; [WS11], Section 2.3).isListSchedule_listSchedule:listSchedulesatisfiesIsListSchedule.optMakespan_grahamTight,IsListSchedule.makespan_grahamTight: ongrahamTight α mevery list schedule has makespan exactly(2 - 1/m) · OPT = 2m - 1, so the bound is tight for everym.
References #
The load of machine i under the assignment σ: the total processing time of the jobs
assigned to i.
The load of machine i counting only the jobs j with j < k. With jobs processed in list
order, prefixLoad p σ j i is the time at which machine i becomes free before job j.
In a list schedule, job j starts on a machine that was least loaded before j.
The machine loads before job k add up to the total processing time of the jobs j < k.
The makespan of an assignment: the maximum machine load.
The optimal makespan over all assignments of the jobs to m machines.
The total processing time is at most m times the makespan of any assignment.
Every job's processing time is at most the makespan, for nonnegative processing times.
Average-load lower bound on the optimum, ∑ p ≤ m · OPT ([WS11], (2.4)).
Longest-job lower bound on the optimum ([WS11], (2.3)).
If every job finishes by B (its start prefixLoad p σ j (σ j) plus p j), then every
machine load is at most B.
Graham's averaging bound for one job: under list scheduling, job j finishes by
(∑_{k ≠ j} p k) / m + p j.
Graham's list-scheduling bound ([Gra66], §II, Theorem (p. 1570) with n = n' and no
precedences; [WS11], Theorem 2.6 and the refinement after Theorem 2.5): every list
schedule has makespan at most 2 - 1/m times the makespan of any assignment, stated without
division as m · C_LS ≤ (2m - 1) · C.
Graham's bound against the optimum: C_LS ≤ (2 - 1/m) · OPT.
A machine minimizing f, the lowest-indexed one among ties (Graham's convention that
simultaneous claims go to the processor of smaller index).
The machines chosen by list scheduling, in list order, as plain data so that each earlier
choice is computed once: job n goes to a least loaded machine (lowest index among ties) for the
schedule of the first n jobs.
Graham's list scheduling in list order, with lowest-index tie-breaking.
The recursive description of listSchedule: job n goes to a least loaded machine for the
schedule of the first n jobs.
listSchedule is a list schedule.
The optimum of the tight instance is m: the long job alone on one machine, and m unit jobs
on each of the others.
Tightness of Graham's bound. Every list schedule of grahamTight α m has makespan
2m - 1 = (2 - 1/m) · OPT, so the ratio of IsListSchedule.makespan_le_optMakespan is attained on
m machines for every m.