§5, pp. 9–12 — composite jobs of a run of the series parallel algorithm, in nonincreasing ratio order, form an optimal sequence
ProvedLawlerWCT.SeriesPar.series_parallel_algorithm_optimalThroughout, is a finite set of jobs to be sequenced on a single machine, is an acyclic digraph on (job must precede job when there is a directed path from to ), job has a processing time and a real weight , and the cost of a feasible sequence is , where is the completion time of when the machine starts at time and never idles.
Let be a decomposition tree of : its leaves are exactly the jobs of , each occurring once, and for all , job must precede job in if and only if is an arc of the transitive series parallel digraph built by (that is, the transitive closure of is the digraph builds; is series parallel).
Run the series parallel algorithm bottom-up on (a leaf yields its job, a -node the union of its sons' sets, an -node the result of the series procedure, Steps 1–3 of p. 11, on its sons' sets), with any tie-breaking, and let be the set of composite jobs it produces for the root. List the composite jobs of in nonincreasing order of their ratios
breaking ties arbitrarily, and replace each composite job by the sequence of jobs built up for it. The resulting sequence is an optimal sequence for : it respects every precedence constraint and minimizes among all feasible sequences.
This is the correctness of Lawler's algorithm, which solves the problem for series parallel precedence constraints in time once a decomposition tree is known.
Formalization Note The decomposition tree is tied to by three hypotheses: its leaves are distinct, they are exactly , and the transitive closure of on coincides with the arc relation of the transitive series parallel digraph built by the tree. Feasibility and the objective are those of itself, not of the tree. The weights are arbitrary reals and the processing times positive; never occurs, since composite jobs are nonempty.
import Mathlib import Definitions.Def_LawlerWCT_SeriesPar_Model
namespace LawlerWCT.SeriesPar
theorem series_parallel_algorithm_optimal {ι : Type*} [DecidableEq ι] (N : Finset ι) (G : ι → ι → Prop)
(hGN : ∀ i j, G i j → i ∈ N ∧ j ∈ N) (hacyc : ∀ j, ¬ Relation.TransGen G j j)
(p w : ι → ℝ) (hp : ∀ j ∈ N, 0 < p j)
(T : SPTree ι) (hT : T.leaves.Nodup) (hTN : ∀ j, j ∈ T.leaves ↔ j ∈ N)
(hTG : ∀ i ∈ N, ∀ j ∈ N, Relation.TransGen G i j ↔ T.prec i j)
(F : List (List ι)) (hrun : Run p w T F)
(L : List (List ι)) (hL : L.Perm F) (hord : IsRatioOrder p w L) :
SingleMachinePrec.Biclique.IsOptimalSchedule G p w N L.flatten := by sorry
end LawlerWCT.SeriesPar
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.