Optimal Two- and Three-Stage Production Schedules with Setup Times Included 2: Johnson's Rule for Three MachinesResearch Paper
Motivation
Johnson's 1954 paper in Naval Research Logistics Quarterly is the starting point of machine scheduling theory. Its first section solves the two-machine flow shop: items must pass through machine 1 and then machine 2, and an explicit ordering rule minimizes the total elapsed time. Its second section treats three machines. There the problem "loses some of the nice structure of the two-stage case" (p. 65), and the general three-machine problem was later shown to be strongly NP-hard (Garey, Johnson and Sethi, 1976). Johnson nevertheless identifies a restricted case, in which the middle machine is dominated by the first (or the last), where the two-machine rule still gives an optimal schedule. That case, and the structural facts behind it, are the content of this mission.
The three-machine results are still the reference point for polynomially solvable flow shops and for lower bounds in branch-and-bound methods for the general problem.
Timeline.
- 1954: Johnson proves the two-machine rule (Theorem 1) and, for three machines, the reduction to a common ordering (Lemma 3), a closed form for the elapsed time, and optimality of the rule on , when (Theorem 2), with the mirror case asserted.
- 1976: Garey, Johnson and Sethi show that minimizing makespan in a three-machine flow shop is strongly NP-hard in general, so some restriction of Theorem 2's kind is unavoidable for an exact ordering rule.
Setting
There are items and three machines. Item needs processing time on machine 1, on machine 2 and on machine 3, in that order. Each machine handles at most one item at a time, and processing is not interrupted.
A schedule assigns each item start times . It is feasible when all start times are at least on machine 1, the processing intervals of distinct items on the same machine do not overlap, and , . The three machines may process the items in different orders. The total elapsed time (makespan) is .
An ordering lists the items, being the item in position . Its as-soon-as-possible schedule processes the items in the order on every machine and starts each item on each machine as early as the rules allow. For an ordering, with positions , Johnson defines
the sums running over the items in the first (resp. ) positions.
Johnson's three-stage rule says that item definitely precedes item when
and calls them indifferent under equality. An ordering is consistent with (IV) when no item placed later is definitely preferred to an item placed earlier.
Formalization targets
Goal: Theorem 2 (p. 67)
If every is at least every , then an ordering consistent with (IV) exists, and for every such ordering the as-soon-as-possible schedule of is feasible and satisfies
Milestones
- Lemma 3 (p. 65). Every feasible schedule is matched or beaten by the as-soon-as-possible schedule of some single ordering.
- Closed form (p. 66). For every ordering, the total idle time of machine 3 is , so that
the "maximum walk" of p. 68. 3. Special case (p. 67). If then , so the makespan is . 4. (III) (IV) (p. 67). Interchanging the items in positions changes and only at , and the interchange is strictly worse for the diagonal terms exactly when (IV) holds. 5. Lemma 4 (p. 67). Relation (IV) is transitive, except when the middle item is indifferent to both others. 6. Mirror case (p. 68). The conclusion of Theorem 2 also holds when every is at least every .
Significance
The result. Theorem 2 gives an exact method for a class of three-machine flow shops, in a problem that is strongly NP-hard in general. Lemma 3 says that, for three machines, permutation schedules are dominant; Johnson's example on p. 65 shows this fails for four machines. The closed form of milestone 2 expresses the makespan of any ordering as a longest path in a grid, the device behind most later flow-shop lower bounds.
Formalizing it. All results are proved on paper, some tersely: Lemma 3's proof is two lines and cites the wrong lemma, Lemma 4 is proved by reference to Lemma 2, and the mirror case is asserted without proof. A search of Mathlib and of the platform catalog found no machine-checked proof of any of them. The mission produces a checked account of the three-machine flow shop, including the comparison against all feasible schedules rather than only permutation schedules, and pins down the exact form of the hypotheses (see below).
Difficulty
The interchange argument of the two-machine case does not transfer directly. For a general ordering the makespan involves , and interchanging adjacent items changes terms that depend on everything placed earlier; the page notes that "the decision is not independent of what precedes the interchanged elements". The hypothesis is what makes nondecreasing along the ordering, collapsing the double maximum to the diagonal. A second obstacle is that (IV) is not a total preorder: ties break transitivity, so passing from "no adjacent pair can be improved" to "optimal" needs the all-pairs consistency and the tie exception of Lemma 4. Finally, Lemma 3 is a statement about arbitrary start-time schedules, so the reduction to orderings must handle machines whose orders differ.
Formalization scope
Items are Fin n; processing times are real-valued functions A B C : Fin n → ℝ, assumed positive in each theorem that is about schedules (the paper's standing assumption, p. 61). A schedule is three start-time functions; feasibility is spelled out as above with non-overlap written as a disjunction of inequalities. The makespan is the maximum of the machine-3 completion times together with , so the empty instance has makespan . An ordering is an Equiv.Perm (Fin n) with σ k the item in position k; positions are 0-based, so the Lean K u, H v are the paper's , . Statements with maxima over positions assume .
Hypotheses made explicit or corrected:
- is read globally, for all , as in the section heading. The pointwise reading makes Theorem 2 false (an instance with five items is recorded in the Formalization Note of the goal).
- Consistency with (IV) is required for all pairs of positions, not only adjacent ones.
- Lemma 4 carries Lemma 2's exception for an item indifferent to both others; without it the statement is false.
- Lemma 3's proof cites "Lemma 2" where Lemma 1 is meant.
- The interchange equivalence (milestone 4) is stated for arbitrary reals, which is stronger than the page needs.
Optimality in the goal is against every feasible schedule. A formalization that compares only orderings with each other, or that defines the objective as the closed form , would drop Lemma 3's content and is ruled out: the makespan is the latest completion time of a start-time schedule. The existence clause keeps the optimality clause from being vacuous.
A complete development needs finite sums over initial segments of Fin n, Finset.sup', and permutation manipulations (adjacent transpositions, bubble-sort arguments). The feasibility model and the closed form are reusable for other flow-shop results; contributions of general lemmas on adjacent interchanges of permutations are welcome.
Selected references
- 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