Theorem 1: the three-machine flow shop FS, with at most two nonzero tasks per job, has a schedule of finish time , preemptive or not, iff has a partition
ProvedFlowJobShop.PartitionFlow.theorem_1Let be a multiset of nonnegative integers, , and FS the flow shop with processors and jobs built from in the proof of Lemma 1. Then
- every job of FS has at most two nonzero tasks;
- FS has a preemptive schedule with finish time if and only if has a partition;
- FS has a non-preemptive schedule with finish time if and only if has a partition.
In symbols, with the finish time,
The paper states Theorem 1 as "FOFT with and no job having more than two nonzero tasks is NP-complete", proved by Lemma 1 (Partition reduces to preemptive FOFT), Lemma 2 (preemptive FOFT is in NP) and the remark that the same proof covers non-preemptive FOFT (Corollary 1). The formal statement is the mathematical content of the hardness half: the restriction to three processors and two nonzero tasks per job, and the equivalence for the constructed instance in both scheduling models. This makes the three-machine flow shop with two nonzero tasks per job the simplest flow-shop finish-time problem known to be NP-complete.
Formalization Note "NP-complete", polynomial-time reducibility and membership in NP (Lemma 2) are not formalized. is fixed by the type of FS.
import Mathlib import Definitions.Def_FlowJobShop_PartitionFlow_FlowShop import Definitions.Def_FlowJobShop_PartitionFlow_Partition import Definitions.Def_FlowJobShop_PartitionFlow_Instance open FlowJobShop.PartitionFlow.FlowShop
namespace FlowJobShop.PartitionFlow
/-- Theorem 1 (Gonzalez–Sahni 1978, p. 38), in the form its proof establishes: for every
PARTITION instance `S = {a_1, …, a_n}`, the three-processor flow shop FS built from it has at
most two nonzero tasks per job, and it has a preemptive schedule with finish time `≤ 2T` iff
`S` has a partition, and a non-preemptive schedule with finish time `≤ 2T` iff `S` has a
partition. -/
theorem theorem_1 {n : ℕ} (a : Fin n → ℕ) :
(FS a).AtMostTwoNonzeroTasks ∧
((∃ S : PreemptiveSchedule (FS a), S.finishTime ≤ 2 * T a) ↔ HasPartition a) ∧
((∃ S : PreemptiveSchedule (FS a), S.IsNonPreemptive ∧ S.finishTime ≤ 2 * T a) ↔
HasPartition a) := by sorry
end FlowJobShop.PartitionFlow
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.