Flowshop and Jobshop Schedules: Complexity and Approximation 6: Concatenating Optimal Schedules of Processor Pairs Gives Finish Time within ⌈m/2⌉ Times the OptimumResearch Paper
Motivation
A flow shop is the simplest model of a production line: every job passes through the same sequence of machines in the same order. Minimizing the time at which the last job leaves the last machine (the finish time, or makespan) is easy for two machines, where Johnson's rule gives an optimal schedule in time (Johnson 1954), and NP-hard from three machines on (Garey, Johnson, Sethi 1976; Gonzalez, Sahni 1978, §1, for preemptive schedules). For three or more machines the practical question is therefore how far a fast heuristic can be from the optimum in the worst case.
Gonzalez and Sahni (1978, §2) first show that any busy schedule, one that never leaves a processor idle while a task is available for it, has finish time at most times the optimum (their Lemma 10), and that the natural "longest job first" order does no better. They then give a heuristic, H, that uses Johnson's two-machine algorithm as a subroutine and has the better worst-case ratio (Lemma 11). This mission formalizes that bound.
Setting
A flow shop has processors and jobs. Job consists of tasks; task runs on processor and needs processing time (zero is allowed). A non-preemptive schedule gives every task a start time , and the task occupies during . It is feasible when all start times are nonnegative, when task of a job starts only after task of that job has completed (), and when no processor runs two tasks of positive length at the same time. Its finish time is the latest completion time (and if there is no task). An optimal finish time (OFT) schedule is a feasible schedule of least finish time.
Heuristic H (p. 48) divides the processors into groups: group consists of and , and when is odd the last group is alone. The flow shop on group has the same jobs, with task times only. For each group an OFT schedule of is computed (by Johnson's algorithm), with finish time . The schedule generated by H runs these schedules one after another: every task of group starts at its time in plus the offset .
Formalization targets
Goal: Lemma 11 (p. 49)
For every flow shop with processors and jobs, every choice of OFT schedules of the group flow shops, the schedule generated by H, and every feasible non-preemptive schedule of the flow shop (in particular an OFT schedule ),
The paper writes this as .
Milestones
- Every group flow shop has an OFT schedule (p. 48; the paper obtains it with Johnson's algorithm).
- The concatenation of feasible group schedules is a feasible schedule of the -processor flow shop (p. 48).
- (proof of Lemma 11, p. 49).
- (proof of Lemma 11, p. 49).
Significance
The result gives a polynomial-time heuristic, running in time , whose finish time is within a factor of the optimum on every instance, half the factor that every busy schedule already achieves. The paper's Example 4 (p. 49) shows that for the factor is approached, so the analysis cannot be improved in general.
Formalizing it produces a reusable, machine-checked model of the -processor flow shop with non-preemptive schedules, its restriction to blocks of consecutive processors, and the concatenation of schedules of disjoint blocks. Lemma 11 has a short paper proof; to our knowledge it has no machine-checked proof. The model's careful treatment of zero task times, of odd , and of the restriction of a schedule to a processor group is itself part of the value: these are the points at which an informal argument is silent.
Difficulty
The arithmetic of the bound is short; the content lies in two structural facts about a precise model: that the concatenated object is a feasible schedule of the whole flow shop, including across the boundary between consecutive groups and for a final group of a single processor, and that the optimum of the whole flow shop is at least the optimum of each group flow shop, whose first processor has no predecessor. Informal arguments are silent on exactly these points. A naive formalization that leaves the offsets free, or that does not require the to be optimal, makes the statement false; one that lets be any schedule with the right restrictions makes it witnessed by itself.
The existence of OFT schedules for the group flow shops (milestone 1) is a separate matter: the paper takes it from Johnson's algorithm, and proving it requires an optimality argument for two-machine flow shops (or a compactness argument over finitely many processing orders).
Formalization scope
- Representation. Processors are
Fin mand jobsFin n, both 0-based; times are real numbers. A flow shop is a matrixt : Fin m → Fin n → ℝwitht ≥ 0. A schedule is a matrix of start times. Group (0-based,g : Fin ((m + 1) / 2)) contains the processors and that exist,min 2 (m - 2g)of them. - Finish time. A fold of
maxwith baseline over all tasks; it is for or . The maximum of the group finish times is also a fold ofmaxwith baseline . No supremum over an unbounded or empty set is taken. - Zero task times. A zero-length task occupies no processor time (it is exempt from the non-overlap condition) but still respects the job's task order and counts in the finish time when it is placed late; optimal schedules are unaffected.
- The optimum. "OFT schedule " is replaced by a universally quantified feasible schedule , which is stronger and needs no existence assumption for . Optimality of is the predicate "feasible, and finish time at most that of every feasible schedule of the same group flow shop".
- Constants. is
(m + 1) / 2in , cast to ; the two agree for every . The ratio is multiplied out, so a zero optimum does not divide by zero. - Not formalized. Johnson's algorithm and the running times and . The goal quantifies over every family of optimal group schedules, which includes the one Johnson's algorithm computes; the paper's proof uses only optimality. The preemptive comparison on p. 50 and the tightness examples are outside the mission.
- Trivialization ruled out. The schedule is a function of the with the fixed offsets , and each must be optimal for its group flow shop; neither the offsets nor are free.
- Infrastructure. Elementary facts about
Finset.fold maxand sums overFin; nothing beyond Mathlib. Contributions proving milestone 1 by formalizing Johnson's rule for this model are welcome and reusable.
Selected references
- T. Gonzalez, S. Sahni, Flowshop and Jobshop Schedules: Complexity and Approximation, Operations Research 26(1), 36–52, 1978. https://doi.org/10.1287/opre.26.1.36
- S. M. Johnson, Optimal two- and three-stage production schedules with setup times included, Naval Research Logistics Quarterly 1(1), 61–68, 1954. https://doi.org/10.1002/nav.3800010110
- M. R. Garey, D. S. Johnson, R. Sethi, The Complexity of Flowshop and Jobshop Scheduling, Mathematics of Operations Research 1(2), 117–129, 1976. https://doi.org/10.1287/moor.1.2.117