Flowshop and Jobshop Schedules: Complexity and Approximation 2: The 3-Partition Flow Shop on Three Machines Has a Preemptive Schedule of Finish Time 2tB Iff a 3-Partition ExistsResearch Paper
Motivation
A flow shop is the simplest multi-stage production model: every job passes through the same machines in the same order, and the question is how to sequence the work so that everything is finished as early as possible. Gonzalez and Sahni's 1978 paper in Operations Research settled the computational complexity of the preemptive version of this problem, in which a task may be interrupted and resumed later on the same machine. For two machines the optimal finish time is computed by Johnson's rule, and preemption does not help. The paper shows that with three machines the preemptive problem is already NP-complete, and its second result, Theorem 2, strengthens this to NP-completeness in the strong sense: the problem stays hard even when the task times are written in unary.
Strong NP-completeness matters because it rules out a pseudo-polynomial algorithm, one whose running time is polynomial in the sum of the task lengths. The preemptive three-machine flow shop ( in later notation) is a standard entry in complexity classifications of scheduling problems, and Theorem 2 is the reference for its status. The paper notes that Garey and Johnson obtained a proof independently.
Timeline. Johnson (1954) solved the two-machine flow shop. Garey, Johnson and Sethi (1976) proved the non-preemptive three-machine flow shop NP-complete in the strong sense. Gonzalez and Sahni (1978) treated the preemptive case: Theorem 1 (ordinary NP-completeness via Partition) and Theorem 2 (strong NP-completeness via 3-Partition), the subject of this mission.
Setting
A flow shop has processors and a finite set of jobs. Task of job runs on and takes time ; zero times are allowed. For each job, task can begin only after task has been completed, and schedules start at time .
A preemptive schedule is given, as in the paper's footnote on p. 40, by finitely many pieces per task: the task is processed on its processor during . Pieces have , pieces on the same processor do not overlap, the pieces of a task have total length , and a piece of task starts only after every piece of every earlier task of the same job has ended. A task has no preemption when it is processed in at most one piece; a non-preemptive schedule has no preemption anywhere. The completion time of job is , the end of its last piece, and the finish time is .
3-Partition. An instance , , consists of a positive integer and nonnegative integers with and . It has a 3-partition if splits into disjoint sets , each of three elements with .
The instance FS. From the proof of Lemma 4 builds a three-processor flow shop with jobs:
- jobs : times on ;
- job : ;
- jobs , : ;
- job : ;
- job : ;
- job : .
Each processor carries total work exactly , and the threshold is .
Formalization targets
Goal: Theorem 2, as Lemma 4's equivalence
For every 3-Partition instance with ,
and every task time of satisfies . The second clause records that the instance's numbers are bounded by those of , the reduction's contribution to "the problem size being measured as the sum of the length of the tasks".
Milestones
- Lemma 3 (p. 40). For a flow shop with processors, every preemptive schedule can be replaced by a schedule with no preemptions on and on and .
- Lemma 4(a) (p. 41). If has a 3-partition, has a non-preemptive schedule with .
- First step of Lemma 4(b) (pp. 41–42). In every preemptive schedule of with , the jobs among whose task is completed by time have .
- Lemma 4(b) (pp. 41–42). If has no 3-partition, every preemptive schedule of has .
Significance
The result. Theorem 2 places the preemptive three-machine flow shop among the strongly NP-hard scheduling problems, so no algorithm polynomial in the number of jobs and the total processing time exists unless P = NP. It also shows that allowing preemption, which makes several single-stage problems (such as ) easy, does not help for three-stage flow shops. Lemma 3, that preemptions on the first and last machines can be removed without changing the finish time, holds for any number of machines and is a reusable structural fact about flow-shop schedules.
Formalizing it. The result is proved on paper, and its proof of the "only if" direction is an informal busy-processor argument repeated window by window. As far as is known, no part of it has a machine-checked proof. A formal development has to make the interval accounting rigorous: why each processor is busy throughout , why exactly units of element jobs end on by , and how the argument restarts on . Lemma 3 needs an exchange argument on piece representations. Both are new for the platform.
Difficulty
The direction "3-partition schedule" is a direct construction. The hard direction is the converse. Preemption lets any task be split across many intervals, so the usual non-preemptive arguments, which reason about the order in which whole tasks run, do not apply directly. The paper's argument that the window must contain exactly three element jobs of total on depends on every processor being continuously busy, and turning "otherwise there is idle time" into a precise statement requires a careful account of which jobs are available to each processor at each moment. The induction on windows is then not a literal restriction of the schedule to a smaller instance, because pieces may cross the boundary at .
Formalization scope
- Times are real numbers; the 3-Partition data are natural numbers cast to . Processors are
Fin mwith0; in , are0, 1, 2. - The 3-Partition instance is the published
ResourceScheduling.Chain.ThreePartition(0-based indices,tparts,b,Valid,HasSolution), whose definition is the paper's p. 37 problem. - Preemptive schedules are finite sets of pieces per task; precedence is required between every pair of tasks of a job, so a zero task occupies no time and does not break the job's order. Finish time is a maximum over jobs with baseline , never an unattained supremum.
- "No preemptions on " means at most one piece per task on .
- Not formalized: "NP-complete", the reduction symbol , "the problem size being measured as the sum of the length of the tasks", and Lemma 2 (membership in NP). The goal states the equivalence Lemma 4 proves for the constructed instance, plus the bound on its task times.
- Added hypothesis: . For the paper's job indices and coincide with conflicting times, so the construction is undefined there.
- The first step of Lemma 4(b) is read as: the sum of over element jobs whose task has completed by time equals .
- A trivializing formalization is ruled out: the schedules quantified over are all preemptive schedules of the specific instance , the threshold is explicit, and the validity conditions are kept, so the schedule side cannot match the weaker "partition into groups of sum ".
Contributions welcome: the interval-accounting lemmas (busy processors, work available before a time), Lemma 3's exchange argument, and the schedule of Figure 2.
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
- 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
- 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, "Strong" NP-Completeness Results: Motivation, Examples, and Implications, Journal of the ACM 25(3):499–508, 1978. https://doi.org/10.1145/322077.322090