The Algorithm, Step 2, p. 103 — Moore's algorithm terminates with a schedule minimizing the number of late jobs
ProvedMooreLateJobs.NumLate.moore_algorithm_optimalLet be a finite set of jobs with processing times and due-dates with for every job. Run Moore's algorithm:
- (Step 1) Start from a schedule of in shortest-processing-time order, (ties arbitrary), with no rejected jobs.
- (Steps 2–3) Repeatedly find the first late job of the current sequence, reorder by due-dates, and, if some job of that reordered prefix is late, reject .
Suppose a run reaches a state whose current sequence has no late job, with rejected jobs . Then for every ordering of the current sequence's jobs according to their due-dates, , and every ordering of the rejected jobs,
is an optimal schedule for : no schedule of has fewer late jobs.
This is the correctness theorem of Moore's algorithm for the single-machine problem of minimizing the number of late jobs ().
Formalization Note The algorithm is the step relation MooreStep (every tie-break allowed); a run is its reflexive-transitive closure from . is added (processing times are durations); is the paper's standing assumption (p. 102). That the algorithm does reach such a state is stated separately (progress and termination).
import Mathlib import Definitions.Def_MooreLateJobs_Shared_completionTime import Definitions.Def_MooreLateJobs_NumLate_lateSet import Definitions.Def_MooreLateJobs_NumLate_IsOptimal import Definitions.Def_MooreLateJobs_NumLate_MooreStep
namespace MooreLateJobs.NumLate
theorem moore_algorithm_optimal {ι : Type*} [DecidableEq ι] (J : Finset ι) (t D : ι → ℝ)
(ht : ∀ i ∈ J, 0 ≤ t i) (htD : ∀ i ∈ J, t i ≤ D i)
(l₀ : List ι) (hl₀ : Shared.IsSchedule J l₀) (hspt : l₀.Pairwise (fun a b => t a ≤ t b))
(cur rej : List ι) (hrun : Relation.ReflTransGen (MooreStep t D) (l₀, []) (cur, rej))
(hterm : lateSet t D cur = ∅)
(cur' : List ι) (hcur' : cur'.Perm cur) (hdd : cur'.Pairwise (fun a b => D a ≤ D b))
(rej' : List ι) (hrej' : rej'.Perm rej) :
IsOptimal t D J (cur' ++ rej') := by sorry
end MooreLateJobs.NumLate
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.