Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Collections

Scheduling Theory

Machine, flowshop, jobshop and project scheduling: optimality of classic rules, complexity reductions, and approximation guarantees.

43 open missions

Missions

21–40 of 43
OpenCompletedAll
Complexity TheoryOperations ResearchTheoretical Computer Science·Captain: mikedeng1

Complexity of Machine Scheduling Problems 2: KNAPSACK Reduces to Single-Machine Maximum Lateness, Weighted Number of Late Jobs, and Weighted Completion Time with DeadlinesResearch Paper

Motivation

Deterministic machine scheduling was one of the first application areas of the theory of NP-completeness. After Cook (1971) and Karp (1972) showed that a large family of combinatorial problems are polynomially equivalent, Brucker, Lenstra and Rinnooy Kan set out to locate the boundary between the polynomially solvable and the NP-complete scheduling problems. Their report Complexity of Machine Scheduling Problems (Mathematisch Centrum, Report BW 43/75, 1975; journal version in Annals of Discrete Mathematics 1, 1977) introduced the four-field notation n∣m∣ℓ,λ∣kn|m|\ell,\lambda|kn∣m∣ℓ,λ∣k that, in refined form, is still the standard classification of scheduling problems, and proved NP-completeness of the "easiest" hard problems by explicit reductions.

Single-machine problems with due dates sit right at that boundary. Minimizing the maximum lateness Lmax⁡L_{\max}Lmax​ is solved by Jackson's earliest-due-date rule (1955), and minimizing the number of late jobs by Moore's algorithm (1968). Theorem 4 of the report shows that small changes to these problems — one release date, job weights, or due dates turned into deadlines under a weighted completion-time objective — make them NP-complete, by reduction from KNAPSACK. This mission formalizes four of those reductions, parts (b), (c), (e) and (f) of Theorem 4.

Timeline, as far as this mission is concerned:

  • 1955: Jackson — n∣1∣∣Lmax⁡n|1||L_{\max}n∣1∣∣Lmax​ is solved by sequencing in order of nondecreasing due dates.
  • 1968: Moore — n∣1∣∣∑Ujn|1||\sum U_jn∣1∣∣∑Uj​ (unit weights, no release dates) is solvable in polynomial time.
  • 1972: Karp — KNAPSACK (in the subset-sum form used here) is NP-complete; Karp also notes the reduction to n∣1∣∣∑wjUjn|1||\sum w_jU_jn∣1∣∣∑wj​Uj​, which the report cites for part (e).
  • 1975: Brucker, Lenstra and Rinnooy Kan — Theorem 4: KNAPSACK reduces to ten scheduling problems, including the four single-machine problems of this mission.

Setting

A single-machine instance consists of n≥1n\ge1n≥1 jobs J1,…,JnJ_1,\dots,J_nJ1​,…,Jn​. Job JjJ_jJj​ needs pj1p_{j1}pj1​ units of processing on the machine M1M_1M1​, has a weight wjw_jwj​, a release date rjr_jrj​ and a due date djd_jdj​; all data are nonnegative integers. A schedule assigns to each job a starting time Bj≥rjB_j\ge r_jBj​≥rj​ such that the occupied intervals [Bj,Bj+pj1)[B_j,B_j+p_{j1})[Bj​,Bj​+pj1​) of distinct jobs are disjoint. Idle time is allowed; a job with pj1=0p_{j1}=0pj1​=0 occupies an empty interval. The completion time is Cj=Bj+pj1C_j=B_j+p_{j1}Cj​=Bj​+pj1​, the lateness is Lj=Cj−djL_j=C_j-d_jLj​=Cj​−dj​ (possibly negative), and UjU_jUj​ is 000 if Cj≤djC_j\le d_jCj​≤dj​ and 111 otherwise. The criteria are

Lmax⁡=max⁡jLj,∑wjCj=∑j=1nwjCj,∑wjUj=∑j=1nwjUj.L_{\max}=\max_j L_j,\qquad \sum w_jC_j=\sum_{j=1}^n w_jC_j,\qquad \sum w_jU_j=\sum_{j=1}^n w_jU_j .Lmax​=jmax​Lj​,∑wj​Cj​=j=1∑n​wj​Cj​,∑wj​Uj​=j=1∑n​wj​Uj​.

The problem class is written in the λ\lambdaλ field: by default every rj=0r_j=0rj​=0; rn≥0r_n\ge0rn​≥0 allows a nonzero release date for the last job JnJ_nJn​ only; wj=1w_j=1wj​=1 fixes unit weights; Lmax⁡≤0L_{\max}\le0Lmax​≤0 admits only schedules that meet every due date. A problem is turned into a yes/no question by asking whether a schedule with value ≤y\le y≤y exists.

KNAPSACK (Theorem 2(b) of the report): given positive integers a1,…,at,ba_1,\dots,a_t,ba1​,…,at​,b, is there a subset S⊆T={1,…,t}S\subseteq T=\{1,\dots,t\}S⊆T={1,…,t} with ∑j∈Saj=b\sum_{j\in S}a_j=b∑j∈S​aj​=b? Write A=∑j∈TajA=\sum_{j\in T}a_jA=∑j∈T​aj​.

A problem P′P'P′ is reducible to PPP, P′∝PP'\propto PP′∝P, if every instance of P′P'P′ can be transformed in polynomial time into an instance of PPP whose answer is the same.

Formalization targets

Goal: Theorem 4(b), (c), (e), (f)

KNAPSACK∝n∣1∣Lmax⁡≤0∣∑wjCj,KNAPSACK∝n∣1∣rn≥0∣Lmax⁡,\mathsf{KNAPSACK}\propto n|1|L_{\max}\le0|\textstyle\sum w_jC_j,\quad \mathsf{KNAPSACK}\propto n|1|r_n\ge0|L_{\max},KNAPSACK∝n∣1∣Lmax​≤0∣∑wj​Cj​,KNAPSACK∝n∣1∣rn​≥0∣Lmax​, KNAPSACK∝n∣1∣∣∑wjUj,KNAPSACK∝n∣1∣rn≥0,wj=1∣∑wjUj,\mathsf{KNAPSACK}\propto n|1||\textstyle\sum w_jU_j,\quad \mathsf{KNAPSACK}\propto n|1|r_n\ge0,w_j=1|\textstyle\sum w_jU_j ,KNAPSACK∝n∣1∣∣∑wj​Uj​,KNAPSACK∝n∣1∣rn​≥0,wj​=1∣∑wj​Uj​,

as polynomial-time many-one reductions between languages of binary strings.

Milestones: the four yes-instance equivalences

For positive a1,…,at,ba_1,\dots,a_t,ba1​,…,at​,b with 0<b<A0<b<A0<b<A, and the paper's constructions:

  • 4(c): n=t+1n=t+1n=t+1; rj=0r_j=0rj​=0, pj1=ajp_{j1}=a_jpj1​=aj​, dj=A+1d_j=A+1dj​=A+1 for j∈Tj\in Tj∈T; rn=br_n=brn​=b, pn1=1p_{n1}=1pn1​=1, dn=b+1d_n=b+1dn​=b+1. KNAPSACK has a solution iff some schedule has Lmax⁡≤0L_{\max}\le0Lmax​≤0.
  • 4(f): the same instance with unit weights; KNAPSACK has a solution iff some schedule has ∑Uj≤0\sum U_j\le0∑Uj​≤0.
  • 4(e): n=tn=tn=t; pj1=wj=ajp_{j1}=w_j=a_jpj1​=wj​=aj​, dj=bd_j=bdj​=b. KNAPSACK has a solution iff some schedule has ∑wjUj≤A−b\sum w_jU_j\le A-b∑wj​Uj​≤A−b.
  • 4(b): n=t+1n=t+1n=t+1; pj1=wj=ajp_{j1}=w_j=a_jpj1​=wj​=aj​, dj=A+1d_j=A+1dj​=A+1 for j∈Tj\in Tj∈T; pn1=1p_{n1}=1pn1​=1, wn=0w_n=0wn​=0, dn=b+1d_n=b+1dn​=b+1. KNAPSACK has a solution iff some schedule meeting all due dates has
∑wjCj≤y=∑j,k∈T, j≤kajak+A−b.\sum w_jC_j\le y=\sum_{j,k\in T,\ j\le k}a_ja_k+A-b .∑wj​Cj​≤y=j,k∈T, j≤k∑​aj​ak​+A−b.

Significance

The result. Combined with the NP-completeness of KNAPSACK, the four reductions show that the four problems are NP-hard (in the ordinary sense; they admit pseudo-polynomial algorithms). Part (c) shows that Jackson's rule cannot be extended to a single nonzero release date unless P = NP; part (f) does the same for Moore's algorithm; part (e) explains why weights are essential in the late-jobs problem; part (b) shows that deadlines turn the weighted completion-time problem, solved by Smith's ratio rule without them, into a hard one. These are entries of the complexity tables that every later scheduling classification builds on.

Formalizing it. The reductions are classical and proved on paper, in a few lines each: for (c), (e) and (f) the report gives only the construction and a figure. None of them has a machine-checked proof. A complete formalization supplies the explicit equivalence over all feasible schedules (including schedules with idle time and arbitrary processing order), the handling of the inputs the proof sets aside by "we may assume that 0<b<A0<b<A0<b<A", and the polynomial-time computability of the constructions in a Turing-machine model.

Difficulty

Each equivalence has an easy direction: a subset SSS with sum bbb gives the schedule "jobs of SSS, then JnJ_nJn​, then the rest" (Figures 4 and 7 of the report). The other direction must rule out every feasible schedule, not only the idle-free ones in the displayed order. The report gives no argument for this direction in (c), (e) and (f), and for (b) only a computation for idle-free schedules of one shape. The equivalences are false outside 0<b<A0<b<A0<b<A in some cases (for (c), any b>Ab>Ab>A makes every schedule on time), so the goal's reduction must treat those inputs separately.

The heavier part is polynomial-time computability: the reduction must be a function on strings, computed by a one-tape Turing machine within a polynomial number of steps, that parses a binary-coded KNAPSACK instance, computes AAA and the threshold (for (b), a sum of O(t2)O(t^2)O(t2) products), and writes the coded scheduling instance — and maps malformed strings outside the target language.

Formalization scope

  • Model. Jobs are Fin n (0-based; JnJ_nJn​ is the last index), with n>0n>0n>0 in each target language. Starting times are natural numbers: Section 3 computes them from processing orders on integer data, and since all criteria here are regular and release dates survive left shifts, real starting times give the same yes-instances. Feasibility requires disjoint occupied intervals, including empty intervals when pj1=0p_{j1}=0pj1​=0. Idle time is allowed. Lateness is an integer.
  • Problem classes are binding. rn≥0r_n\ge0rn​≥0 means at least one job and release date 000 for every job except the last; Lmax⁡≤0L_{\max}\le0Lmax​≤0 in (b) is a constraint on schedules, not the criterion. Instances outside the class are not in the target language.
  • Thresholds. y∈Ny\in\mathbb Ny∈N in all four languages; for Lmax⁡L_{\max}Lmax​ this restricts to nonnegative thresholds, enough for the paper's y=0y=0y=0. "Lmax⁡≤yL_{\max}\le yLmax​≤y" is stated as "Lj≤yL_j\le yLj​≤y for all jjj".
  • Codes. An instance with threshold yyy is the list nnn, then pj1,wj,rj,djp_{j1},w_j,r_j,d_jpj1​,wj​,rj​,dj​ per job, then yyy, each number in binary.
  • Reducibility. "Reducible" (Section 2) is read as Karp reducibility, CookPvsNP.PolyReducible from the published definition CookPvsNP_defs. The alphabet and binary number codes are those of the published definition ProjSchedTW.Complexity.Encoding (Neumann, Schwindt and Zimmermann); its SUBSET SUM language is not reused because it admits zero sizes, while the paper's KNAPSACK is over positive integers.
  • Explicit readings of loose phrases. "We may assume that 0<b<A0<b<A0<b<A" becomes a hypothesis of each milestone and an obligation on the goal's reduction. "Cf. reduction (i) and Figure 4", "Cf. Karp [19] and Figure 7" and "The equivalence follows immediately" become the stated equivalences over all feasible schedules. Reduction (c) does not specify weights; the shared construction uses unit weights.
  • Not trivializable. The equivalences are stated for the paper's explicit constructions, not for an existentially chosen instance; the target languages enforce the problem class; and the goal demands polynomial-time computability, not only the equivalence.
  • Infrastructure. A Turing-machine library for arithmetic on binary codes (parsing, addition, multiplication, comparison) is reusable across all seven missions of this series and across every reduction posed in the same framework. Contributions of such general lemmas are welcome.

Parts (a), (d) and (g)–(j) of Theorem 4 are formalized in other missions of this series.

Selected references

  • P. Brucker, J. K. Lenstra, A. H. G. Rinnooy Kan, Complexity of Machine Scheduling Problems, Mathematisch Centrum, Report BW 43/75, Amsterdam, 1975; journal version: J. K. Lenstra, A. H. G. Rinnooy Kan, P. Brucker, Annals of Discrete Mathematics 1 (1977) 343–362. https://doi.org/10.1016/S0167-5060(08)70743-X
  • R. M. Karp, Reducibility among combinatorial problems, in: Complexity of Computer Computations, Plenum, 1972, 85–103. https://doi.org/10.1007/978-1-4684-2001-2_9
  • S. A. Cook, The complexity of theorem-proving procedures, Proc. 3rd ACM STOC, 1971, 151–158. https://doi.org/10.1145/800157.805047
  • J. M. Moore, An n job, one machine sequencing algorithm for minimizing the number of late jobs, Management Science 15 (1968) 102–109. https://doi.org/10.1287/mnsc.15.1.102
  • J. R. Jackson, Scheduling a production line to minimize maximum tardiness, Research Report 43, Management Science Research Project, UCLA, 1955.
11 thms2 active usersReviewed
Complexity TheoryOperations ResearchTheoretical Computer Science·Captain: mikedeng1

Complexity of Machine Scheduling Problems 3: KNAPSACK Reduces to Single-Machine Total Weighted TardinessResearch Paper

Motivation

Minimizing total weighted tardiness on a single machine, written n∣1∣∣∑wjTjn|1||\sum w_jT_jn∣1∣∣∑wj​Tj​, is one of the basic problems of deterministic scheduling. A job that finishes after its due date is penalized in proportion to its lateness and its weight. Practitioners use this criterion to model penalty clauses and customer priority. In the theory it was a reference problem for branch-and-bound methods and dominance rules throughout the 1960s and 1970s.

Close relatives are easy: with equal weights and a common due date, shortest-processing-time order is optimal. Whether the weighted problem admits a polynomial algorithm was open until the report of Brucker, Lenstra and Rinnooy Kan in 1975. Their Theorem 4(d) shows that KNAPSACK reduces to it, so the problem is NP-hard. The unweighted case n∣1∣∣∑Tjn|1||\sum T_jn∣1∣∣∑Tj​ is listed there as open (Section 5) and was settled only later by Du and Leung (1990).

Timeline:

  • 1972: Karp proves KNAPSACK NP-complete (Karp 1972).
  • 1975: Brucker, Lenstra and Rinnooy Kan, Mathematisch Centrum Report BW 43/75, Theorem 4(d), reduce KNAPSACK to n∣1∣∣∑wjTjn|1||\sum w_jT_jn∣1∣∣∑wj​Tj​ (journal version: Annals of Discrete Mathematics 1, 1977).
  • 1977: Lawler gives a pseudopolynomial algorithm for n∣1∣∣∑Tjn|1||\sum T_jn∣1∣∣∑Tj​ and shows that n∣1∣∣∑wjTjn|1||\sum w_jT_jn∣1∣∣∑wj​Tj​ is strongly NP-hard (Lawler 1977).
  • 1990: Du and Leung prove n∣1∣∣∑Tjn|1||\sum T_jn∣1∣∣∑Tj​ NP-hard (Du & Leung 1990).

Setting

A KNAPSACK instance consists of positive integers a1,…,ata_1,\dots,a_ta1​,…,at​ and bbb. It is a yes-instance if some subset S⊆T={1,…,t}S\subseteq T=\{1,\dots,t\}S⊆T={1,…,t} satisfies ∑j∈Saj=b\sum_{j\in S}a_j=b∑j∈S​aj​=b. Write A=∑j∈TajA=\sum_{j\in T}a_jA=∑j∈T​aj​ and a∗=max⁡j∈Taja_*=\max_{j\in T}a_ja∗​=maxj∈T​aj​.

An instance of n∣1∣∣∑wjTjn|1||\sum w_jT_jn∣1∣∣∑wj​Tj​ consists of nnn jobs. Job jjj has a processing time pjp_jpj​, a weight wjw_jwj​ and a due date djd_jdj​, all nonnegative integers, and every job is available at time 000. A schedule gives each job a start time Bj∈NB_j\in\mathbb NBj​∈N, and no two jobs may overlap on the machine. Job jjj completes at Cj=Bj+pjC_j=B_j+p_jCj​=Bj​+pj​ and has tardiness Tj=max⁡{0,Cj−dj}T_j=\max\{0,C_j-d_j\}Tj​=max{0,Cj​−dj​}. The instance with threshold yyy is a yes-instance if some schedule satisfies ∑jwjTj≤y\sum_jw_jT_j\le y∑j​wj​Tj​≤y. A processing order π=(π(1),…,π(n))\pi=(\pi(1),\dots,\pi(n))π=(π(1),…,π(n)) determines the schedule without idle time, in which Cπ(k)=∑i≤kpπ(i)C_{\pi(k)}=\sum_{i\le k}p_{\pi(i)}Cπ(k)​=∑i≤k​pπ(i)​.

Reducibility (Section 2 of the paper) is polynomial-time many-one reducibility between the recognition versions. A polynomial-time Turing machine must map codes of KNAPSACK instances to codes of scheduling instances so that yes-instances map exactly to yes-instances.

The paper's construction has n=t+t′n=t+t'n=t+t′ jobs: for j∈Tj\in Tj∈T, pj=τ+ajp_j=\tau+a_jpj​=τ+aj​, wj=τ+aj+1w_j=\tau+a_j+1wj​=τ+aj​+1, dj=tτ+bd_j=t\tau+bdj​=tτ+b; for each of the t′t't′ dummy jobs, pj=τp_j=\taupj​=τ, wj=τ+1w_j=\tau+1wj​=τ+1, dj=tτ+bd_j=t\tau+bdj​=tτ+b. The threshold is y=12t′(t′+1)τ(τ+1)+(t′+1)τ(A−b)+t′y=\tfrac12t'(t'+1)\tau(\tau+1)+(t'+1)\tau(A-b)+t'y=21​t′(t′+1)τ(τ+1)+(t′+1)τ(A−b)+t′, with t′=12(t+1)(A−b)+12t(t+1)a∗2t'=\tfrac12(t+1)(A-b)+\tfrac12t(t+1)a_*^2t′=21​(t+1)(A−b)+21​t(t+1)a∗2​ and τ>2t′+A\tau>2t'+Aτ>2t′+A. The proof is phrased in terms of cπ=Cπ(t)−(tτ+b)c_\pi=C_{\pi(t)}-(t\tau+b)cπ​=Cπ(t)​−(tτ+b), the amount by which the ttt-th job of the order misses the common due date.

Formalization targets

Goal: Theorem 4(d)

KNAPSACK  ∝  n∣1∣∣∑wjTj,\text{KNAPSACK}\;\propto\;n|1||\textstyle\sum w_jT_j,KNAPSACK∝n∣1∣∣∑wj​Tj​,

stated as CookPvsNP.PolyReducible SchedComplexity.OneMachine.knapsackLang wtLangMult. The scheduling side uses the multiplicity encoding of the paper's Remark (p. 23), in which a class of identical jobs is written once together with its cardinality.

The equivalence and its claims

Each milestone is a statement of the paper's proof (pp. 20–21) about the construction above, for every admissible τ\tauτ:

  • removal of idle time: every schedule is matched or improved by the schedule without idle time of some processing order;
  • KNAPSACK has a solution iff some order has Cπ(t)=tτ+bC_{\pi(t)}=t\tau+bCπ(t)​=tτ+b; moreover −b≤cπ≤A−b-b\le c_\pi\le A-b−b≤cπ​≤A−b;
  • identities and bounds (2)–(7) for the tail sums ∑j>tvπ(j)(Cπ(j)−Cπ(t))\sum_{j>t}v_{\pi(j)}(C_{\pi(j)}-C_{\pi(t)})∑j>t​vπ(j)​(Cπ(j)​−Cπ(t)​);
  • claims (A) cπ=0⇒∃π′c_\pi=0\Rightarrow\exists\pi'cπ​=0⇒∃π′ with cπ′=0c_{\pi'}=0cπ′​=0 and ∑wjTj≤y\sum w_jT_j\le y∑wj​Tj​≤y; (B) cπ>0⇒∑wjTj>yc_\pi>0\Rightarrow\sum w_jT_j>ycπ​>0⇒∑wj​Tj​>y; (C) cπ<0⇒∑wjTj>yc_\pi<0\Rightarrow\sum w_jT_j>ycπ​<0⇒∑wj​Tj​>y;
  • the equivalence: KNAPSACK has a solution iff the constructed instance has a schedule with ∑wjTj≤y\sum w_jT_j\le y∑wj​Tj​≤y.

Significance

The theorem places n∣1∣∣∑wjTjn|1||\sum w_jT_jn∣1∣∣∑wj​Tj​ among the NP-hard problems, so (unless P = NP) the research on it has to aim at enumerative methods, pseudopolynomial algorithms or approximation, not at an exact polynomial algorithm. Together with the companion reductions of Theorem 4, it drew the boundary between easy and hard single-machine problems that the later classification of Lageweg, Lawler, Lenstra and Rinnooy Kan made systematic.

The result is proved in the paper, and Lawler's later strong NP-hardness proof supersedes it. No machine-checked proof is known to exist. A formal proof adds three things. It makes the paper's "it is easily seen" steps and the encoding argument of the Remark explicit. It produces a reusable single-machine tardiness model with processing orders. It also fixes a gap in the printed construction: the printed t′t't′ need not be an integer.

Difficulty

The equivalence is not a local exchange argument. The threshold yyy must separate orders with cπ=0c_\pi=0cπ​=0 from all others, and the objective is a quadratic function of the order. The orders with cπ=0c_\pi=0cπ​=0 can still differ in ∑wjTj\sum w_jT_j∑wj​Tj​ by the cross terms ∑aπ(j)aπ(k)\sum a_{\pi(j)}a_{\pi(k)}∑aπ(j)​aπ(k)​ and by how the late jobs are arranged. The construction therefore needs a slack t′t't′ that absorbs these terms, and a scale τ\tauτ large enough that a nonzero cπc_\picπ​ always costs more than the slack. Keeping exact track of every constant, including t′t't′ and yyy, is where errors creep in.

Polynomiality is a second, separate difficulty. The construction has Θ(t2a∗2+tA)\Theta(t^2a_*^2+tA)Θ(t2a∗2​+tA) jobs, which is exponential in the binary length of the KNAPSACK input. The goal holds only for the encoding of the Remark, and a solver must also produce an explicit polynomial-time Turing machine.

Formalization scope

  • Jobs of the order-based statements are Fin n, numbered from 000; a processing order is Equiv.Perm (Fin n) with π i the paper's π(i+1)\pi(i+1)π(i+1). posCompletion p π k is the paper's Cπ(k)C_{\pi(k)}Cπ(k)​ for the 1-based position kkk.
  • Start times are in N\mathbb NN. Every criterion is regular and the paper determines schedules by processing orders, so integer start times lose nothing. Tardiness and ∑wjTj\sum w_jT_j∑wj​Tj​ are computed in Z\mathbb ZZ; the bounds with halves are stated over R\mathbb RR exactly as printed.
  • Corrected gap: the printed t′=12(t+1)(A−b)+12t(t+1)a∗2t'=\tfrac12(t+1)(A-b)+\tfrac12t(t+1)a_*^2t′=21​(t+1)(A−b)+21​t(t+1)a∗2​ is a half-integer when (t+1)(A−b)(t+1)(A-b)(t+1)(A−b) is odd. The formalization uses its ceiling and computes yyy from the same t′t't′.
  • τ\tauτ is quantified over all integers with τ>2t′+A\tau>2t'+Aτ>2t′+A; the positivity of the aja_jaj​ and 0<b<A0<b<A0<b<A are hypotheses, as the paper assumes them.
  • Explicit readings of the paper's loose phrases: "we may assume [no idle time]" becomes a theorem that the schedule without idle time of some order is at least as good as any schedule; "easily seen" becomes the equivalence with Cπ(t)=tτ+bC_{\pi(t)}=t\tau+bCπ(t)​=tτ+b; "for some π\piπ" in (5) and (7) becomes a reordering that keeps the first ttt positions, and so keeps cπc_\picπ​; "we may assume 0<b<A0<b<A0<b<A" is a hypothesis of the milestones but not of the goal, whose reduction must handle every KNAPSACK instance.
  • Reducibility is CookPvsNP.PolyReducible from the published CookPvsNP_defs. Codes use the alphabet BSym and the binary numerals encNats of the published ProjSchedTW.Complexity.Encoding (Neumann, Schwindt and Zimmermann's encoding). KNAPSACK is restricted to positive integers, so that encoding's subsetSumLang is not reused.
  • The goal must not be weakened to the bare equivalence: polynomial-time computability of the reduction is part of the statement. The one-copy-per-job encoding of the target is ruled out: the paper does not claim polynomiality for it, and the goal uses the multiplicity encoding instead.
  • Welcome contributions: proofs of the claims, a reusable lemma that idle time can be removed for regular criteria, and Turing-machine constructions for arithmetic on binary numerals, which the sibling missions of this series also need.

Selected references

  • P. Brucker, J. K. Lenstra, A. H. G. Rinnooy Kan, Complexity of Machine Scheduling Problems, Mathematisch Centrum Report BW 43/75, Amsterdam, 1975; Annals of Discrete Mathematics 1 (1977) 343–362. https://ir.cwi.nl/pub/9725 , https://doi.org/10.1016/S0167-5060(08)70743-X
  • R. M. Karp, Reducibility among combinatorial problems, in Complexity of Computer Computations, Plenum, 1972, 85–103. https://doi.org/10.1007/978-1-4684-2001-2_9
  • E. L. Lawler, A "pseudopolynomial" algorithm for sequencing jobs to minimize total tardiness, Annals of Discrete Mathematics 1 (1977) 331–342. https://doi.org/10.1016/S0167-5060(08)70742-8
  • J. Du, J. Y.-T. Leung, Minimizing total tardiness on one machine is NP-hard, Mathematics of Operations Research 15 (1990) 483–495. https://doi.org/10.1287/moor.15.3.483
  • S. Cook, The P versus NP problem, Clay Mathematics Institute problem description, 2000. https://www.claymath.org/wp-content/uploads/2022/06/pvsnp.pdf
18 thms2 active usersReviewed
Complexity TheoryGraph TheoryOperations Research+1·Captain: mikedeng1

Complexity of Machine Scheduling Problems 6: DIRECTED HAMILTON PATH Reduces to No-Wait Flow Shop Makespan and Total Completion TimeResearch Paper

Motivation

In a no-wait flow shop every job passes through the machines M1,…,MmM_1,\dots,M_mM1​,…,Mm​ in the same order, and once it has started it may never wait between two machines. The constraint comes from processes in which the material changes state if it is left standing, such as hot metal rolling, chemical and food processing, and some pharmaceutical lines; see the survey of Hall and Sriskandarajah (doi:10.1287/opre.44.3.510). The question of how hard it is to schedule such a shop well is the question this mission formalizes.

Brucker, Lenstra and Rinnooy Kan settled it for the case in which the number of machines is part of the input. In their report Complexity of Machine Scheduling Problems (Mathematisch Centrum, 1975; journal version in Annals of Discrete Mathematics 1, 1977, doi:10.1016/S0167-5060(08)70743-X), Theorem 5 reduces DIRECTED HAMILTON PATH to the no-wait flow shop. Both minimizing the makespan Cmax⁡C_{\max}Cmax​ and minimizing the total completion time ∑Cj\sum C_j∑Cj​ are thereby NP-complete.

Timeline.

  • 1964: Gilmore and Gomory solve the two-machine no-wait flow shop with makespan in polynomial time (doi:10.1287/opre.12.5.655).
  • 1972: Wismer (doi:10.1287/opre.20.3.689) and Reddi and Ramamoorthy (doi:10.1057/jors.1972.52) show that no-wait makespan minimization is a travelling-salesman problem with arc weights computed from the processing times.
  • 1972: Karp proves DIRECTED HAMILTON CIRCUIT NP-complete (doi:10.1007/978-1-4684-2001-2_9).
  • 1975: Brucker, Lenstra and Rinnooy Kan reduce DIRECTED HAMILTON CIRCUIT to DIRECTED HAMILTON PATH (their Theorem 2(d)), and DIRECTED HAMILTON PATH to n∣m∣F,no wait∣Cmax⁡n|m|F,\textit{no wait}|C_{\max}n∣m∣F,no wait∣Cmax​ and to n∣m∣F,no wait,wj=1∣∑wjCjn|m|F,\textit{no wait},w_j=1|\sum w_jC_jn∣m∣F,no wait,wj​=1∣∑wj​Cj​ (Theorem 5).
  • 1984: Röck shows that the problem stays NP-hard for three machines (doi:10.1145/62.65).

Setting

There are nnn jobs J1,…,JnJ_1,\dots,J_nJ1​,…,Jn​ and mmm machines. Job JℓJ_\ellJℓ​ needs processing time pℓi∈Np_{\ell i}\in\mathbb Npℓi​∈N on machine MiM_iMi​. Write

qℓi=∑r=1ipℓr,qℓ0=0,q_{\ell i}=\sum_{r=1}^{i}p_{\ell r},\qquad q_{\ell 0}=0,qℓi​=r=1∑i​pℓr​,qℓ0​=0,

for the time job JℓJ_\ellJℓ​ spends on its first iii machines. Because a job never waits, a schedule is determined by the start times Bℓ∈NB_\ell\in\mathbb NBℓ​∈N. The operation of JℓJ_\ellJℓ​ on MiM_iMi​ occupies [Bℓ+qℓ,i−1, Bℓ+qℓi)[B_\ell+q_{\ell,i-1},\,B_\ell+q_{\ell i})[Bℓ​+qℓ,i−1​,Bℓ​+qℓi​), and job JℓJ_\ellJℓ​ completes at Cℓ=Bℓ+qℓmC_\ell=B_\ell+q_{\ell m}Cℓ​=Bℓ​+qℓm​. A schedule is feasible when no two distinct jobs occupy the same machine at the same time. The delay

cjk=max⁡1≤i≤m{qji−qk,i−1}c_{jk}=\max_{1\le i\le m}\{q_{ji}-q_{k,i-1}\}cjk​=1≤i≤mmax​{qji​−qk,i−1​}

is the least gap Bk−BjB_k-B_jBk​−Bj​ that lets JkJ_kJk​ follow JjJ_jJj​ on every machine.

A directed graph G=(V,A)G=(V,A)G=(V,A) on V={0,…,n−1}V=\{0,\dots,n-1\}V={0,…,n−1} has a Hamilton path if its vertices can be ordered σ(0),…,σ(n−1)\sigma(0),\dots,\sigma(n-1)σ(0),…,σ(n−1) with every (σ(i),σ(i+1))∈A(\sigma(i),\sigma(i+1))\in A(σ(i),σ(i+1))∈A.

From GGG the paper builds an instance with nnn jobs and m=n(n−1)+2m=n(n-1)+2m=n(n−1)+2 machines. Each ordered pair (j,k)(j,k)(j,k) of distinct jobs is assigned a middle machine ι(j,k)∈{2,…,m−1}\iota(j,k)\in\{2,\dots,m-1\}ι(j,k)∈{2,…,m−1}, and the partial sums qℓiq_{\ell i}qℓi​ are perturbed from iμi\muiμ by ±λ\pm\lambda±λ or ±(λ+1)\pm(\lambda+1)±(λ+1) on the machines ι(ℓ,⋅)\iota(\ell,\cdot)ι(ℓ,⋅) and just before the machines ι(⋅,ℓ)\iota(\cdot,\ell)ι(⋅,ℓ), depending on whether the pair is an arc. The parameters satisfy λ≥1\lambda\ge1λ≥1 and μ≥2λ+3\mu\ge2\lambda+3μ≥2λ+3.

Formalization targets

Goal (Theorem 5)

DIRECTED HAMILTON PATH ∝ n∣m∣F,no wait∣Cmax⁡andDIRECTED HAMILTON PATH ∝ n∣m∣F,no wait,wj=1∣∑wjCj,\text{DIRECTED HAMILTON PATH}\ \propto\ n|m|F,\textit{no wait}|C_{\max}\quad\text{and}\quad \text{DIRECTED HAMILTON PATH}\ \propto\ n|m|F,\textit{no wait},w_j=1|\textstyle\sum w_jC_j,DIRECTED HAMILTON PATH ∝ n∣m∣F,no wait∣Cmax​andDIRECTED HAMILTON PATH ∝ n∣m∣F,no wait,wj​=1∣∑wj​Cj​,

where ∝\propto∝ is polynomial-time many-one reducibility between the binary-coded recognition languages.

Milestones, in the order the proof uses them

  1. Eq. (9): cjkc_{jk}cjk​ is the least gap between BjB_jBj​ and BkB_kBk​ for which JkJ_kJk​ follows JjJ_jJj​ on every machine.
  2. The travelling-salesman reformulation: if all processing times are positive, a feasible schedule with Cmax⁡≤yC_{\max}\le yCmax​≤y (resp. ∑Cℓ≤y\sum C_\ell\le y∑Cℓ​≤y) exists iff some job order has path length (resp. summed completion times along the path) at most yyy.
  3. An admissible ordering ι\iotaι exists for every n≠2n\ne2n=2.
  4. All processing times of the construction are at least 111.
  5. The delays of the construction: cjk=μ+2λc_{jk}=\mu+2\lambdacjk​=μ+2λ if (j,k)∈A(j,k)\in A(j,k)∈A, and μ+2λ+2\mu+2\lambda+2μ+2λ+2 otherwise.
  6. Theorem 5(a), the equivalence: GGG has a Hamilton path   ⟺  \iff⟺ Cmax⁡≤(n−1)(μ+2λ)+mμC_{\max}\le(n-1)(\mu+2\lambda)+m\muCmax​≤(n−1)(μ+2λ)+mμ.
  7. Theorem 5(b), the equivalence: GGG has a Hamilton path   ⟺  \iff⟺ ∑jCj≤12n(n−1)(μ+2λ)+nmμ\sum_jC_j\le\tfrac12n(n-1)(\mu+2\lambda)+nm\mu∑j​Cj​≤21​n(n−1)(μ+2λ)+nmμ.
  8. Theorem 2(d), off the goal's path: G′G'G′ has a Hamilton circuit iff the graph obtained by splitting a vertex v′v'v′ into v′v'v′ and a new sink v′′v''v′′ has a Hamilton path.

Significance

The result. Theorem 5, together with the NP-completeness of DIRECTED HAMILTON PATH, places both no-wait criteria among the NP-complete problems once mmm is part of the input. The Gilmore–Gomory algorithm for two machines therefore cannot be extended to arbitrary mmm unless P = NP, and heuristics and exact exponential methods for no-wait shops are justified. The reduction also gives a structural fact of independent use: every directed graph can be realized, up to two arc-weight values, as the delay matrix of a no-wait flow shop.

Formalizing it. The result has been proved for fifty years; to our knowledge no machine-checked version exists. This mission produces a checked no-wait flow shop model, a checked travelling-salesman reformulation of it, the correctness of the paper's construction, and a polynomial-time reduction in an explicit Turing-machine model. It also records a gap in the printed proof: the ordering ι\iotaι the paper calls easy to construct does not exist for n=2n=2n=2.

Difficulty

Three steps are not routine.

  1. The passage from schedules to job orders assumes that the order in which jobs start is the order in which they visit every machine. With zero processing times this fails, so the reformulation needs the positivity milestone.
  2. Computing the delays requires a case analysis over all machines and all pairs of perturbations. The property of ι\iotaι is exactly what keeps the "+++" and "−-−" cases from colliding, and the constants λ≥1\lambda\ge1λ≥1, μ≥2λ+3\mu\ge2\lambda+3μ≥2λ+3 are tight enough that the comparison must be done carefully.
  3. The goal asks for an actual Turing machine with a polynomial step bound. It has to build ι\iotaι for every n≠2n\ne2n=2 and handle n≤2n\le2n≤2 separately. The equivalences alone do not give this.

Formalization scope

Jobs and machines are 000-based (Fin n, Fin m); cum p ℓ i is the paper's qℓiq_{\ell i}qℓi​, and the machine indices ι(j,k)\iota(j,k)ι(j,k) are the paper's 111-based indices. Start times are natural numbers, and release dates are 000. Section 3 computes times from processing orders on integer data, and every criterion is regular, so real start times would not change the yes-instances. A zero-length operation occupies the empty interval. Cmax⁡≤yC_{\max}\le yCmax​≤y is stated as Cℓ≤yC_\ell\le yCℓ​≤y for every job. The delays, the partial sums of the construction and its processing times are computed in Z\mathbb ZZ. The instance uses their conversion to N\mathbb NN, which is exact by milestone 4. The threshold of Theorem 5(b) is compared in Q\mathbb QQ, as printed.

The paper's loose phrases are made explicit as follows:

  • "scheduled directly after" means "precedes on every machine";
  • "equivalent to solving the TRAVELLING SALESMAN problem" means the two threshold equivalences of milestone 2, with the ∑Cj\sum C_j∑Cj​ version as the reading of "constructed as in (a)";
  • "such an ordering can easily be constructed" is stated for n≠2n\ne2n=2, the only case in which it is true.

Directed graphs are Boolean adjacency matrices. A graph with 000 or 111 vertices has a Hamilton path, and a one-vertex graph has a Hamilton circuit iff it has a loop.

The goal is CookPvsNP.PolyReducible from the published definition CookPvsNP_defs, with polynomial time measured on Cook's one-tape Turing machines. Instances are coded with the alphabet BSym and binary code encNats of the published ProjSchedTW.Complexity.Encoding (Neumann, Schwindt and Zimmermann). A graph is coded as nnn followed by its adjacency matrix; a flow-shop instance as nnn, mmm, the matrix (pℓi)(p_{\ell i})(pℓi​) and the threshold yyy.

Stating only the equivalences 6–7 and calling the result "reducible" would drop polynomiality; the goal therefore asserts PolyReducible. The target languages contain exactly the no-wait flow-shop instances, with no waiting allowed, so the reduction cannot land in a looser problem. The parameters λ,μ\lambda,\muλ,μ always carry λ≥1\lambda\ge1λ≥1, μ≥2λ+3\mu\ge2\lambda+3μ≥2λ+3.

Contributions are welcome at every level:

  • the general travelling-salesman reformulation, which is reusable for any no-wait flow-shop result;
  • the combinatorial existence of ι\iotaι;
  • the arithmetic of the construction;
  • Turing-machine infrastructure for computing arithmetic list transformations in polynomial time, which every reduction in this series needs.

Selected references

  • P. Brucker, J. K. Lenstra, A. H. G. Rinnooy Kan, Complexity of Machine Scheduling Problems, Mathematisch Centrum Report BW 43/75, Amsterdam, 1975; Annals of Discrete Mathematics 1 (1977) 343–362. doi:10.1016/S0167-5060(08)70743-X
  • R. M. Karp, Reducibility among combinatorial problems, in Complexity of Computer Computations, Plenum, 1972, 85–103. doi:10.1007/978-1-4684-2001-2_9
  • P. C. Gilmore, R. E. Gomory, Sequencing a one state-variable machine: a solvable case of the traveling salesman problem, Operations Research 12 (1964) 655–679. doi:10.1287/opre.12.5.655
  • D. A. Wismer, Solution of the flowshop-scheduling problem with no intermediate queues, Operations Research 20 (1972) 689–697. doi:10.1287/opre.20.3.689
  • S. S. Reddi, C. V. Ramamoorthy, On the flow-shop sequencing problem with no wait in process, Operational Research Quarterly 23 (1972) 323–331. doi:10.1057/jors.1972.52
  • H. Röck, The three-machine no-wait flow shop is NP-complete, Journal of the ACM 31 (1984) 336–345. doi:10.1145/62.65
  • N. G. Hall, C. Sriskandarajah, A survey of machine scheduling problems with blocking and no-wait in process, Operations Research 44 (1996) 510–525. doi:10.1287/opre.44.3.510
  • S. A. Cook, The complexity of theorem-proving procedures, STOC 1971, 151–158. doi:10.1145/800157.805047
14 thms2 active usersReviewed
Complexity TheoryOperations ResearchTheoretical Computer Science·Captain: mikedeng1

Complexity of Machine Scheduling Problems 7: Makespan Reduces to Total Completion Time on Identical Machines with Precedence ConstraintsResearch Paper

Motivation

Scheduling jobs on parallel machines under precedence constraints is the core model of project and parallel-processing scheduling: a job may start only after its predecessors have finished. Two criteria dominate the literature, the makespan Cmax⁡C_{\max}Cmax​ (when does the last job finish?) and the total completion time ∑jCj\sum_j C_j∑j​Cj​ (how long do jobs wait on average?). Knowing that one criterion is at least as hard as the other lets a hardness proof for one transfer to the other without a new reduction from a combinatorial problem.

Brucker, Lenstra and Rinnooy Kan's report Complexity of Machine Scheduling Problems (Mathematisch Centrum, 1975; later in Annals of Discrete Mathematics 1, 1977) collected the complexity status of the standard scheduling problems and stated a set of elementary reductions among them as Theorem 1. Part (l) reduces makespan to total completion time for identical machines with precedence constraints and bounded processing times.

Timeline.

  • 1971–1972: Cook (doi:10.1145/800157.805047) and Karp (doi:10.1007/978-1-4684-2001-2_9) introduce NP-completeness and polynomial reducibility.
  • 1975: Ullman (doi:10.1016/S0022-0000(75)80008-0) proves that the makespan problems n∣2∣I,prec,1≤pj1≤2∣Cmax⁡n|2|I,\mathit{prec},1\le p_{j1}\le 2|C_{\max}n∣2∣I,prec,1≤pj1​≤2∣Cmax​ and n∣m∣I,prec,pj1=1∣Cmax⁡n|m|I,\mathit{prec},p_{j1}=1|C_{\max}n∣m∣I,prec,pj1​=1∣Cmax​ are NP-complete, by reductions from 3-SATISFIABILITY.
  • 1975: Brucker, Lenstra and Rinnooy Kan state Theorem 1(l); their Table III (p. 13) applies it to Ullman's two problems and concludes that the corresponding total completion time problems are NP-complete.

Setting

An instance has nnn jobs J1,…,JnJ_1,\dots,J_nJ1​,…,Jn​, a number m≥1m \ge 1m≥1 of identical machines, a processing time pjp_jpj​ for each job, and a precedence relation <<< on the jobs: Jj<JkJ_j < J_kJj​<Jk​ means that JkJ_kJk​ may start only after JjJ_jJj​ has completed. Each job is one operation, processed without interruption on any one machine. For a constant p∗p_*p∗​, the class n∣m∣I,prec,1≤pj1≤p∗n|m|I,\mathit{prec},1\le p_{j1}\le p_*n∣m∣I,prec,1≤pj1​≤p∗​ requires 1≤pj≤p∗1 \le p_j \le p_*1≤pj​≤p∗​ for every job and an acyclic precedence relation.

A schedule assigns to every job a machine and a starting time Bj∈NB_j \in \mathbb NBj​∈N; the completion time is Cj=Bj+pjC_j = B_j + p_jCj​=Bj​+pj​. It is feasible if two jobs on the same machine never overlap and Jj<JkJ_j < J_kJj​<Jk​ implies Cj≤BkC_j \le B_kCj​≤Bk​.

Following the paper, each optimization problem is replaced by its recognition version. Problem P′P'P′ asks, for an instance and a threshold y′y'y′, whether some feasible schedule has Cmax⁡=max⁡jCj≤y′C_{\max} = \max_j C_j \le y'Cmax​=maxj​Cj​≤y′. Problem PPP asks, for an instance of the same class and a threshold yyy, whether some feasible schedule has ∑jCj≤y\sum_j C_j \le y∑j​Cj​≤y (all weights wj=1w_j = 1wj​=1).

P′P'P′ is reducible to PPP, written P′∝PP' \propto PP′∝P, if every instance of P′P'P′ can be transformed in polynomial time into an instance of PPP with the same answer.

Formalization targets

Goal: Theorem 1(l)

For every constant p∗≥1p_* \ge 1p∗​≥1,

n′∣m∣I,prec,1≤pj1≤p∗∣Cmax⁡  ∝  n∣m∣I,prec,1≤pj1≤p∗,wj=1∣∑wjCj.n'|m|I,\mathit{prec},1\le p_{j1}\le p_*|C_{\max} \;\propto\; n|m|I,\mathit{prec},1\le p_{j1}\le p_*,w_j=1|\textstyle\sum w_jC_j .n′∣m∣I,prec,1≤pj1​≤p∗​∣Cmax​∝n∣m∣I,prec,1≤pj1​≤p∗​,wj​=1∣∑wj​Cj​.

Milestones

  1. A trivial upper bound. Every instance of P′P'P′ with n′n'n′ jobs has a feasible schedule with Cmax⁡≤n′p∗C_{\max} \le n'p_*Cmax​≤n′p∗​.
  2. The construction and the forward direction. For 0≤y′≤n′p∗0 \le y' \le n'p_*0≤y′≤n′p∗​ let n′′=(n′−1)y′n'' = (n'-1)y'n′′=(n′−1)y′, n=n′+n′′n = n'+n''n=n′+n′′ and y=ny′+12n′′(n′′+1)y = ny' + \tfrac12 n''(n''+1)y=ny′+21​n′′(n′′+1), and add n′′n''n′′ unit-time jobs Jn′+kJ_{n'+k}Jn′+k​, each required to follow every original job and every earlier added job. If P′P'P′ has a schedule with Cmax⁡≤y′C_{\max} \le y'Cmax​≤y′, the new instance has a feasible schedule with ∑jCj≤y\sum_j C_j \le y∑j​Cj​≤y.
  3. The backward direction. If every feasible schedule of P′P'P′ has Cmax⁡>y′C_{\max} > y'Cmax​>y′, every feasible schedule of the new instance has ∑jCj>y\sum_j C_j > y∑j​Cj​>y.

Significance

The result. Theorem 1(l) makes the total completion time problem at least as hard as the makespan problem in the same class. Combined with Ullman's NP-completeness results and Theorem 1(b) (reducibility transfers NP-completeness), it shows that minimizing ∑jCj\sum_j C_j∑j​Cj​ on identical machines with precedence constraints is NP-complete, already for two machines with pj∈{1,2}p_j \in \{1, 2\}pj​∈{1,2} and for unit processing times on mmm machines. These are two rows of the paper's Table III.

Formalizing it. The result is proved on one page of a typewritten report; no machine-checked version exists. The mission produces a scheduling model for identical machines with precedence constraints, binary languages for the two recognition problems, and the reduction in Cook's Turing-machine model. The proof's displayed bounds contain a misprinted index range, which the formal statements correct.

Difficulty

The two criteria are not monotonically related: a schedule with a smaller makespan can have a larger total completion time than one with a larger makespan. So the obvious reduction, keeping the instance and asking for ∑jCj≤n′y′\sum_j C_j \le n'y'∑j​Cj​≤n′y′, is not an equivalence: a no-instance of P′P'P′ can have a schedule with small total completion time. The instance has to be changed so that the total completion time is governed by the makespan, and the comparison of the two thresholds must be exact, including the strict inequality on the "no" side, which depends on integral completion times and positive processing times.

The main formal difficulty lies in the reduction itself. A polynomial-time Turing machine must decode the binary instance, check that it belongs to the class (including acyclicity of the precedence relation), compare y′y'y′ with n′p∗n'p_*n′p∗​, and write out an instance with n′′=(n′−1)y′n'' = (n'-1)y'n′′=(n′−1)y′ additional jobs and a quadratic-size precedence matrix. The size of that output is polynomial only because p∗p_*p∗​ is a constant: a version with p∗p_*p∗​ part of the input would make n′′n''n′′ exponential in the input length.

Formalization scope

  • Jobs and machines are indexed from 000 (Fin n, Fin m). Starting times are natural numbers; Section 3 derives all times from processing orders on nonnegative integer data, and both criteria are regular. "Cmax⁡≤yC_{\max} \le yCmax​≤y" is written as "Cj≤yC_j \le yCj​≤y for every jjj".
  • The precedence relation is a Boolean matrix. Its acyclicity and m≥1m \ge 1m≥1 are part of the problem class; the paper leaves both implicit, and the claim "any instance has a solution with Cmax⁡≤n′p∗C_{\max} \le n'p_*Cmax​≤n′p∗​" fails without them.
  • p∗p_*p∗​ is a constant of the class and a parameter of both languages, not part of the input. All weights in the target problem equal 111 and are not written.
  • The threshold y=ny′+12n′′(n′′+1)y = ny' + \tfrac12 n''(n''+1)y=ny′+21​n′′(n′′+1) is stated in Q\mathbb QQ exactly as printed in the milestones; it is an integer, and the reduction uses its natural-number value.
  • The paper's displayed bounds n′y′+∑k=n′+1n(y′+k)=yn'y' + \sum_{k=n'+1}^{n}(y'+k) = yn′y′+∑k=n′+1n​(y′+k)=y and y′+∑k=n′+1n(y′+1+k)=yy' + \sum_{k=n'+1}^{n}(y'+1+k) = yy′+∑k=n′+1n​(y′+1+k)=y have a misprinted index range (the sums must run over k=1,…,n′′k = 1,\dots,n''k=1,…,n′′). The milestones state the end-to-end bounds ∑jCj≤y\sum_j C_j \le y∑j​Cj​≤y and ∑jCj>y\sum_j C_j > y∑j​Cj​>y.
  • "Cmax⁡>y′C_{\max} > y'Cmax​>y′" in the backward direction is read as the negation of the forward hypothesis: no feasible schedule of P′P'P′ has Cmax⁡≤y′C_{\max} \le y'Cmax​≤y′.
  • "Reducible" is Cook's polynomial-time many-one reducibility from the published definition CookPvsNP_defs; numbers are written in binary with the alphabet and code encNats of the published definition ProjSchedTW.Complexity.Encoding (Neumann, Schwindt and Zimmermann's encoding). The unit-time model ResourceScheduling.Chain.Model (Błażewicz, Lenstra and Rinnooy Kan) has the same feasibility conditions but unit processing times and real start times, so the model here is defined anew.
  • A trivializing formalization is ruled out: the goal asserts a polynomial-time computable map, not the bare equivalence, and codes of instances outside the class are excluded from both languages, so the reduction cannot exploit malformed inputs.
  • Contributions welcome: proofs of the three milestones, a Turing-machine library for arithmetic on binary codes (reusable across this series), and a proof of the goal from the milestones.

Selected references

  • P. Brucker, J. K. Lenstra, A. H. G. Rinnooy Kan, Complexity of Machine Scheduling Problems, Mathematisch Centrum Report BW 43/75, Amsterdam, 1975; published in Annals of Discrete Mathematics 1 (1977) 343–362. doi:10.1016/S0167-5060(08)70743-X
  • J. D. Ullman, NP-complete scheduling problems, Journal of Computer and System Sciences 10 (1975) 384–393. doi:10.1016/S0022-0000(75)80008-0
  • S. A. Cook, The complexity of theorem-proving procedures, STOC 1971, 151–158. doi:10.1145/800157.805047
  • R. M. Karp, Reducibility among combinatorial problems, in Complexity of Computer Computations, Plenum, 1972, 85–103. doi:10.1007/978-1-4684-2001-2_9
9 thms2 active usersReviewed
CombinatoricsOperations ResearchTheoretical Computer Science·Captain: mikedeng1

Approximation Algorithms for Scheduling Unrelated Parallel Machines 4: With Times in {p, q} and gcd(p, q) = 1, a q-Dimensional Matching Exists Iff a Schedule Has Makespan ≤ pqResearch Paper

Motivation

Minimum makespan scheduling on unrelated parallel machines asks for an assignment of nnn jobs to mmm machines, where job jjj takes pijp_{ij}pij​ time units on machine iii, so that the largest machine load is as small as possible. In the three-field notation of Graham, Lawler, Lenstra and Rinnooy Kan (1979) it is R ∥ Cmax⁡R\,\|\,C_{\max}R∥Cmax​. It models load balancing across heterogeneous processors, workers or production lines, and it is a standard test case for linear-programming rounding.

Lenstra, Shmoys and Tardos (FOCS 1987; CWI Report OS-R8714; Mathematical Programming 46, 1990) gave a polynomial 2-approximation algorithm for R ∥ Cmax⁡R\,\|\,C_{\max}R∥Cmax​ and showed that no polynomial algorithm achieves a ratio below 3/23/23/2 unless P = NP. They also asked which restrictions on the processing times keep the problem hard. Their Section 5 answers this when only two distinct processing times occur:

  • all pij=1p_{ij}=1pij​=1: trivial;
  • all pij∈{1,∞}p_{ij}\in\{1,\infty\}pij​∈{1,∞}: bipartite cardinality matching;
  • all pij∈{1,2}p_{ij}\in\{1,2\}pij​∈{1,2}: polynomial by matching techniques (Theorem 6);
  • all pij∈{p,q}p_{ij}\in\{p,q\}pij​∈{p,q} with p<qp<qp<q, 2p≠q2p\ne q2p=q: NP-hard (Theorem 7).

Theorem 7 is the paper's last result and closes this classification. Its proof generalizes the reduction of Theorem 4, which handles the case {1,3}\{1,3\}{1,3}, from 3-dimensional matching to qqq-dimensional matching.

Setting

Machines are indexed by i∈{1,…,m}i\in\{1,\dots,m\}i∈{1,…,m} and jobs by jjj. A schedule σ\sigmaσ assigns every job to exactly one machine. The load of machine iii is ∑j:σ(j)=ipij\sum_{j:\sigma(j)=i}p_{ij}∑j:σ(j)=i​pij​, and the makespan Cmax⁡(σ)C_{\max}(\sigma)Cmax​(σ) is the largest load.

qqq-dimensional matching. An instance is a ground set UUU of qnqnqn elements and a family S1,…,SmS_1,\dots,S_mS1​,…,Sm​ of qqq-element subsets of UUU. A matching is a subfamily F′⊆{1,…,m}F'\subseteq\{1,\dots,m\}F′⊆{1,…,m} with ∣F′∣=n|F'|=n∣F′∣=n and ⋃i∈F′Si=U\bigcup_{i\in F'}S_i=U⋃i∈F′​Si​=U; its members are then pairwise disjoint.

The instance of Theorem 7. Fix natural numbers 0<p<q0<p<q0<p<q that are relatively prime. Build a scheduling instance with mmm machines, machine iii corresponding to SiS_iSi​, and two kinds of jobs:

  • qnqnqn element jobs, one per u∈Uu\in Uu∈U, with piu=pp_{iu}=ppiu​=p if u∈Siu\in S_iu∈Si​ and piu=qp_{iu}=qpiu​=q otherwise;
  • p(m−n)p(m-n)p(m−n) dummy jobs, each taking qqq time units on every machine.

Every processing time lies in {p,q}\{p,q\}{p,q}.

The instance of Theorem 4. For disjoint sets A={a1,…,an}A=\{a_1,\dots,a_n\}A={a1​,…,an​}, BBB, CCC of the same size and triples Ti=(aj,bk,cl)T_i=(a_j,b_k,c_l)Ti​=(aj​,bk​,cl​), i=1,…,mi=1,\dots,mi=1,…,m, there are 3n3n3n element jobs, one per element of A∪B∪CA\cup B\cup CA∪B∪C, and m−nm-nm−n dummy jobs. Machine iii processes the element jobs of aja_jaj​, bkb_kbk​, clc_lcl​ in one time unit and every other job in three time units. A 3-dimensional matching is a subfamily of nnn triples covering A∪B∪CA\cup B\cup CA∪B∪C.

Formalization targets

Goal: Theorem 7 (p. 8; proof pp. 8–9)

For relatively prime 0<p<q0<p<q0<p<q and a family of qqq-subsets S1,…,SmS_1,\dots,S_mS1​,…,Sm​ of a qnqnqn-element set, the instance above has all processing times in {p,q}\{p,q\}{p,q}, and

∃ σ: Cmax⁡(σ)≤pq⟺∃ F′⊆{1,…,m}: ∣F′∣=n, ⋃i∈F′Si=U.\exists\,\sigma:\ C_{\max}(\sigma)\le pq \quad\Longleftrightarrow\quad \exists\,F'\subseteq\{1,\dots,m\}:\ |F'|=n,\ \bigcup_{i\in F'}S_i=U .∃σ: Cmax​(σ)≤pq⟺∃F′⊆{1,…,m}: ∣F′∣=n, i∈F′⋃​Si​=U.

Milestones

  1. Theorem 4 (p. 7): on the 3-dimensional matching instance with times in {1,3}\{1,3\}{1,3}, a schedule with makespan at most 333 exists iff a matching exists.
  2. Matching gives a schedule (pp. 8–9): if SSS has a matching, some schedule has Cmax⁡≤pqC_{\max}\le pqCmax​≤pq.
  3. No idle time, two kinds of machine (p. 9): in every schedule with Cmax⁡≤pqC_{\max}\le pqCmax​≤pq, three things hold. Every load equals pqpqpq. Every element job runs at length ppp, on a machine whose tuple contains it. Each machine processes either exactly qqq element jobs and no dummy job, or exactly ppp dummy jobs and no element job.

Significance

The result. Theorems 6 and 7 together say exactly which two-valued restrictions of R ∥ Cmax⁡R\,\|\,C_{\max}R∥Cmax​ are tractable. Up to scaling, the polynomial case is {1,2}\{1,2\}{1,2}, and every other pair {p,q}\{p,q\}{p,q} with p<qp<qp<q is NP-hard. Theorem 4 is the base case. It also yields Corollary 1 of the paper: no polynomial ρ\rhoρ-approximation with ρ<4/3\rho<4/3ρ<4/3 exists unless P = NP. Reductions of this "no idle time" kind are a standard template for hardness of restricted-assignment and two-value scheduling, a line still active in the study of the restricted assignment problem and of the "graph balancing" special case.

Formalizing it. The result is proved, in two short paragraphs. The proof leaves to the reader the construction of the schedule from a matching and the "easy number theoretic argument" behind the converse, and both become explicit here. The development also produces reusable pieces: a qqq-dimensional matching definition over an arbitrary family of qqq-sets, and two reduction instances built on the published load and makespan of MatousekLP.Scheduling.Schedule. To our knowledge no machine-checked proof of these reductions exists.

Difficulty

The forward direction is a direct construction. The converse is where care is needed. A schedule with makespan at most pqpqpq may a priori place an element job on a machine whose tuple does not contain it, at length qqq, and may mix element and dummy jobs on one machine. Looking at one machine at a time does not exclude either: a single machine can carry such a mixed load below pqpqpq. What excludes them is a property of the whole schedule together with the arithmetic of ppp and qqq. The hypotheses are sharp for this step: for p>qp>qp>q element jobs are cheaper on foreign machines, and for gcd⁡(p,q)>1\gcd(p,q)>1gcd(p,q)>1 a load ap+bq=pqap+bq=pqap+bq=pq with a,b>0a,b>0a,b>0 becomes possible.

Formalization scope

  • Model. Machines are Fin m. Schedules are maps from jobs to machines. Load and makespan are those of the published MatousekLP.Scheduling.Schedule, with natural-number processing times cast to R\mathbb RR. The jobs are enumerated as Fin (q * n + p * (m - n)) (Theorem 7) and Fin (3 * n + (m - n)) (Theorem 4), element jobs first, through finSumFinEquiv.
  • Ground set and family. The ground set is Fin (q * n) and the family is indexed by machines, so repeated tuples are allowed. The qqq-partite structure of qqq-dimensional matching is not imposed: the reduction does not use it, and statements over all families of qqq-sets contain the qqq-partite case. Theorem 4 keeps the tripartite structure, with triples of indices in Fin n × Fin n × Fin n.
  • Threshold. The thresholds are exactly pqpqpq and 333, with "makespan at most".
  • Complexity wording not formalized. "NP-hard" (Theorem 7) and "NP-complete" (Theorem 4) are not formalized: membership in NP, polynomial size of the reductions, and the hardness of the matching problems are not stated. What is stated is the equivalence each reduction establishes.
  • Hypotheses. Theorem 7's goal assumes 0<p<q0<p<q0<p<q, gcd⁡(p,q)=1\gcd(p,q)=1gcd(p,q)=1 and ∣Si∣=q|S_i|=q∣Si​∣=q. The paper's general case gcd⁡(p,q)=g>1\gcd(p,q)=g>1gcd(p,q)=g>1 is its stated "without loss of generality": divide all times by ggg, which divides every makespan by ggg. It is not part of the formal statement. The paper's hypothesis 2p≠q2p\ne q2p=q is dropped because the reduction does not use it. With coprime p<qp<qp<q it excludes only (p,q)=(1,2)(p,q)=(1,2)(p,q)=(1,2), where the equivalence still holds but the source problem is bipartite matching. The formal goal is therefore stronger than the paper's.
  • Edge cases. For m<nm<nm<n, natural-number subtraction gives no dummy jobs; both sides of each equivalence are false when n≥1n\ge1n≥1. This stands in for the paper's "trivial 'no' instance". For n=0n=0n=0 the empty family is a matching and the dummy jobs fill the machines exactly.
  • No trivialization. The goal is an equivalence about a constructed instance whose processing times are given by explicit definitions. Neither side is assumed, the schedule is quantified over all maps from jobs to machines, and the instance is not a free parameter pinned by hypotheses.
  • Welcome contributions. Besides the milestones: counting lemmas relating a machine's load to the numbers of jobs of each length on it, and lemmas on the makespan of MatousekLP.Scheduling.Schedule (it bounds every load; it is attained when m≥1m\ge1m≥1), which are reusable across scheduling reductions.

Selected references

  • J. K. Lenstra, D. B. Shmoys, É. Tardos, Approximation algorithms for scheduling unrelated parallel machines, CWI Report OS-R8714, Amsterdam, 1987 (the version formalized here); journal version in Mathematical Programming 46 (1990) 259–271. https://doi.org/10.1007/BF01585745
  • M. R. Garey, D. S. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness, Freeman, 1979 (3-dimensional matching, problem SP1).
  • R. L. Graham, E. L. Lawler, J. K. Lenstra, A. H. G. Rinnooy Kan, Optimization and approximation in deterministic sequencing and scheduling: a survey, Annals of Discrete Mathematics 5 (1979) 287–326. https://doi.org/10.1016/S0167-5060(08)70356-X
  • J. Matoušek, B. Gärtner, Understanding and Using Linear Programming, Springer, 2007, §8.3 (the schedule, load and makespan definitions reused here). https://doi.org/10.1007/978-3-540-30717-4
7 thms1 active userReviewed
CombinatoricsOperations ResearchTheoretical Computer Science·Captain: mikedeng1

Approximation Algorithms for Scheduling Unrelated Parallel Machines 3: On the 3-Dimensional Matching Instances, a Schedule within ρ < 3/2 of Optimal Has Makespan ≤ 2 Iff a Matching ExistsResearch Paper

Motivation

Minimum makespan scheduling on unrelated parallel machines, written R ∣∣ Cmax⁡R\,||\,C_{\max}R∣∣Cmax​, is one of the basic models of scheduling theory: nnn jobs must each be run on one of mmm machines, and the time a job takes depends arbitrarily on the machine. Lenstra, Shmoys and Tardos (CWI Report OS-R8714, 1987; journal version Math. Programming 46, 1990) gave a polynomial 2-approximation algorithm for this problem and, in the same paper, a matching limit from below: no polynomial algorithm can guarantee a factor smaller than 3/23/23/2 unless P=NPP = NPP=NP (their Corollary 2).

The two bounds have stood for more than three decades. Closing the gap between 3/23/23/2 and 222 for R ∣∣ Cmax⁡R\,||\,C_{\max}R∣∣Cmax​ is listed among the central open problems of approximation algorithms (Williamson and Shmoys, The Design of Approximation Algorithms, 2011, open problem on unrelated machines; Schuurman and Woeginger, Polynomial time approximation algorithms for machine scheduling: ten open problems, J. Scheduling 1999). The lower bound of 3/23/23/2 is the subject of this mission.

Timeline:

  • 1979: Graham, Lawler, Lenstra and Rinnooy Kan introduce the classification R ∣∣ Cmax⁡R\,||\,C_{\max}R∣∣Cmax​.
  • 1987/1990: Lenstra, Shmoys and Tardos prove NP-completeness of deciding makespan at most 3 (Theorem 4, giving the bound 4/34/34/3) and at most 2 (Theorem 5, giving 3/23/23/2), both by reduction from 3-dimensional matching.
  • Since then: the 3/23/23/2 hardness bound has not been improved for general R ∣∣ Cmax⁡R\,||\,C_{\max}R∣∣Cmax​; progress has concentrated on special cases such as the restricted-assignment problem.

Setting

3-dimensional matching. There are three disjoint sets A={a1,…,an}A = \{a_1,\dots,a_n\}A={a1​,…,an​}, B={b1,…,bn}B = \{b_1,\dots,b_n\}B={b1​,…,bn​}, C={c1,…,cn}C = \{c_1,\dots,c_n\}C={c1​,…,cn​} and a family F={T1,…,Tm}F = \{T_1,\dots,T_m\}F={T1​,…,Tm​} of triples, each with one element of AAA, one of BBB and one of CCC. A matching is a subfamily F′F'F′ with ∣F′∣=n|F'| = n∣F′∣=n whose union is A∪B∪CA \cup B \cup CA∪B∪C. In Lean an instance is a map T:Fin m→Fin n×Fin n×Fin nT : \mathrm{Fin}\,m \to \mathrm{Fin}\,n \times \mathrm{Fin}\,n \times \mathrm{Fin}\,nT:Finm→Finn×Finn×Finn, and HasMatching T says that a matching exists.

The scheduling model. Machines are Fin m\mathrm{Fin}\,mFinm, jobs are Fin N\mathrm{Fin}\,NFinN, and pijp_{ij}pij​ is the positive integer processing time of job jjj on machine iii. A schedule σ\sigmaσ assigns each job to one machine; the load of machine iii is ∑j:σ(j)=ipij\sum_{j:\sigma(j)=i} p_{ij}∑j:σ(j)=i​pij​ and the makespan Cmax⁡(σ)C_{\max}(\sigma)Cmax​(σ) is the largest load. These are the published definitions MatousekLP.Scheduling.load and makespan.

The instance of Theorem 5. The triples containing aja_jaj​ are the triples of type jjj; let tjt_jtj​ be their number. From TTT the paper builds a scheduling instance with mmm machines, machine iii corresponding to TiT_iTi​, and with

  1. 2n2n2n element jobs, one for each bkb_kbk​ and each clc_lcl​;
  2. tj−1t_j - 1tj​−1 dummy jobs of type jjj, for each jjj.

If Ti=(aj,bk,cl)T_i = (a_j, b_k, c_l)Ti​=(aj​,bk​,cl​), machine iii processes the element jobs of bkb_kbk​ and clc_lcl​ in time 111, each dummy job of type jjj in time 222, and every other job in time 333. In Lean the processing-time matrix is P T.

A ρ\rhoρ-approximate schedule of an instance is a schedule σ\sigmaσ with Cmax⁡(σ)≤ρ Cmax⁡(τ)C_{\max}(\sigma) \le \rho\, C_{\max}(\tau)Cmax​(σ)≤ρCmax​(τ) for every schedule τ\tauτ of the same instance.

Formalization targets

Goal: Corollary 2 (p. 8)

For every instance TTT, every ρ<3/2\rho < 3/2ρ<3/2, and every ρ\rhoρ-approximate schedule σ\sigmaσ of the instance of Theorem 5 built from TTT,

Cmax⁡(σ)≤2  ⟺  T has a matching.C_{\max}(\sigma) \le 2 \iff T \text{ has a matching}.Cmax​(σ)≤2⟺T has a matching.

This is the mathematical content of "for every ρ<3/2\rho < 3/2ρ<3/2 there is no polynomial ρ\rhoρ-approximation algorithm unless P=NPP = NPP=NP": a ρ\rhoρ-approximate answer on the reduced instance decides 3-dimensional matching.

Theorem 5 (p. 7)

For every instance TTT,

∃ σ: Cmax⁡(σ)≤2  ⟺  T has a matching.\exists\,\sigma:\ C_{\max}(\sigma) \le 2 \iff T \text{ has a matching}.∃σ: Cmax​(σ)≤2⟺T has a matching.

Milestones from the proof of Theorem 5 (pp. 7–8)

  1. If every tj≥1t_j \ge 1tj​≥1, then ∑j(tj−1)+n=m\sum_j (t_j - 1) + n = m∑j​(tj​−1)+n=m: there are m−nm - nm−n dummy jobs.
  2. A matching yields a schedule with makespan at most 222.
  3. A schedule with makespan at most 222 yields a matching.

Significance

The result. Theorem 5 shows that R ∣∣ Cmax⁡R\,||\,C_{\max}R∣∣Cmax​ is NP-hard already when every processing time lies in {1,2,3}\{1,2,3\}{1,2,3} and the target makespan is 222. Corollary 2 turns this into the best known inapproximability bound for the problem, 3/23/23/2, which sits opposite the paper's own factor-2 algorithm. The same reduction pattern (machines as triples, dummy jobs that pin machines down) is reused in many later hardness proofs for scheduling and assignment problems.

Formalizing it. The result is proved on paper; no machine-checked version is known to exist. A formal proof requires the full combinatorial argument behind the reduction, including the counting of machines per type and the case where some element of AAA lies in no triple, which the paper does not discuss. Together with mission 1 of this series (the factor-2 algorithm), it fixes both ends of the [3/2,2][3/2, 2][3/2,2] gap in one formal library.

Difficulty

The construction is short, but the converse direction carries the weight: from an arbitrary schedule with makespan at most 222 one must recover a matching, although nothing in the schedule singles out the triples that form it. The obvious first idea, to read the matching off the machines that receive unit-time jobs, fails as it stands: a machine may receive one unit-time job or none, and the argument must exclude this for every schedule, including the degenerate instances in which some aja_jaj​ lies in no triple or triples repeat. For Corollary 2, the passage from the real-valued approximation guarantee to the threshold 222 depends on the strict inequality ρ<3/2\rho < 3/2ρ<3/2; at ρ=3/2\rho = 3/2ρ=3/2 the statement is no longer implied by Theorem 5.

Formalization scope

  • Machines are Fin m; 3DM elements are Fin n; a 3DM instance is T : Fin m → Fin n × Fin n × Fin n, so a triple may repeat. A matching is a set of nnn triple indices covering every aja_jaj​, bkb_kbk​, clc_lcl​ (the covering form of the paper's definition, which forces disjointness).
  • The jobs of the reduced instance are the sum type Fin n⊕Fin n⊕Σj Fin(tj−1)\mathrm{Fin}\,n \oplus \mathrm{Fin}\,n \oplus \Sigma_j\,\mathrm{Fin}(t_j - 1)Finn⊕Finn⊕Σj​Fin(tj​−1). They are enumerated by a fixed bijection with Fin N\mathrm{Fin}\,NFinN so that the published MatousekLP.Scheduling.makespan applies. All statements quantify over every schedule, so the choice of bijection is irrelevant.
  • tj−1t_j - 1tj​−1 is natural-number subtraction. When some tj=0t_j = 0tj​=0 (a case the paper leaves aside), type jjj has no dummy job; the reduced instance then has neither a matching nor a schedule of makespan at most 222, so Theorem 5 and Corollary 2 hold as stated, with no hypothesis tj≥1t_j \ge 1tj​≥1. Only the dummy-count milestone assumes tj≥1t_j \ge 1tj​≥1.
  • Processing times are natural numbers cast to R\mathbb RR; makespans are real.
  • Not formalized: "polynomial" (running time of an algorithm and of the reduction), membership in NP, "NP-complete" and "unless P=NPP = NPP=NP". Theorem 5 is stated as the reduction's equivalence; Corollary 2 is stated as the fact that any ρ\rhoρ-approximate schedule of the reduced instance, ρ<3/2\rho < 3/2ρ<3/2, decides 3-dimensional matching. The reduction is evidently polynomial, but this is not stated.
  • The approximation hypothesis compares σ\sigmaσ with every schedule τ\tauτ of the same reduced instance; a goal in which σ\sigmaσ is an arbitrary schedule, or is bounded against an unrelated quantity, would be a different statement. The strict inequality ρ<3/2\rho < 3/2ρ<3/2 is essential and kept.
  • Contributions welcome: proofs of the three milestones, of Theorem 5 from them, and of Corollary 2; reusable lemmas about integer-valued makespans and about sum-type job sets.

Selected references

  • J. K. Lenstra, D. B. Shmoys, É. Tardos, Approximation algorithms for scheduling unrelated parallel machines, CWI Report OS-R8714, Centre for Mathematics and Computer Science, Amsterdam, 1987 (FOCS 1987); the version cited for every theorem number in this mission.
  • J. K. Lenstra, D. B. Shmoys, É. Tardos, Approximation algorithms for scheduling unrelated parallel machines, Mathematical Programming 46 (1990) 259–271. https://doi.org/10.1007/BF01585745
  • R. L. Graham, E. L. Lawler, J. K. Lenstra, A. H. G. Rinnooy Kan, Optimization and approximation in deterministic sequencing and scheduling: a survey, Annals of Discrete Mathematics 5 (1979) 287–326. https://doi.org/10.1016/S0167-5060(08)70356-X
  • M. R. Garey, D. S. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness, Freeman, 1979 (3-dimensional matching, problem [SP1]).
  • P. Schuurman, G. J. Woeginger, Polynomial time approximation algorithms for machine scheduling: ten open problems, Journal of Scheduling 2 (1999) 203–213. https://doi.org/10.1002/(SICI)1099-1425(199909/10)2:5<203::AID-JOS26>3.0.CO;2-5
  • D. P. Williamson, D. B. Shmoys, The Design of Approximation Algorithms, Cambridge University Press, 2011. https://doi.org/10.1017/CBO9780511921735
8 thms1 active userReviewed
CombinatoricsOperations ResearchOptimization·Captain: mikedeng1

Scheduling of Vehicles from a Central Depot to a Number of Delivery Points: The Savings Procedure Always Ends in a Feasible Truck Allocation Whose Mileage Is the Initial Less the Linked SavingsResearch Paper

Motivation

Delivering goods from one depot to many customers with a fleet of trucks is the vehicle routing problem. Dantzig and Ramser formulated it in 1959 as the "truck dispatching problem" (Management Sci. 6 (1959), doi:10.1287/mnsc.6.1.80). Five years later Clarke and Wright proposed the savings procedure (Oper. Res. 12 (1964), 568–581, doi:10.1287/opre.12.4.568): start with one truck per customer and repeatedly join two routes where joining saves the most distance, as long as the trucks can still carry the loads. On the twelve-customer example of Dantzig and Ramser it reached 290 units against their 294.

The savings procedure became the standard construction heuristic for vehicle routing. It appears in every textbook treatment of the problem, is the initial solution of many metaheuristics, and is the benchmark against which later construction methods are compared. The paper states the procedure and its bookkeeping (the half matrix, the vector QQQ, Table II) but proves nothing about it. That every run of the procedure ends, and ends in a feasible allocation, is left to the reader.

Setting

A depot P0P_0P0​ serves customers P1,…,PMP_1,\dots,P_MP1​,…,PM​. The distance dy,zd_{y,z}dy,z​ between every two points is given, and customer PjP_jPj​ requires a load qjq_jqj​. Trucks come in nnn capacity classes: xix_ixi​ trucks of capacity CiC_iCi​ are available, with C1<⋯<CnC_1<\dots<C_nC1​<⋯<Cn​, and the trucks of the smallest capacity are unlimited, x1=∞x_1=\inftyx1​=∞ (p. 569).

A run is the ordered list of customers Pa1,…,PakP_{a_1},\dots,P_{a_k}Pa1​​,…,Pak​​ served by one truck, which drives P0Pa1⋯PakP0P_0P_{a_1}\cdots P_{a_k}P_0P0​Pa1​​⋯Pak​​P0​. Its load is ∑iqai\sum_i q_{a_i}∑i​qai​​. A state of the procedure is a list of runs; its mileage is the total length of its runs. A list of runs is an allocation if every customer lies on exactly one run, and it is feasible if each run can be given a truck of capacity at least its load without using more trucks of any class than are available.

The saving of the cell (y:z)(y:z)(y:z) is d0,y+d0,z−dy,zd_{0,y}+d_{0,z}-d_{y,z}d0,y​+d0,z​−dy,z​. The half matrix records ty,z=1t_{y,z}=1ty,z​=1 if PyP_yPy​ and PzP_zPz​ are adjacent on a run, and ty,0∈{0,1,2}t_{y,0}\in\{0,1,2\}ty,0​∈{0,1,2} counts how many ends of runs lie at PyP_yPy​. Table II counts, for each capacity level CiC_iCi​, the runs with load above CiC_iCi​ and the trucks with capacity above CiC_iCi​.

The procedure starts with the runs [P1],…,[PM][P_1],\dots,[P_M][P1​],…,[PM​], so ty,0=2t_{y,0}=2ty,0​=2 for every customer. A cell (y:z)(y:z)(y:z) is admissible if (I) ty,0>0t_{y,0}>0ty,0​>0 and tz,0>0t_{z,0}>0tz,0​>0; (II) PyP_yPy​ and PzP_zPz​ are on different runs; (III) after replacing those two runs by one run of load Qy+QzQ_y+Q_zQy​+Qz​, no column of Table II has more runs than trucks. A step links an admissible cell of maximum saving, ties broken arbitrarily, by joining the two runs end to end at PyP_yPy​ and PzP_zPz​. The procedure stops when no cell is admissible.

Formalization targets

Goal: correctness of the procedure

Assume symmetric distances, C1<⋯<CnC_1<\dots<C_nC1​<⋯<Cn​, x1=∞x_1=\inftyx1​=∞, and that the initial one-truck-per-customer allocation passes the Table II test. Then every run of the procedure is finite whatever the tie-breaks; at every reachable state from which a link is possible a step exists; and every final state SSS is a feasible allocation satisfying relation (A), ∑z≠yty,z=2\sum_{z\ne y}t_{y,z}=2∑z=y​ty,z​=2 for every customer, with

mileage(S)=2∑j=1Md0,j−∑1≤y<z≤Mty,z=1(d0,y+d0,z−dy,z).\text{mileage}(S)=2\sum_{j=1}^M d_{0,j}-\sum_{\substack{1\le y<z\le M\\ t_{y,z}=1}}\bigl(d_{0,y}+d_{0,z}-d_{y,z}\bigr).mileage(S)=2j=1∑M​d0,j​−1≤y<z≤Mty,z​=1​∑​(d0,y​+d0,z​−dy,z​).

Milestones

mileage(link(S,y,z))=mileage(S)−(d0,y+d0,z−dy,z)for admissible (y:z),\text{mileage}(\text{link}(S,y,z))=\text{mileage}(S)-(d_{0,y}+d_{0,z}-d_{y,z})\quad\text{for admissible }(y:z),mileage(link(S,y,z))=mileage(S)−(d0,y​+d0,z​−dy,z​)for admissible (y:z),

relation (A) at every reachable state, the permanence of links between customers, and

#{runs with load>Ci}≤∑k>ixk  (i=1,…,n)  ⟺  the runs can be allocated to trucks,\#\{\text{runs with load}>C_i\}\le\sum_{k>i}x_k\ \ (i=1,\dots,n)\iff\text{the runs can be allocated to trucks},#{runs with load>Ci​}≤k>i∑​xk​  (i=1,…,n)⟺the runs can be allocated to trucks,

which together give feasibility of every reachable state. Two further milestones: when Cn≥∑jqjC_n\ge\sum_j q_jCn​≥∑j​qj​ and the distances are a metric, the optimum equals the traveling salesman optimum (p. 569); and on the data of Table I every run of the procedure ends with total distance 290.

Significance

The goal is the specification the paper's procedure meets: it always terminates, never gets stuck, and outputs routes the fleet can actually drive, with the mileage the half-matrix bookkeeping predicts. The equivalence of the Table II test with truck feasibility is the reason the procedure can check capacities by counting columns instead of solving an assignment problem; it is a nested-class instance of Hall's marriage condition and is reusable for any routing or bin-assignment problem with ordered vehicle classes.

None of these statements is formalized anywhere, and the paper does not prove them. The paper makes no claim of optimality ("near-optimal", p. 568, is not quantified), and the mission does not either. A formal model of the procedure as a nondeterministic transition system is a base on which later results about savings heuristics (worst-case ratios, parallel and sequential variants) can be stated.

Difficulty

The obvious argument for termination, "each link removes a run", needs the invariant that every reachable state is a partition of the customers into runs; the procedure manipulates ordered lists and reverses runs, so the invariant must be carried through every step. Feasibility is not preserved by an arbitrary link but only by one that passes condition (III), and turning the column test into an actual assignment of runs to trucks is a matching argument that fails without both x1=∞x_1=\inftyx1​=∞ and the ordering of the capacities. Because ties are broken arbitrarily, every statement must hold for all runs of a nondeterministic procedure, not for one canonical execution. The worked example requires following every tie-break.

Formalization scope

Points are Fin (M+1) with depot 0, and a run's length is SupplyChainTheory.routeCost from the referenced module SupplyChainTheory_vrp. Capacity class i : Fin (n+1) is the paper's Ci+1C_{i+1}Ci+1​; availabilities are in ℕ∞; loads and capacities are real. A state is a list of runs, each an ordered list of customers; the matrix ttt and the vector QQQ are computed from the state. The procedure is a step relation, and every invariant is stated for reachable states. Termination is Acc of the step relation at the initial state.

Choices committed to:

  • distances are arbitrary real, symmetric numbers (the half matrix, p. 573); no nonnegativity or triangle inequality is assumed in the goal, and savings may be negative;
  • every run: ties are free, as the paper suggests choosing randomly;
  • reachable states: invariants are not claimed for arbitrary lists of runs;
  • Table II is read cumulatively: column "Over CiC_iCi​" compares runs with load >Ci>C_i>Ci​ against all trucks of capacity >Ci>C_i>Ci​, as the printed Tables II, IV and VI show;
  • x1=∞x_1=\inftyx1​=∞ and C1<⋯<CnC_1<\dots<C_nC1​<⋯<Cn​ are hypotheses; qj≤Cnq_j\le C_nqj​≤Cn​ is not separately assumed, since it follows from the initial Table II test;
  • the initial one-truck-per-customer allocation is assumed feasible (p. 572);
  • the metric hypotheses enter only the traveling-salesman milestone.

A correctness claim only about final states, without termination and progress, would hold for a procedure with no moves; a step relation with a fixed tie-break would prove less than the paper; invariants for arbitrary states are false; and a mileage identity for an arbitrary partition says nothing about the procedure's output. None of these is the target.

Not formalized: the informal C1≪∑qjC_1\ll\sum q_jC1​≪∑qj​, the shadow-cost reading of p. 571, the decomposition savings (2)–(5) of the general scheme, the load-splitting reduction of pp. 572–573, the Dantzig–Ramser methods, and the empirical comparisons and appendices.

Contributions welcome: proofs of the milestones, in particular the Table II equivalence, which needs a Hall-type argument for nested classes, and a decision procedure for the worked example.

Selected references

  • G. Clarke and J. W. Wright, Scheduling of vehicles from a central depot to a number of delivery points, Operations Research 12(4) (1964), 568–581. https://doi.org/10.1287/opre.12.4.568
  • G. B. Dantzig and J. H. Ramser, The truck dispatching problem, Management Science 6(1) (1959), 80–91. https://doi.org/10.1287/mnsc.6.1.80
  • P. Hall, On representatives of subsets, Journal of the London Mathematical Society 10 (1935), 26–30. https://doi.org/10.1112/jlms/s1-10.37.26
12 thms2 active usersReviewed
CombinatoricsOperations ResearchOptimization·Captain: mikedeng1

One-Processor Scheduling with Symmetric Earliness and Tardiness Penalties 2: For a Fixed Task Order, the Block-Shifting Algorithm Minimizes the Total DiscrepancyResearch Paper

Motivation

A task may have a preferred execution time because a material delivery, external event, or downstream operation is timed to it. Starting early can be as costly as starting late. Garey, Tarjan, and Wilfong study this situation on one processor, where tasks cannot overlap but idle time between tasks is permitted. Their total-discrepancy problem is hard when the execution order is free; fixing the order leaves a substantial timing problem because each start can still move and can force changes to earlier starts. The paper gives an explicit scheduling procedure for that case and proves that it minimizes the sum of deviations from preferred starts (Garey, Tarjan, and Wilfong, 1988, §§1–2).

This mission targets that procedure and its correctness theorem. It also records the paper's equal-length result: when task lengths are identical, a minimum-cost schedule exists in preferred-start order, so the fixed-order procedure applies after sorting. These are two precise claims about total discrepancy, distinct from the paper's separate maximum-discrepancy problem.

Setting

There are nnn tasks, indexed i=0,…,n−1i=0,\ldots,n-1i=0,…,n−1. Task iii has a nonnegative length lil_ili​, a nonnegative preferred starting time aia_iai​, and an actual starting time sis_isi​. Once started, it occupies the one processor until si+lis_i+l_isi​+li​. Each start must be nonnegative. For the fixed-order problem, task iii must finish before task i+1i+1i+1 starts, so si+li≤si+1s_i+l_i\le s_{i+1}si​+li​≤si+1​. This permits idle time when the inequality is strict. The task's discrepancy is ∣si−ai∣|s_i-a_i|∣si​−ai​∣; because its preferred completion is ai+lia_i+l_iai​+li​, this is also its absolute completion-time discrepancy. The total discrepancy is

cost⁡n(s)=∑i=0n−1∣si−ai∣.\operatorname{cost}_n(s)=\sum_{i=0}^{n-1}|s_i-a_i|.costn​(s)=i=0∑n−1​∣si​−ai​∣.

A block is a maximal consecutive set of tasks with no idle time between neighboring tasks. Within a block, Decrease counts tasks whose actual starts are later than preferred, and Increase counts tasks whose actual starts are no later than preferred. These names describe the effect of moving the entire block earlier: the discrepancy of a Decrease task falls initially, whereas that of an Increase task rises. The algorithm's state is a schedule SnS_nSn​ for the first nnn tasks. It inserts the next task at its preferred start when the previous task has finished, and at that finish time otherwise. In the latter case it may move the final block earlier until one of the paper's stopping events occurs: the block reaches time zero, a late task reaches its preferred start, or the block meets its predecessor (§2.2, p. 337).

For the equal-length result, schedules may execute tasks in any order. Two distinct tasks are feasible together when one completes before the other starts; meeting at endpoints is allowed. The objective remains the same sum of absolute discrepancies.

Formalization targets

Fixed-order optimality

The main target is the paper's Theorem 2. For all nonnegative task data and every nnn, the actual schedule SnS_nSn​ produced by the block-shifting algorithm is feasible and satisfies

cost⁡n(Sn)≤cost⁡n(s)for every feasible fixed-order schedule s.\operatorname{cost}_n(S_n)\le\operatorname{cost}_n(s) \qquad\text{for every feasible fixed-order schedule }s.costn​(Sn​)≤costn​(s)for every feasible fixed-order schedule s.

This includes the empty schedule and schedules with idle time. The milestone list follows the paper's own assertions: a balanced final block can move earlier without changing cost; every block of SnS_nSn​ has more Increase tasks than Decrease tasks or begins at zero (Lemma 7); and the two claims in Case 2 of the proof record the cost of adding a late task and the comparison with schedules that place it earlier (Theorem 2 and Lemma 7, p. 338).

Equal-length schedules

The companion target is Theorem 3. If every task has a common length L≥0L\ge0L≥0 and the preferred starts are indexed so that ai≤ai+1a_i\le a_{i+1}ai​≤ai+1​, then among all feasible schedules, including those with another task order, at least one minimum-cost schedule starts the tasks in index order:

∃s  [cost⁡n(s)≤cost⁡n(t) for every feasible t]with si≤si+1 whenever i+1<n.\exists s\;\bigl[ \operatorname{cost}_n(s)\le\operatorname{cost}_n(t) \text{ for every feasible }t \bigr] \quad\text{with }s_i\le s_{i+1}\text{ whenever }i+1<n.∃s[costn​(s)≤costn​(t) for every feasible t]with si​≤si+1​ whenever i+1<n.

The paper uses this statement to connect free-order equal-length scheduling to its fixed-order procedure (Theorem 3, p. 340).

Significance

Theorem 2 certifies an explicit schedule, not just the existence of an optimum. It fixes the objective value for a prescribed execution order and gives a baseline against which any other legal timing of the same tasks can be compared. Theorem 3 supplies the ordering fact needed to use that result when all lengths agree. Together they explain why a problem that is difficult for unrestricted task lengths still has these structured solvable cases (Garey, Tarjan, and Wilfong, 1988, abstract and §2.5).

The paper proves both theorems on paper. The work here is to formalize its schedule construction, cost, block boundaries, and comparison classes in Lean, then obtain machine-checked proofs of the stated targets. The draft theorem declarations compile with proof placeholders; this proposal does not claim that they are already machine-checked results. A completed development would make the model and the algorithm available for later formal work on scheduling with idle time and symmetric earliness and tardiness penalties.

Difficulty

Moving a task closer to its preferred start can move neighboring tasks farther from theirs. A simple task-by-task choice therefore does not establish global optimality. Nor does a count of late and early tasks in one block, by itself, justify arbitrary earlier movements of individual tasks. The difficult comparison in the paper is between the algorithm's schedule and a competing feasible schedule whose new task starts earlier: the whole final block and its constrained relative movements matter. The proof also has to account for the boundary at time zero and for blocks that merge when shifted. These are the reasons the explicit procedure and its block invariant need careful statements (§§2.2–2.3, pp. 337–338).

Formalization scope

The Lean development represents task data and starts as functions from natural-number indices to real numbers; only indices below nnn count. Task iii in Lean is the paper's Ti+1T_{i+1}Ti+1​. Preferred times, lengths, and legal starting times are nonnegative. The start-time condition is a standing convention used by the paper's algorithm, especially its zero-boundary stopping rule. Fixed-order feasibility requires successive tasks to be separated by at least the earlier task's length; unrestricted feasibility uses pairwise nonoverlap. An empty schedule is legal and has cost zero. The representation allows zero-length tasks, as does the paper's li≥0l_i\ge0li​≥0 model.

The algorithm is defined by its stated insertion and single-block-shift operations. Defining SnS_nSn​ as a chosen minimizer would erase the content of Theorem 2; the goal also explicitly asserts feasibility so that an illegal low-cost function cannot qualify. Theorem 3 compares with every feasible unrestricted-order schedule, not just schedules already in preferred-start order. The core definitions, the block invariant, and the cost comparisons are useful beyond this particular proof. Formalizing the paper's running-time bounds and heap implementation is outside this mission.

Selected references

  • Michael R. Garey, Robert E. Tarjan, and Gordon T. Wilfong, One-Processor Scheduling with Symmetric Earliness and Tardiness Penalties, Mathematics of Operations Research 13(2), 330–348, 1988. DOI: 10.1287/moor.13.2.330.
6 thms1 active userReviewed
CombinatoricsOperations ResearchTheoretical Computer Science·Captain: mikedeng1

One-Processor Scheduling with Symmetric Earliness and Tardiness Penalties 1: Minimizing the Total Discrepancy from Preferred Times Is NP-CompleteResearch Paper

Motivation

Scheduling with earliness and tardiness penalties asks for schedules in which a job finishing early is as undesirable as a job finishing late. The model fits production planned for just-in-time delivery, where finished goods held before their due date cost money, and sequences of experiments tied to fixed external events. It departs from classical scheduling, in which finishing early is never penalized.

Garey, Tarjan and Wilfong (Math. Oper. Res. 13 (1988) 330–348) study the symmetric version on one processor: each task has a preferred starting time, and the penalty is the absolute deviation from it. Their §2.1 settles the complexity of the most natural objective, the sum of these deviations, by proving it NP-complete. The result explains why the rest of their paper, and much of the later literature, turns to special cases that can be solved efficiently: a fixed task order, equal task lengths, or the maximum deviation instead of the sum.

A short history of the model:

  • Kanet (1981) minimized total absolute deviation from a common due date that is large enough not to constrain the schedule, by a sorting rule. The special case in the middle of §2.1 is the midtime version of this problem.
  • Garey, Tarjan and Wilfong (1988) proved the problem with arbitrary preferred times NP-complete (THEOREM 1, this mission), and gave an O(Nlog⁡N)O(N\log N)O(NlogN) algorithm for a fixed task order.
  • Hall, Kubiak and Sethi (1991) proved that the common-due-date problem becomes NP-hard when the due date is restrictive. The reduction of THEOREM 1 already uses a common preferred midtime that is not large, together with one extra task that pins the right end.

Setting

There are NNN tasks T1,…,TNT_1,\dots,T_NT1​,…,TN​. Task TiT_iTi​ has a length lil_ili​ and a preferred midtime MiM_iMi​. A schedule SSS assigns every task a starting time si≥0s_i\ge0si​≥0 such that no two tasks overlap on the single processor: for i≠ji\ne ji=j, either si+li≤sjs_i+l_i\le s_jsi​+li​≤sj​ or sj+lj≤sis_j+l_j\le s_isj​+lj​≤si​. Idle time is allowed. The actual midtime of TiT_iTi​ is mi(S)=si+li/2m_i(S)=s_i+l_i/2mi​(S)=si​+li​/2, and the total discrepancy of SSS is

cost(S)=∑i=1N∣mi(S)−Mi∣.\mathrm{cost}(S)=\sum_{i=1}^N |m_i(S)-M_i| .cost(S)=i=1∑N​∣mi​(S)−Mi​∣.

The paper works with midtimes because the special case below is then symmetric. Preferred midtimes and preferred starting times aia_iai​ are interchangeable through ai=Mi−li/2a_i=M_i-l_i/2ai​=Mi​−li​/2.

Total discrepancy (the decision problem). Given N,k∈Z+N,k\in\mathbb Z^+N,k∈Z+ and Mi,li∈Z+M_i,l_i\in\mathbb Z^+Mi​,li​∈Z+, is there a schedule with cost(S)≤k\mathrm{cost}(S)\le kcost(S)≤k?

Even-odd partition. Given positive integers x1<x2<⋯<x2nx_1<x_2<\dots<x_{2n}x1​<x2​<⋯<x2n​, can they be split into two sets of equal sum so that each set contains exactly one of x2i−1,x2ix_{2i-1},x_{2i}x2i−1​,x2i​ for every iii?

The special case. For tasks T0,…,T2nT_0,\dots,T_{2n}T0​,…,T2n​ with 0<l0<l1<⋯<l2n0<l_0<l_1<\dots<l_{2n}0<l0​<l1​<⋯<l2n​ and one common preferred midtime M>∑iliM>\sum_i l_iM>∑i​li​, write A(S)={Ti:mi(S)<M}A(S)=\{T_i: m_i(S)<M\}A(S)={Ti​:mi​(S)<M} and B(S)={Ti:mi(S)>M}B(S)=\{T_i:m_i(S)>M\}B(S)={Ti​:mi​(S)>M}. A schedule is ordered if, on each side of MMM, shorter tasks lie nearer to MMM. The bracket [An,…,A1,T0@M,B1,…,Bn][A_n,\dots,A_1,T_0@M,B_1,\dots,B_n][An​,…,A1​,T0​@M,B1​,…,Bn​] is the schedule that puts T0T_0T0​ at midtime MMM and packs the listed tasks against it in the listed order.

Formalization targets

Goal: THEOREM 1

Partition is NP-complete ⟹ Total discrepancy is NP-complete.\text{Partition is NP-complete}\ \Longrightarrow\ \text{Total discrepancy is NP-complete.}Partition is NP-complete ⟹ Total discrepancy is NP-complete.

The hypothesis is the one result the paper imports (Garey and Johnson, 1979). The conclusion includes membership in NP and polynomial-time many-one reductions from every NP language, with Turing machines as the model of computation.

Milestones, in attack order

  1. Even-odd partition is in NP; the instance x1=1x_1=1x1​=1, x2i=x2i−1+yix_{2i}=x_{2i-1}+y_ix2i​=x2i−1​+yi​, x2i+1=x2i+1x_{2i+1}=x_{2i}+1x2i+1​=x2i​+1 built from a Partition instance YYY is a yes-instance if and only if YYY is; and LEMMA 1, even-odd partition is NP-complete.
  2. The special case: a minimum cost schedule has no gaps and is ordered; LEMMA 2 (some mi(S)=Mm_i(S)=Mmi​(S)=M), LEMMA 3 (∣A(S)∣=∣B(S)∣|A(S)|=|B(S)|∣A(S)∣=∣B(S)∣), LEMMA 4 (m0(S)=Mm_0(S)=Mm0​(S)=M), LEMMA 5 (swapping AiA_iAi​ and BiB_iBi​ in a bracket keeps the cost), LEMMA 6 ({Ai,Bi}={T2i,T2i−1}\{A_i,B_i\}=\{T_{2i},T_{2i-1}\}{Ai​,Bi​}={T2i​,T2i−1​} in a minimum cost bracket), and the minimum cost
k=∑i=1n(l2i+l2i−1)(n−i+12)+l0 n.k=\sum_{i=1}^n(l_{2i}+l_{2i-1})\left(n-i+\tfrac12\right)+l_0\,n .k=i=1∑n​(l2i​+l2i−1​)(n−i+21​)+l0​n.
  1. At the midtime M=12∑i=02nliM=\frac12\sum_{i=0}^{2n}l_iM=21​∑i=02n​li​ used in the reduction, every schedule of T0,…,T2nT_0,\dots,T_{2n}T0​,…,T2n​ costs at least kkk; equality forces the ordered, gap-free form in item 2.
  2. The reduction: the instance D with l0=x1−1l_0=x_1-1l0​=x1​−1, li=xil_i=x_ili​=xi​, l2n+1=2l_{2n+1}=2l2n+1​=2, Mj=M=∑i≤2nli/2M_j=M=\sum_{i\le 2n}l_i/2Mj​=M=∑i≤2n​li​/2, M2n+1=2M+1M_{2n+1}=2M+1M2n+1​=2M+1 has a schedule of cost at most kkk if and only if XXX has an even-odd partition. Total discrepancy is in NP.

Significance

THEOREM 1 is the hardness boundary for one-processor scheduling with symmetric earliness–tardiness penalties and arbitrary preferred times. It is the reason exact algorithms for this objective are enumerative, and the reason polynomial results are sought under extra structure, such as the fixed-order algorithm of the same paper. The special-case lemmas characterize every optimal schedule for a common, unrestrictive midtime, not just one of them: shortest task centered at MMM, the iii-th pair of lengths in the iii-th positions on either side, either member on either side. This characterization holds independently of the reduction.

The result has been proved since 1988, and no machine-checked version of it is known to us. A formalization adds three things. First, the parts the paper calls "straightforward" or "a simple exercise", membership of both problems in NP. Second, the two places where the published argument is imprecise. The instance D has half-integer midtimes and threshold although the decision problem asks for integers, so a correct reduction must rescale. And the special-case lemmas are proved for a large midtime but applied with M=∑ili/2M=\sum_i l_i/2M=∑i​li​/2, so they must be restated for every MMM. Third, a reusable formal treatment of absolute-deviation scheduling objectives and of reductions between number problems written in binary.

Difficulty

The obvious argument fails at the step from the special case to the instance D. The lemmas on pp. 333–336 assume the common midtime is large, so that the constraint si≥0s_i\ge0si​≥0 never binds. In D the midtime is M=∑i=02nli/2M=\sum_{i=0}^{2n}l_i/2M=∑i=02n​li​/2, exactly half the total length, and the reduction works because the constraint binds. The tasks before MMM must fit in [0,M−l0/2][0,M-l_0/2][0,M−l0​/2], and the extra task T2n+1T_{2n+1}T2n+1​ must sit at [2M,2M+2][2M,2M+2][2M,2M+2]. Together these force the two sides to have equal total length. A proof that only cites the large-MMM lemmas proves nothing about D. Conversely, dropping si≥0s_i\ge 0si​≥0 makes the reduction false: put the shorter element of every pair after MMM.

The other obstacle is the complexity bookkeeping. NP-completeness here means Turing machines, binary codes, and polynomial bounds, and a full proof must compute D from the code of XXX, double the times to clear the half-integers, and certify membership in NP for a problem whose schedules have real starting times. The certificate cannot be the real starting times themselves.

Formalization scope

  • Everything is real-valued except the instance codes. Schedules have real starting times si≥0s_i\ge0si​≥0, and integer data are cast to R\mathbb RR. Restricting to integer starting times would be a different problem and is not what is stated.
  • Nonnegative starting times are a standing assumption. The paper uses them ("scheduled between 0 and M−l0/2M-l_0/2M−l0​/2", p. 336) without writing them into the model. Nonoverlap is "one task finishes before the other starts", the reading of "intersect only at their endpoints".
  • Tasks are indexed by Fin N from 000. In the special case TiT_iTi​ is index iii, and the paper's T2i−1,T2iT_{2i-1},T_{2i}T2i−1​,T2i​ (1≤i≤n1\le i\le n1≤i≤n) are the indices 2k+1,2k+22k+1,2k+22k+1,2k+2 for k=i−1k=i-1k=i−1.
  • Languages use the published CookPvsNP_defs (Cook's one-tape Turing machines, NP, NPComplete) and the published ProjSchedTW.Complexity.Encoding (four-letter alphabet and binary codes). This mission defines positivePartitionLang by restricting the imported equal-sum predicate to nonempty lists of positive integers, as on p. 333. Only codes of well-formed instances belong to the even-odd and total discrepancy languages.
  • The goal is not the combinatorial equivalence of milestone 4. It states NP-completeness, so it contains the polynomial-time computation of the reduction and membership in NP. Taking NPComplete evenOddLang as the hypothesis instead would drop LEMMA 1 and is not what is asked.
  • Running times of the algorithms of §2.2–§2.4 are out of scope for this mission, as are all results after §2.1.

Contributions welcome: proofs of any milestone, and reusable lemmas on Turing-machine computability of arithmetic on binary codes, which the two membership results and both reductions need.

Selected references

  • M. R. Garey, R. E. Tarjan, G. T. Wilfong, One-Processor Scheduling with Symmetric Earliness and Tardiness Penalties, Mathematics of Operations Research 13(2):330–348, 1988. https://doi.org/10.1287/moor.13.2.330
  • M. R. Garey, D. S. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness, W. H. Freeman, 1979.
  • J. J. Kanet, Minimizing the average deviation of job completion times about a common due date, Naval Research Logistics Quarterly 28(4):643–651, 1981. https://doi.org/10.1002/nav.3800280411
  • N. G. Hall, W. Kubiak, S. P. Sethi, Earliness–tardiness scheduling problems, II: Deviation of completion times about a restrictive common due date, Operations Research 39(5):847–856, 1991. https://doi.org/10.1287/opre.39.5.847
  • S. Cook, The P versus NP problem, Clay Mathematics Institute Millennium Problems, 2000. https://www.claymath.org/wp-content/uploads/2022/06/pvsnp.pdf
19 thms2 active usersReviewed
CombinatoricsOperations ResearchOptimization·Captain: mikedeng1

One-Processor Scheduling with Symmetric Earliness and Tardiness Penalties 3: For Maximum Discrepancy, Some Optimum Schedule Is in Standard Form and Has the Release Time PropertyResearch Paper

Motivation

In just-in-time scheduling each job has a preferred time, and finishing it early is as undesirable as finishing it late. Garey, Tarjan and Wilfong (Math. Oper. Res. 13 (1988), 330–348) study the one-processor version in which task TiT_iTi​ has a length li≥0l_i \ge 0li​≥0 and a preferred starting time ai≥0a_i \ge 0ai​≥0, and the discrepancy of a task started at time sis_isi​ is ∣si−ai∣|s_i - a_i|∣si​−ai​∣. The penalty is symmetric: earliness and tardiness cost the same. The paper shows that minimizing the total discrepancy is NP-complete, gives an O(Nlog⁡N)O(N \log N)O(NlogN) algorithm for a fixed task order, and, in §3, gives an efficient algorithm for minimizing the maximum discrepancy max⁡i∣si−ai∣\max_i |s_i - a_i|maxi​∣si​−ai​∣: a linear-time test for a given bound γ\gammaγ after an O(Nlog⁡N)O(N \log N)O(NlogN) sort, combined with a search over γ\gammaγ.

This mission formalizes the structural core of §3: the normal-form theorems (Theorem 4, Corollaries 1 and 2) on which the paper's algorithm for maximum discrepancy is built. The two companion missions of the series cover the NP-completeness result (THEOREM 1) and the fixed-order algorithm (THEOREMS 2 and 3).

Setting

Fix a bound γ≥0\gamma \ge 0γ≥0. A schedule has maximum discrepancy at most γ\gammaγ exactly when every task starts no earlier than its release time ri=max⁡{0,ai−γ}r_i = \max\{0, a_i - \gamma\}ri​=max{0,ai​−γ} and finishes no later than its deadline di=ai+li+γd_i = a_i + l_i + \gammadi​=ai​+li​+γ (p. 342). These release times and deadlines are in special form: with α=2γ\alpha = 2\gammaα=2γ, for every task

di−ri=li+αor(ri=0 and di<li+α).d_i - r_i = l_i + \alpha \quad\text{or}\quad \big(r_i = 0 \text{ and } d_i < l_i + \alpha\big).di​−ri​=li​+αor(ri​=0 and di​<li​+α).

From here on the data are arbitrary reals li≥0l_i \ge 0li​≥0, ri≥0r_i \ge 0ri​≥0, did_idi​ in special form for some α≥0\alpha \ge 0α≥0.

A schedule is an execution order σ\sigmaσ (σ(p)\sigma(p)σ(p) is the task in position ppp) with starting times sis_isi​, such that a task finishes no later than any later-positioned task starts: sσ(p)+lσ(p)≤sσ(q)s_{\sigma(p)} + l_{\sigma(p)} \le s_{\sigma(q)}sσ(p)​+lσ(p)​≤sσ(q)​ for p<qp < qp<q. It is feasible if ri≤sir_i \le s_iri​≤si​ and si+li≤dis_i + l_i \le d_isi​+li​≤di​ for every iii. Its makespan is max⁡i(si+li)\max_i (s_i + l_i)maxi​(si​+li​), and it is optimum if it is feasible and no feasible schedule has a smaller makespan.

Let TNT_NTN​ be a task of largest deadline. A schedule has the release time property if every task executed after TNT_NTN​ has release time strictly later than the starting time of TNT_NTN​. When the tasks are indexed with d1≤⋯≤dNd_1 \le \dots \le d_Nd1​≤⋯≤dN​, a schedule is in standard form with split index jjj, 0≤j≤N−10 \le j \le N-10≤j≤N−1, if it begins with an optimum schedule of T1,…,TjT_1, \dots, T_jT1​,…,Tj​, followed by TNT_NTN​ started at the maximum of rNr_NrN​ and the completion time of that first part, followed by Tj+1,…,TN−1T_{j+1}, \dots, T_{N-1}Tj+1​,…,TN−1​ in this order without idle time.

Formalization targets

Goal: Corollary 2 (p. 344)

∃ a feasible schedule  ⟹  ∃ an optimum schedule that is in standard form and has the release time property.\exists\ \text{a feasible schedule} \;\Longrightarrow\; \exists\ \text{an optimum schedule that is in standard form and has the release time property.}∃ a feasible schedule⟹∃ an optimum schedule that is in standard form and has the release time property.

Milestones

  1. Theorem 4 (pp. 342–343): if a feasible schedule exists, some optimum schedule has the release time property with respect to any task of largest deadline.
  2. The deadline split (proof of Corollary 1, p. 344): in every feasible schedule with the release time property, a task Ti≠TNT_i \neq T_NTi​=TN​ precedes TNT_NTN​ if and only if di≤sN+αd_i \le s_N + \alphadi​≤sN​+α.
  3. Corollary 1 (p. 344): some optimum schedule executes before TNT_NTN​ exactly the tasks of deadline at most β\betaβ, for some β≥0\beta \ge 0β≥0.
  4. Release before finish (p. 344): every task executed after TNT_NTN​ has ri≤sN+lNr_i \le s_N + l_Nri​≤sN​+lN​.
  5. Normalization after TNT_NTN​ (p. 344): an optimum schedule with the release time property can be changed, without moving TNT_NTN​ later and without touching the tasks before it, so that there is no idle time from the start of TNT_NTN​ on and the later tasks run in deadline order.

Two companion items state the reformulation of the maximum-discrepancy bound as release times and deadlines, and the special form with α=2γ\alpha = 2\gammaα=2γ.

Significance

Corollary 2 reduces the search for an optimum schedule of T1,…,TnT_1, \dots, T_nT1​,…,Tn​ to nnn candidates, one per split index, each assembled from an optimum schedule of a shorter prefix. This is the dynamic program of §3.2, which the paper implements in O(N)O(N)O(N) time after an O(Nlog⁡N)O(N \log N)O(NlogN) sort; combined with a search over γ\gammaγ it minimizes the maximum discrepancy. Without the special form, deciding whether one processor can meet arbitrary release times and deadlines is NP-complete (reference [4] of the paper, Garey and Johnson 1979), so the normal form is what separates the tractable case from the general one.

The results are proved in the paper; no machine-checked proof of them is known on Prove2Me. A formal proof of Corollary 2 would certify the correctness of the split-index recursion and, together with the companions, of the reduction from maximum discrepancy to this release-time/deadline problem.

Difficulty

The obvious argument fails in Theorem 4. Exchanging a straggler (a task after TNT_NTN​ released no later than TNT_NTN​ starts) with TNT_NTN​ shifts the tasks between them, and for general release times and deadlines those tasks can become infeasible. The paper's argument uses the special form at every step: a task released after TNT_NTN​ starts has ri>0r_i > 0ri​>0, hence di−ri=li+αd_i - r_i = l_i + \alphadi​−ri​=li​+α exactly, and this equality is what bounds how far tasks may move. It also needs an extremal choice of the optimum schedule (fewest tasks after TNT_NTN​, then fewest tasks between TNT_NTN​ and the first straggler), which requires showing that optimum schedules exist over the reals. The passage to standard form then combines this with an earliest-deadline exchange for the tasks after TNT_NTN​ and the replacement of the first part by an optimum sub-schedule without losing feasibility of the later tasks.

Formalization scope

Tasks are indexed by Fin N (0-based: the paper's T1,…,TNT_1, \dots, T_NT1​,…,TN​ are 0,…,N−10, \dots, N-10,…,N−1; the paper's TNT_NTN​ in Corollary 2 is the index N−1N-1N−1). All data are real. A schedule is a permutation σ : Fin N ≃ Fin N with starting times s : Fin N → ℝ; "executed before/after" refers to σ, not to a comparison of starting times, because zero-length tasks may share a starting time. Execution intervals meet at most at endpoints. The makespan is a supremum over Fin N; "optimum" quantifies over all feasible schedules, not only standard-form ones.

The standing hypotheses on every structural item are α≥0\alpha \ge 0α≥0, ri≥0r_i \ge 0ri​≥0, li≥0l_i \ge 0li​≥0 (from γ≥0\gamma \ge 0γ≥0, the max⁡{0,⋅}\max\{0, \cdot\}max{0,⋅} in rir_iri​, and nonnegative lengths); since si≥ris_i \ge r_isi​≥ri​, start times are nonnegative, as the paper assumes throughout. The special form is a hypothesis of every structural item and cannot be dropped. The paper's dummy task T0T_0T0​ (r0=d0=l0=0r_0 = d_0 = l_0 = 0r0​=d0​=l0​=0) is not a task; an empty first part completes at time 000. Corollary 1's "the set of all tasks with deadline β\betaβ or less" is read as excluding TNT_NTN​, the only reading under which it is true. The page's "(which can be assumed optimum)" is part of the standard form. The deadline-split and release-before-finish milestones are stated for every feasible schedule, as their arguments allow.

A trivializing formalization is excluded: the standard form pins TNT_NTN​'s start to max⁡(rN,C)\max(r_N, C)max(rN​,C) and the later tasks to consecutive positions in index order, so the goal is not Corollary 1 restated with an unconstrained split.

Running times (O(Nlog⁡N)O(N \log N)O(NlogN), O(N)O(N)O(N)) and the algorithm of §3.2 are out of scope. The development needs only finite permutations, finite suprema and the exchange arguments of §3.1; the existence of an optimum schedule (minimum makespan over finitely many orders, earliest-start schedules) is reusable for other single-machine problems with release times and deadlines. Proofs of any milestone, and a sorry-free proof of the existence of optimum schedules, are welcome.

Selected references

  • M. R. Garey, R. E. Tarjan, G. T. Wilfong, One-Processor Scheduling with Symmetric Earliness and Tardiness Penalties, Mathematics of Operations Research 13(2):330–348, 1988. https://doi.org/10.1287/moor.13.2.330
  • M. R. Garey, D. S. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness, W. H. Freeman, 1979 (reference [4] of the paper, cited on p. 342 for the NP-completeness of one-processor scheduling with release times and deadlines). ISBN 0-7167-1045-5
7 thms1 active userReviewed
Operations ResearchOptimizationProbability·Captain: mikedeng1

Scheduling Deteriorating Jobs on a Single Processor II: If E(X_j)/α_j and α_j/[c_j(1+α_j)] Both Increase in j, the Order 1, …, N Minimizes the Weighted Expected Completion Time (Proposition 2)Research Paper

Why deteriorating jobs need a scheduling rule

On one processor, the completion time of a job normally depends on how much work precedes it. In the model of Browne and Yechiali (1990), waiting also changes the job's own processing requirement: a job that starts later takes longer. The sequence therefore changes both when each job starts and how long subsequent jobs must wait. This matters when the goal is a weighted completion cost, because a delay to one job can raise the completion costs of many others.

The paper gives an expected-makespan ordering for this linear deterioration model and, in Proposition 2, a sufficient condition under which the original job order minimizes weighted expected completion cost. The latter is the target of this mission. Related platform work on Delayed SWPT and the AvgCompletionSched family treats weighted completion scheduling without this job-specific linear deterioration. Their additive processing-time models do not supply the completion-time object used here.

Jobs, schedules, and cost

There are NNN jobs, all available at time zero, processed one at a time on a single machine without idle time or preemption. A schedule π\piπ is a permutation of the jobs: π(k)\pi(k)π(k) is the job processed in position kkk. The paper labels positions and jobs from 111 to NNN; the Lean development labels them from 000 to N−1N-1N−1. The identity schedule π0\pi_0π0​ processes jobs in label order.

For job iii, XiX_iXi​ is its random initial processing requirement, αi\alpha_iαi​ its deterministic growth rate, and cic_ici​ its waiting cost rate. If the job starts at time ttt, its actual processing time is Yi(t)=Xi+αitY_i(t)=X_i+\alpha_i tYi​(t)=Xi​+αi​t. Deterioration stops once processing starts. Write Sk(π)S_k(\pi)Sk​(π) for the time at which the first kkk scheduled jobs have all finished. The model sets S0(π)=0S_0(\pi)=0S0​(π)=0 and

Sk+1(π)=Sk(π)+Xπ(k+1)+απ(k+1)Sk(π)S_{k+1}(\pi)=S_k(\pi)+X_{\pi(k+1)}+\alpha_{\pi(k+1)}S_k(\pi)Sk+1​(π)=Sk​(π)+Xπ(k+1)​+απ(k+1)​Sk​(π)

in the paper's one-based position notation. Thus the completion time of the job in position kkk is Sk(π)S_k(\pi)Sk​(π). Its cost is its own rate cπ(k)c_{\pi(k)}cπ(k)​ times that completion time, giving

C(π)=∑k=1Ncπ(k)Sk(π).C(\pi)=\sum_{k=1}^{N}c_{\pi(k)}S_k(\pi).C(π)=k=1∑N​cπ(k)​Sk​(π).

All of these are random quantities until an expectation is taken. Equation (2) of the paper writes SkS_kSk​ as a sum of the initial requirements multiplied by the later growth factors. Equation (8) substitutes that expression into C(π0)C(\pi_0)C(π0​). Both equations are included as milestones, stated along an arbitrary schedule by relabelling the jobs. The third milestone is the exact change in CCC from swapping two adjacent jobs. These three statements are pathwise identities, so their mathematical content does not depend on a probability distribution.

Formalization targets

The principal target is Proposition 2: if both sequences of job-indexed ratios are strictly increasing,

E(X1)α1<⋯<E(XN)αN,α1c1(1+α1)<⋯<αNcN(1+αN),\frac{E(X_1)}{\alpha_1}<\cdots<\frac{E(X_N)}{\alpha_N}, \qquad \frac{\alpha_1}{c_1(1+\alpha_1)} <\cdots< \frac{\alpha_N}{c_N(1+\alpha_N)},α1​E(X1​)​<⋯<αN​E(XN​)​,c1​(1+α1​)α1​​<⋯<cN​(1+αN​)αN​​,

then, for every permutation σ\sigmaσ,

E[C(π0)]≤E[C(σ)].E[C(\pi_0)]\le E[C(\sigma)].E[C(π0​)]≤E[C(σ)].

The first ratio compares an initial expected requirement with its growth rate. The second couples growth and the cost rate. The conclusion is global optimality over the paper's whole class of nonpreemptive, non-idling permutations. It does not assert that the identity order is the unique minimizer; strict input ratios do not by themselves justify a uniqueness claim.

The attack path records exactly the supporting statements printed in the paper: the closed completion-time formula (2), the weighted cost formula (8), and the unnumbered adjacent-interchange identity after (8). The milestone quotations preserve the paper's printed display, while the Lean statements use an arbitrary permutation where relabelling permits it. The interchange display has a multiplication dot before its second bracket; expansion for two jobs shows that the term is added. The formal statement records that correction, and the source quotation retains the printed symbol.

What the result establishes

The proposition identifies a directly checkable pair of ordering conditions under which the natural job-label order solves a weighted stochastic scheduling problem. A condition involving only E(Xi)/αiE(X_i)/\alpha_iE(Xi​)/αi​, enough for the paper's expected-makespan target, does not determine this weighted objective. The cost rates introduce another ordering requirement. The result gives a sufficient rule, not a characterization of every optimal schedule or of every parameter choice.

The mathematical result was published in 1990; this mission asks for its machine-checked formalization. A complete development will connect the processing-time recursion, the pathwise cost identities, and the expected optimality statement in Lean. The recursion and cost definitions can be reused for other finite single-machine problems in which a job's processing time depends on its start time. The milestone identities are also useful independently of the final sufficient condition, including for studying other choices of weights and ordering indices.

Where the argument is difficult

Sorting by expected initial requirement alone cannot settle the problem, because processing a job changes later start times and hence later processing times. Even sorting by the expected-makespan index leaves the cost rates unaccounted for. The value of an adjacent swap depends on the elapsed time before the pair and on the completion costs of jobs after the pair. It is not enough to compare the two jobs' own completion costs in isolation.

The source states the sufficient condition after its interchange display but does not present a full proof of the global claim. Closing the Lean goal requires connecting local comparisons to every schedule and handling the expected value of the recursively defined cost. The identities are finite, but their indices change between zero-based Lean positions and the paper's one-based display, especially at the first position and at an empty suffix.

Formalization scope

Jobs are Fin N\mathrm{Fin}\,NFinN, and a policy is an equivalence permutation with π(k)\pi(k)π(k) equal to the job in position kkk. Completion time is defined by the processing rule Yi(t)=Xi+αitY_i(t)=X_i+\alpha_i tYi​(t)=Xi​+αi​t, not by the closed form (2). At positions beyond the NNN jobs it stays constant, and theorems about the closed form restrict kkk to 0≤k≤N0\le k\le N0≤k≤N. The total cost is defined from job-weighted completion times, not from equation (8). This keeps both identities substantive.

The proposition uses a probability space and the Bochner integral of the real-valued cost. Every XiX_iXi​ is integrable, so its expectation and the finite linear combinations appearing in the cost are meaningful. Initial requirements are nonnegative at every outcome, reflecting the paper's standing positive-processing convention; strict positivity is unnecessary for the claim. Growth rates and cost rates are strictly positive. Those two assumptions make the printed ratios well-defined and support the ordering rule. The paper's common independence convention is not required for these expectations and is not assumed.

The two strict orderings are over the labels of jobs in π0\pi_0π0​, not positions of an arbitrary schedule. The conclusion compares π0\pi_0π0​ with every permutation, not only with schedules obtained by one adjacent swap. The N=0N=0N=0 and N=1N=1N=1 cases are allowed: the order conditions have no pair to compare, and there is only one permutation. Solvers may contribute the finite-sum, interchange, and integrability facts needed to link the milestones to Proposition 2. The pathwise identities require no probability assumptions and can support later variants.

Selected references

  • Browne, Sid, and Uri Yechiali, Scheduling Deteriorating Jobs on a Single Processor, Operations Research 38(3), 495–498 (1990). DOI: 10.1287/opre.38.3.495.
6 thms1 active userReviewed
CombinatoricsOperations ResearchTheoretical Computer Science·Captain: mikedeng1

Bounds on Multiprocessing Timing Anomalies 2: Scheduling the k Longest Independent Tasks Optimally First Gives ω(k)/ω₀ ≤ 1 + (1 − 1/n)/(1 + ⌊k/n⌋)Research Paper

Motivation

Parallel processing poses a basic allocation question: given tasks of known lengths and several identical processors, how much time is lost when tasks are assigned by a simple list rule instead of an optimal allocation? The finishing time is the moment the last processor completes its work. For independent tasks, a list rule starts each next task on a processor that becomes free first. Such a rule is easy to execute, but the resulting allocation can be worse than the best partition of tasks among processors. Graham's 1969 paper studies precise worst-case ratios for this model. Its Theorem 3 asks what guarantee follows when the first kkk tasks of the list are chosen among the longest and scheduled optimally before the remaining tasks are appended.

The paper also notes two endpoints of this family. With k=0k=0k=0, the rule is ordinary list scheduling and has ratio at most 2−1/n2-1/n2−1/n. With k=nk=nk=n, the nnn longest tasks can start one per processor, giving ratio at most 3/2−1/(2n)3/2-1/(2n)3/2−1/(2n). Theorem 3 expresses these as instances of one bound, including the integer jump at each multiple of nnn Graham, pp. 427–428.

Setting

There are r>0r>0r>0 independent tasks, indexed by jin{0,…,r−1}jin\{0,\ldots,r-1\}jin{0,…,r−1}, and n>0n>0n>0 identical processors, indexed by p∈{0,…,n−1}p\in\{0,\ldots,n-1\}p∈{0,…,n−1}. Task jjj takes a strictly positive time μj\mu_jμj​. A priority list LLL contains every task exactly once. Its first kkk tasks are kkk of the longest tasks; equal lengths may be ordered either way. As a processor becomes available, it takes the next task in the list. Once started, a task runs without interruption. With no precedence constraints, every unstarted task is ready, so a processor runs its assigned tasks consecutively from time zero.

An assignment σ\sigmaσ records the processor that executes each task. The load ℓp(σ)\ell_p(\sigma)ℓp​(σ) of processor ppp is the sum of its assigned task lengths. The finishing time is the largest load, ω(k)=max⁡pℓp(σ)\omega(k)=\max_p\ell_p(\sigma)ω(k)=maxp​ℓp​(σ). For a list assignment, each task is assigned to a processor whose load from earlier list tasks is smallest at that step. If two processors are tied, either can be selected without changing the finishing time. For any assignment τ\tauτ, let ωk(τ)\omega_k(\tau)ωk​(τ) be the largest load contributed by only the first kkk list tasks. The algorithm requires its own first kkk assignments to minimize ωk(τ)\omega_k(\tau)ωk​(τ) over all assignments τ\tauτ; the remaining tasks may occur in any list order.

Write ω0\omega_0ω0​ for the smallest finishing time achievable for all rrr tasks. The paper introduces it as the minimum over possible lists and later describes the same problem as minimizing the largest part sum over partitions of the task lengths Graham, pp. 421, 428. The formalization uses the partition or assignment form of ω0\omega_0ω0​.

Formalization targets

Theorem 3

For 0≤k≤r0\le k\le r0≤k≤r, when the first kkk longest tasks have an optimal prefix schedule, Graham's bound is

ω(k)ω0≤1+1−1/n1+⌊k/n⌋.\frac{\omega(k)}{\omega_0} \le 1+\frac{1-1/n}{1+\lfloor k/n\rfloor}.ω0​ω(k)​≤1+1+⌊k/n⌋1−1/n​.

Here ⌊k/n⌋\lfloor k/n\rfloor⌊k/n⌋ is the greatest integer at most k/nk/nk/n. The theorem also says the bound is best possible when kkk is divisible by nnn Graham, Theorem 3, p. 427. The equality examples are a separate companion statement in this mission.

Source milestones

The milestones state the finite-volume lower bound on ω0\omega_0ω0​, the case in which completing all tasks takes no longer than completing the first kkk, and the paper's numbered inequalities (14), (15), and (16). They use α∗\alpha^*α∗ for the greatest task length after the first kkk positions. These are individual mathematical claims from the proof on p. 427, with their original wording and formulas recorded alongside the formal statements.

Significance

The theorem gives a quantitative tradeoff between work spent optimizing a prefix and the worst-case finishing time of the full list. Its denominator is 1+⌊k/n⌋1+\lfloor k/n\rfloor1+⌊k/n⌋, so the guarantee improves when the optimized prefix contains another full processor's worth of long tasks. The example at multiples of nnn shows that the stated coefficient cannot be uniformly reduced for the algorithm as specified Graham, p. 427.

The result is proved in the paper. This mission's remaining work is a machine-checked proof of its exact statement and the source's intermediate inequalities. The published identical-machine makespan definition is reused, while the list-assignment rule, optimal prefix, and longest-remaining-task quantity are made explicit here. Those definitions can also support later work on list scheduling without precedence constraints. No machine-checked proof of Theorem 3 is claimed by this proposal.

Difficulty

An optimal schedule for the first kkk long tasks does not make the entire list optimal: short tasks appended later can affect which processor finishes last. A bound based only on average total work ignores this final imbalance; a bound based only on the largest remaining task ignores how many long tasks every assignment must place together. The proof must relate both constraints to one finishing time while preserving the floor ⌊k/n⌋\lfloor k/n\rfloor⌊k/n⌋. Replacing that floor with the real quotient changes the claim, and allowing an arbitrary prefix arrangement loses the algorithm's required optimality.

Formalization scope

Tasks and processors are finite indexed sets Fin r and Fin n; their zero-based indices correspond to the paper's one-based TjT_jTj​ and PiP_iPi​. Task lengths are positive real numbers, and both rrr and nnn are positive. The list is a permutation, not merely a sequence that might omit or repeat a task. The condition k≤rk\le rk≤r is explicit because choosing kkk tasks from rrr requires it; the paper treats r>kr>kr>k inside the proof and the case k=rk=rk=r is covered by the theorem. There is no precedence relation in this mission.

The list rule is a predicate on assignments: each next task goes to a processor with least current load. It omits the paper's smaller-index tie convention, since tied identical processors can be interchanged without changing the finishing time. The first kkk positions must contain kkk longest tasks, and their assignment must minimize the prefix finishing time among all assignments of those tasks. Those conditions are part of the goal; the inequalities (14)–(16) are conclusions to establish, not assumptions of the goal. A separate existence statement and a checked concrete instance ensure the list predicate is satisfiable.

All maxima and minima range over finite nonempty processor or assignment sets. The optimum is a minimum over assignments, equivalent to the paper's minimum over lists in the independent-task model. The quantity α∗\alpha^*α∗ is the largest duration outside the prefix when k<rk<rk<r, and is defined as zero when none remains; statements using it require k<rk<rk<r. Division is by n>0n>0n>0 and by ω0>0\omega_0>0ω0​>0. Lean's natural-number quotient represents ⌊k/n⌋\lfloor k/n\rfloor⌊k/n⌋; real subtraction is used for coefficients such as n−1n-1n−1. Contributions toward the finite load identities, the optimum-over-lists equivalence, and proofs of the listed bounds are within scope.

Selected references

  • R. L. Graham, Bounds on Multiprocessing Timing Anomalies, SIAM Journal on Applied Mathematics 17(2), 416–429, 1969. DOI: 10.1137/0117039.
8 thms1 active userReviewed
CombinatoricsOperations ResearchOptimization·Captain: mikedeng1

Optimization and Approximation in Deterministic Sequencing and Scheduling: A Survey 1: The Optimal Two-Machine Open Shop Makespan Is max{T₁, T₂, maxⱼ(aⱼ + bⱼ)}Research Paper

Motivation

Shop scheduling asks how to sequence jobs that each need processing on several machines. In an open shop, a job's operations may be executed in any order, as in testing stations, repair bays, or classroom and examination timetables, where the order in which a candidate visits the stations is irrelevant. The objective studied here is the makespan Cmax⁡C_{\max}Cmax​, the time at which the last operation finishes.

The survey of Graham, Lawler, Lenstra and Rinnooy Kan (Ann. Discrete Math. 5, 1979) introduced the three-field notation α∣β∣γ\alpha|\beta|\gammaα∣β∣γ that the scheduling literature still uses, and classified the complexity of the problems it names. For the open shop, its §5.2.1 presents a simplified exposition of the result of Gonzalez and Sahni (J. ACM 23, 1976): with two machines and no preemption, the obvious lower bound on the makespan is always achieved. The same page records that the three-machine case O3∥Cmax⁡O3\|C_{\max}O3∥Cmax​ is binary NP-hard, so two machines is exactly where the problem is easy.

Timeline. Gonzalez and Sahni (1976) gave the linear-time algorithm for O2∥Cmax⁡O2\|C_{\max}O2∥Cmax​, proved NP-hardness for O3∥Cmax⁡O3\|C_{\max}O3∥Cmax​, and gave a polynomial algorithm for the preemptive problem O∣pmtn∣Cmax⁡O|pmtn|C_{\max}O∣pmtn∣Cmax​. Graham et al. (1979, §5.2.1) gave the shorter construction formalized here, and observed (§5.2.2) that it implies preemption brings no advantage for m=2m = 2m=2. Lenstra (cited as forthcoming in the survey) showed O2∣rj∣Cmax⁡O2|r_j|C_{\max}O2∣rj​∣Cmax​, O2∣tree∣Cmax⁡O2|tree|C_{\max}O2∣tree∣Cmax​ and O∥Cmax⁡O\|C_{\max}O∥Cmax​ unary NP-hard.

Setting

There are nnn jobs J1,…,JnJ_1, \dots, J_nJ1​,…,Jn​ and two machines M1M_1M1​, M2M_2M2​. Job JjJ_jJj​ has an operation on M1M_1M1​ of length aj≥0a_j \ge 0aj​≥0 and an operation on M2M_2M2​ of length bj≥0b_j \ge 0bj​≥0. There is no preemption, and every job is available at time 000. A schedule assigns start times s1(j)s_1(j)s1​(j) and s2(j)s_2(j)s2​(j) to the two operations of JjJ_jJj​, which then occupy [s1(j),s1(j)+aj)[s_1(j), s_1(j)+a_j)[s1​(j),s1​(j)+aj​) on M1M_1M1​ and [s2(j),s2(j)+bj)[s_2(j), s_2(j)+b_j)[s2​(j),s2​(j)+bj​) on M2M_2M2​.

A schedule is feasible if

  1. all start times are nonnegative;
  2. each machine processes at most one job at a time: the intervals of distinct jobs on the same machine do not overlap;
  3. each job is processed on at most one machine at a time: the two intervals of the same job do not overlap, in either order.

Write T1=∑jajT_1 = \sum_j a_jT1​=∑j​aj​ and T2=∑jbjT_2 = \sum_j b_jT2​=∑j​bj​ for the two machine loads. The survey's construction uses the sets

A={Jj∣aj≥bj},B={Jj∣aj<bj},A = \{J_j \mid a_j \ge b_j\}, \qquad B = \{J_j \mid a_j < b_j\},A={Jj​∣aj​≥bj​},B={Jj​∣aj​<bj​},

two distinct jobs JrJ_rJr​, JlJ_lJl​ with ar≥max⁡Jj∈Abja_r \ge \max_{J_j \in A} b_jar​≥maxJj​∈A​bj​ and bl≥max⁡Jj∈Bajb_l \ge \max_{J_j \in B} a_jbl​≥maxJj​∈B​aj​, and A′=A−{Jr,Jl}A' = A - \{J_r, J_l\}A′=A−{Jr​,Jl​}, B′=B−{Jr,Jl}B' = B - \{J_r, J_l\}B′=B−{Jr​,Jl​}.

Formalization targets

Goal: the optimal makespan

Cmax⁡∗=max⁡{T1, T2, max⁡j (aj+bj)},C^*_{\max} = \max\Big\{T_1,\ T_2,\ \max_j\,(a_j + b_j)\Big\},Cmax∗​=max{T1​, T2​, jmax​(aj​+bj​)},

and the optimum is attained. Formally, for every T≥0T \ge 0T≥0: a feasible schedule completing every operation by TTT exists if and only if T1≤TT_1 \le TT1​≤T, T2≤TT_2 \le TT2​≤T and aj+bj≤Ta_j + b_j \le Taj​+bj​≤T for all jjj. The goal mentions neither AAA, BBB, JrJ_rJr​, JlJ_lJl​ nor the case analysis; those are the milestones.

Milestones (in the order of the argument)

  1. Two distinct jobs JrJ_rJr​, JlJ_lJl​ with the required bounds exist when n≥2n \ge 2n≥2.
  2. Fig. 5.1: the blocks B′∪{Jl}B' \cup \{J_l\}B′∪{Jl​} and A′∪{Jr}A' \cup \{J_r\}A′∪{Jr​}, with A′A'A′ and B′B'B′ in arbitrary order, have feasible staircase schedules without idle time.
  3. Fig. 5.2: if T1−al≥T2−brT_1 - a_l \ge T_2 - b_rT1​−al​≥T2​−br​, the blocks combine into a feasible schedule of all jobs ending by T1+brT_1 + b_rT1​+br​.
  4. Case (1): if moreover ar≤T2−bra_r \le T_2 - b_rar​≤T2​−br​, some feasible schedule has length at most max⁡{T1,T2}\max\{T_1, T_2\}max{T1​,T2​}.
  5. Case (2): if moreover ar>T2−bra_r > T_2 - b_rar​>T2​−br​, some feasible schedule has length at most max⁡{T1,ar+br}\max\{T_1, a_r + b_r\}max{T1​,ar​+br​}.
  6. The symmetric case T1−al<T2−brT_1 - a_l < T_2 - b_rT1​−al​<T2​−br​: some feasible schedule has length at most max⁡{T1,T2,al+bl}\max\{T_1, T_2, a_l + b_l\}max{T1​,T2​,al​+bl​}.
  7. The lower bound: every feasible schedule has Cmax⁡≥max⁡{T1,T2,max⁡j(aj+bj)}C_{\max} \ge \max\{T_1, T_2, \max_j(a_j + b_j)\}Cmax​≥max{T1​,T2​,maxj​(aj​+bj​)}.

Significance

The result. The theorem gives a closed form for the optimal makespan of a two-machine open shop, together with a linear-time construction of an optimal schedule. The survey uses it immediately: since the bound is also a lower bound for preemptive schedules, O2∣pmtn∣Cmax⁡O2|pmtn|C_{\max}O2∣pmtn∣Cmax​ is solved by the same schedules, so preemption gives no advantage on two machines (§5.2.2). It is the standard example of a shop problem whose trivial lower bound is tight, and the contrast with the binary NP-hard O3∥Cmax⁡O3\|C_{\max}O3∥Cmax​ marks the complexity boundary for nonpreemptive open shops.

Formalizing it. The result is classical and proved on paper; no machine-checked proof is known to exist on this platform. The mission produces a reusable model of nonpreemptive two-machine open-shop schedules with real processing times, a verified lower bound, and a verified constructive argument. Unlike many existence-of-schedule results, the survey's construction is explicit (orders and start times), so it can be formalized directly rather than through an abstract existence argument.

Difficulty

The lower bound is the easy half. The difficulty is the construction: a schedule must meet the bound simultaneously on both machines and for every job. The natural first idea, running every job on M1M_1M1​ then M2M_2M2​ in some order (a flow-shop schedule), fails: Johnson's rule then gives a makespan that can exceed max⁡{T1,T2,max⁡j(aj+bj)}\max\{T_1, T_2, \max_j(a_j+b_j)\}max{T1​,T2​,maxj​(aj​+bj​)}, because the open shop needs some job to visit M2M_2M2​ first. The survey's construction moves exactly one job, JrJ_rJr​, to the front of M2M_2M2​, and its correctness depends on the choice of JrJ_rJr​ and JlJ_lJl​ and on the case split on T1−alT_1 - a_lT1​−al​ versus T2−brT_2 - b_rT2​−br​. Figures 5.3 and 5.4 are drawn for T1≥T2T_1 \ge T_2T1​≥T2​; in the other subcases the start times shown in the figures need adjustment, and the formal statements of the cases assert lengths rather than the figures' exact start times.

Formalization scope

All declarations live in the namespace SchedSurvey.O2. Jobs are Fin n, 0-based (JjJ_jJj​ is index j−1j-1j−1). Processing times and start times are real numbers with aj,bj≥0a_j, b_j \ge 0aj​,bj​≥0; the survey's integer data are a special case, and every claim of §5.2.1 holds over the reals. A schedule is a pair of start-time functions s₁ s₂ : Fin n → ℝ. Interval non-overlap is s + p ≤ s' ∨ s' + p' ≤ s, so touching intervals are allowed and a zero-length operation occupies nothing. Feasibility (IsFeasible) contains both disjointness constraints of §2.1, the machine constraint and the job constraint, with the two operations of a job in either order. The job constraint is essential: without it the optimum would be max⁡{T1,T2}\max\{T_1, T_2\}max{T1​,T2​} and the goal false.

"Length at most LLL" is CompletesBy a b S L: every operation ends by LLL. Optimality is stated in threshold form, which avoids taking a supremum or infimum over a possibly empty set and is equivalent to "Cmax⁡∗C^*_{\max}Cmax∗​ equals the maximum and is attained". A maximum over AAA or BBB appears as a bound on every member, which is also correct for empty AAA or BBB. The orders of A′A'A′ and B′B'B′ are duplicate-free lists whose members are exactly those sets; back-to-back start times are given by contigStart.

The milestone on the choice of JrJ_rJr​, JlJ_lJl​ assumes n≥2n \ge 2n≥2, which the page presupposes; the goal does not, and covers n≤1n \le 1n≤1 as well. The lower bound assumes T≥0T \ge 0T≥0, which matters only for n=0n = 0n=0.

A trivializing formalization is ruled out: feasibility includes both disjointness constraints and nonnegative start times, the threshold is quantified over all T≥0T \ge 0T≥0, and no constant is fixed.

Contributions welcome: proofs of the lower bound (a sum of disjoint intervals inside [0,T][0, T][0,T]), of the list-based block lemmas, of the case lemmas, and of the goal from them. The interval and back-to-back-schedule lemmas are reusable for other shop problems.

Selected references

  • R.L. Graham, E.L. Lawler, J.K. Lenstra, A.H.G. Rinnooy Kan, Optimization and approximation in deterministic sequencing and scheduling: a survey, Annals of Discrete Mathematics 5 (1979) 287–326. https://doi.org/10.1016/S0167-5060(08)70356-X
  • T. Gonzalez, S. Sahni, Open shop scheduling to minimize finish time, Journal of the ACM 23(4) (1976) 665–679. https://doi.org/10.1145/321978.321985
  • S.M. Johnson, Optimal two- and three-stage production schedules with setup times included, Naval Research Logistics Quarterly 1 (1954) 61–68. https://doi.org/10.1002/nav.3800010110
9 thms1 active userReviewed
CombinatoricsOperations ResearchOptimization·Captain: mikedeng1

Optimization and Approximation in Deterministic Sequencing and Scheduling: A Survey 2: The Optimal Preemptive Open Shop Makespan Equals the Largest Machine Load or Job LengthResearch Paper

Motivation

Open shops model production and service systems in which every job must visit every machine, but the order of the visits is free: a car that needs an inspection, a wash and a tyre change, a patient who needs several tests, a student who sits several exams. The survey of Graham, Lawler, Lenstra and Rinnooy Kan (Ann. Discrete Math. 5, 1979) fixed the three-field notation α∣β∣γ\alpha|\beta|\gammaα∣β∣γ that the scheduling literature still uses, and classified the complexity of the problems it can express. Among the polynomially solvable cases, the preemptive open shop with makespan objective, O∣pmtn∣Cmax⁡O|pmtn|C_{\max}O∣pmtn∣Cmax​, is one of the few multi-machine problems whose optimal value has a closed form for any number of machines and jobs.

Timeline.

  • 1976: Gonzalez and Sahni (J. ACM 23) prove that the optimal preemptive open-shop makespan is the largest machine load or job length, and give a polynomial algorithm. In the same paper they solve O2∥Cmax⁡O2\|C_{\max}O2∥Cmax​ in linear time and show O3∥Cmax⁡O3\|C_{\max}O3∥Cmax​ NP-hard.
  • 1978: Lawler and Labetoulle (J. ACM 25) give a linear-programming treatment of preemptive scheduling on unrelated machines and reformulate the open-shop construction in terms of decrementing sets, found by an assignment problem through the Birkhoff–von Neumann theorem.
  • 1979: the survey (§5.2.2, p. 313) presents this construction as the standard argument and records the O(r+min⁡{m4,n4,r2})O(r+\min\{m^4,n^4,r^2\})O(r+min{m4,n4,r2}) bound of Gonzalez (1976), where rrr is the number of nonzero processing times.

Setting

There are mmm machines M1,…,MmM_1,\dots,M_mM1​,…,Mm​ and nnn jobs J1,…,JnJ_1,\dots,J_nJ1​,…,Jn​. Job JjJ_jJj​ consists of operations O1j,…,OmjO_{1j},\dots,O_{mj}O1j​,…,Omj​; operation OijO_{ij}Oij​ must be processed on machine MiM_iMi​ for pij≥0p_{ij}\ge 0pij​≥0 time units. The processing-time matrix is P=(pij)P=(p_{ij})P=(pij​): its rows are machines and its columns are jobs. Every job is available at time 000.

Preemption is allowed: an operation may be interrupted and resumed later. A schedule is a finite list of pieces (i,j,s,e)(i,j,s,e)(i,j,s,e), each meaning that MiM_iMi​ processes JjJ_jJj​ during [s,e)[s,e)[s,e). A schedule is feasible if

  1. every piece satisfies 0≤s≤e0\le s\le e0≤s≤e;
  2. each machine processes at most one job at a time, and each job is processed on at most one machine at a time: two pieces that share a machine or a job do not overlap;
  3. for every pair (i,j)(i,j)(i,j) the pieces of OijO_{ij}Oij​ have total length exactly pijp_{ij}pij​.

The makespan Cmax⁡C_{\max}Cmax​ is the time at which the last piece ends, and Cmax⁡∗C^*_{\max}Cmax∗​ is its minimum over feasible schedules. The load of machine MiM_iMi​ is the row sum ∑jpij\sum_j p_{ij}∑j​pij​, the length of job JjJ_jJj​ is the column sum ∑ipij\sum_i p_{ij}∑i​pij​, and

C=max⁡{max⁡j∑ipij, max⁡i∑jpij}.C=\max\Big\{\max_j \sum_i p_{ij},\ \max_i \sum_j p_{ij}\Big\}.C=max{jmax​i∑​pij​, imax​j∑​pij​}.

A row or column is tight if its sum equals CCC and slack otherwise. A decrementing set is a set SSS of strictly positive entries of PPP with exactly one element in each tight row and each tight column and at most one in each slack row and each slack column.

Formalization targets

Goal: Cmax⁡∗=CC^*_{\max}=CCmax∗​=C

For every T≥0T\ge 0T≥0,

(∃ feasible schedule with Cmax⁡≤T)  ⟺  (∑jpij≤T ∀i  and  ∑ipij≤T ∀j).\big(\exists \text{ feasible schedule with } C_{\max}\le T\big)\iff \Big(\sum_j p_{ij}\le T\ \forall i\ \text{ and }\ \sum_i p_{ij}\le T\ \forall j\Big).(∃ feasible schedule with Cmax​≤T)⟺(j∑​pij​≤T ∀i  and  i∑​pij​≤T ∀j).

This says that the optimal makespan is exactly the largest machine load or job length, and that it is attained.

Milestones (all from §5.2.2, p. 313)

  1. Lower bound Cmax⁡∗≥CC^*_{\max}\ge CCmax∗​≥C.
  2. Existence of a decrementing set for every nonzero nonnegative PPP.
  3. Positive step: for a decrementing set, the largest δ\deltaδ satisfying the constraints (1)–(3) of the survey exists and is positive.
  4. Step property: after replacing each pij∈Sp_{ij}\in Spij​∈S by max⁡{0,pij−δ}\max\{0,p_{ij}-\delta\}max{0,pij​−δ}, the largest line sum is exactly C−δC-\deltaC−δ.
  5. Partial schedule: for each pij∈Sp_{ij}\in Spij​∈S, MiM_iMi​ processes JjJ_jJj​ for min⁡{pij,δ}\min\{p_{ij},\delta\}min{pij​,δ} time units, with no machine or job used twice.
  6. Termination: every run of the procedure reaches P′=(0)P'=(0)P′=(0) within a bounded number of stages.
  7. Joining: the concatenated partial schedules form a feasible schedule with Cmax⁡≤CC_{\max}\le CCmax​≤C.

Significance

The result. The theorem turns an optimization over continuous-time schedules into the computation of m+nm+nm+n sums. It certifies optimality by a counting argument, it is the base case for preemptive open shops with release dates and due dates, and it is used elsewhere in the survey (§4.4.6) to reduce problems on unrelated machines with preemption to open-shop instances. Because a nonnegative matrix whose row and column sums are all equal is a multiple of a doubly stochastic matrix, the theorem is a scheduling form of the Birkhoff–von Neumann decomposition. It also underlies timetabling and edge-colouring results for bipartite multigraphs.

Formalizing it. The theorem has been proved since 1976 and is textbook material. No machine-checked proof is known to exist: Mathlib has the Birkhoff–von Neumann theorem for doubly stochastic matrices but no model of open-shop schedules. A formalization adds a reusable model of preemptive multi-machine schedules with both disjointness requirements, a checked proof of the decrementing-set construction, and a termination argument the survey asserts without proof.

Difficulty

The lower bound is a one-line counting argument. The difficulty is the construction of a schedule of length exactly CCC. Scheduling each machine's operations back to back gives length max⁡i∑jpij\max_i\sum_j p_{ij}maxi​∑j​pij​, but may run one job on two machines at once. Scheduling job by job has the symmetric defect. A greedy list schedule that only respects both constraints can leave machines idle and overshoot CCC. The construction must keep every tight line busy at every moment while never letting a slack line fall behind. The existence of the decrementing set at each stage is the combinatorial core: it is a Hall-type matching condition, not a local choice. Termination is also not automatic, because a careless choice of step length can produce infinitely many shrinking steps.

Formalization scope

All objects live in the namespace SchedSurvey.OPmtn. Machines and jobs are Fin m and Fin n, both 0-based, and processing times and piece endpoints are real numbers; integer data are a special case. A schedule is a List of pieces. Feasibility requires nonnegative start times, disjointness for pieces sharing a machine or a job (touching intervals allowed), and exactly pijp_{ij}pij​ units of processing for every pair (i,j)(i,j)(i,j). Every theorem assumes pij≥0p_{ij}\ge 0pij​≥0.

"CCC is the maximum" is the predicate IsMaxLoad P C: all line sums are at most CCC and one equals CCC. The goal is stated in threshold form and mentions no maximum at all. The display defining CCC on p. 313 prints max⁡i{∑ipij}\max_i\{\sum_i p_{ij}\}maxi​{∑i​pij​} for the second term; the following sentence shows it means the row sums ∑jpij\sum_j p_{ij}∑j​pij​, and the formalization uses those. The hypothesis T≥0T\ge 0T≥0 matters only for P=0P=0P=0, where the empty schedule finishes by every TTT.

A trivializing formalization is ruled out: the goal mentions neither decrementing sets nor δ\deltaδ. Its "if" direction asserts that a schedule exists. Feasibility counts work per pair (machine, job), not per job, and forbids a job from running on two machines at once. Without either requirement the statement would be a different and easier theorem.

A complete development needs: list sums of interval lengths over disjoint intervals, the existence of decrementing sets (via Birkhoff–von Neumann, König's theorem or Hall's theorem on the bipartite graph of positive entries), the step and termination lemmas, and concatenation of schedules. The schedule model and the decrementing-set lemma are reusable for other preemptive shop problems. Contributions of alternative proofs of any milestone, for example a direct Hall-theorem proof of the existence of decrementing sets, are welcome.

Selected references

  • R. L. Graham, E. L. Lawler, J. K. Lenstra, A. H. G. Rinnooy Kan, Optimization and approximation in deterministic sequencing and scheduling: a survey, Annals of Discrete Mathematics 5 (1979) 287–326. https://doi.org/10.1016/S0167-5060(08)70356-X
  • T. Gonzalez, S. Sahni, Open shop scheduling to minimize finish time, Journal of the ACM 23 (1976) 665–679. https://doi.org/10.1145/321978.321985
  • E. L. Lawler, J. Labetoulle, On preemptive scheduling of unrelated parallel processors by linear programming, Journal of the ACM 25 (1978) 612–619. https://doi.org/10.1145/322077.322090
9 thms1 active userReviewed
CombinatoricsOperations ResearchTheoretical Computer Science·Captain: mikedeng1

Flowshop and Jobshop Schedules: Complexity and Approximation 1: The Partition Flow Shop on Three Machines Has a Schedule of Finish Time 2T, Preemptive or Not, Iff a Partition ExistsResearch Paper

Motivation

Shop scheduling asks how to process a set of jobs, each a sequence of tasks on prescribed machines, so that all work is completed as early as possible. The flow shop, in which every job visits the machines in the same order, is the most studied of these models in operations research. For two machines, Johnson's rule (1954) computes a schedule of minimum finish time in O(nlog⁡n)O(n\log n)O(nlogn) time, and for two machines allowing interruptions (preemption) does not help. Garey, Johnson and Sethi (Math. Oper. Res. 1976) and Brucker, Lenstra and Rinnooy Kan (Mathematisch Centrum report BW 43/75, 1975; Ann. Discrete Math. 1977) showed that the non-preemptive problem becomes NP-complete with three machines.

Gonzalez and Sahni (Operations Research, 1978) extended this picture to preemptive schedules. Their Theorem 1 shows that minimizing the finish time of a three-machine flow shop is NP-complete with or without preemption, even when every job has at most two tasks of nonzero length. When every job has only one task the problem is trivial, so this is the simplest NP-complete case of the flow-shop finish-time problem. The result explains why no exact polynomial algorithm is expected and motivates the approximation results in the second half of the same paper.

Timeline:

  • 1954: Johnson, two-machine flow shop, optimal non-preemptive rule.
  • 1975: Brucker, Lenstra, Rinnooy Kan: non-preemptive three-machine flow shop NP-complete, including the case of two nonzero tasks per job (the paper's Corollary 1, which it says "is also obtained in [1]").
  • 1976: Garey, Johnson, Sethi: non-preemptive three-machine flow shop NP-complete even when the problem size is the sum of the task lengths.
  • 1978: Gonzalez, Sahni: the preemptive three-machine flow shop is NP-complete, by a reduction from PARTITION that also covers the non-preemptive case with two nonzero tasks per job.

Setting

A flow shop has m≥1m\ge1m≥1 processors P1,…,PmP_1,\dots,P_mP1​,…,Pm​ and a finite set of jobs. Task jjj of job iii must be processed on PjP_jPj​ for tj,i≥0t_{j,i}\ge 0tj,i​≥0 time units, and it can start only after task j−1j-1j−1 of the same job is completed. Task times may be zero. The schedule starts at time 000.

A preemptive schedule gives every task a finite set of pieces (s,f)(s,f)(s,f) with 0≤s<f0\le s<f0≤s<f: the task is processed on its processor during [s,f)[s,f)[s,f). Pieces on the same processor do not overlap, the pieces of a task have total length tj,it_{j,i}tj,i​, and every piece of a task starts after every piece of the earlier tasks of the same job has ended. A non-preemptive schedule processes every task in at most one piece. For a schedule SSS, fi(S)f_i(S)fi​(S) is the time at which job iii is completed and the finish time is FT(S)=max⁡ifi(S)\mathrm{FT}(S)=\max_i f_i(S)FT(S)=maxi​fi​(S).

PARTITION. A multiset S={a1,…,an}S=\{a_1,\dots,a_n\}S={a1​,…,an​} of nonnegative integers has a partition if some set uuu of indices satisfies ∑i∈uai=12∑i=1nai\sum_{i\in u}a_i=\tfrac12\sum_{i=1}^n a_i∑i∈u​ai​=21​∑i=1n​ai​.

The instance FS. With T=∑iaiT=\sum_i a_iT=∑i​ai​, the flow shop FS\mathrm{FS}FS has m=3m=3m=3 processors and n+2n+2n+2 jobs:

t⋅,i=(ai,0,ai) (1≤i≤n),t⋅,n+1=(T/2, T, 0),t⋅,n+2=(0, T, T/2),t_{\cdot,i}=(a_i,0,a_i)\ (1\le i\le n),\qquad t_{\cdot,n+1}=(T/2,\,T,\,0),\qquad t_{\cdot,n+2}=(0,\,T,\,T/2),t⋅,i​=(ai​,0,ai​) (1≤i≤n),t⋅,n+1​=(T/2,T,0),t⋅,n+2​=(0,T,T/2),

and the threshold is τ=2T\tau=2Tτ=2T. Every job has at most two nonzero tasks.

Formalization targets

Goal: Theorem 1 (p. 38)

For every nnn and every a1,…,an∈Na_1,\dots,a_n\in\mathbb Na1​,…,an​∈N:

FS has at most two nonzero tasks per job,\mathrm{FS}\ \text{has at most two nonzero tasks per job},FS has at most two nonzero tasks per job, (∃ S′ preemptive, FT(S′)≤2T)  ⟺  S has a partition,\big(\exists\,S'\ \text{preemptive},\ \mathrm{FT}(S')\le 2T\big)\iff S\ \text{has a partition},(∃S′ preemptive, FT(S′)≤2T)⟺S has a partition, (∃ S′ non-preemptive, FT(S′)≤2T)  ⟺  S has a partition.\big(\exists\,S'\ \text{non-preemptive},\ \mathrm{FT}(S')\le 2T\big)\iff S\ \text{has a partition}.(∃S′ non-preemptive, FT(S′)≤2T)⟺S has a partition.

Milestones

  • Lemma 1(a) (p. 39): a partition of SSS yields a non-preemptive schedule of FS with FT=2T\mathrm{FT}=2TFT=2T (Figure 1).
  • Observations (i)–(ii) (p. 39): in any preemptive schedule with FT≤2T\mathrm{FT}\le 2TFT≤2T, task t1,n+1t_{1,n+1}t1,n+1​ ends by TTT and task t3,n+2t_{3,n+2}t3,n+2​ starts no earlier than TTT.
  • Lemma 1(b) (p. 39): if SSS has no partition, every preemptive schedule of FS has FT>2T\mathrm{FT}>2TFT>2T.
  • Lemma 1 (p. 38): the preemptive equivalence.
  • Corollary 1 (p. 39): the non-preemptive equivalence.

Significance

The result. The equivalence shows that a polynomial-time algorithm deciding whether a three-machine flow shop (with two nonzero tasks per job) has a schedule of finish time at most τ\tauτ, preemptive or not, would decide PARTITION in polynomial time. With membership in NP (the paper's Lemma 2) it gives NP-completeness of both versions. It also marks the boundary with the polynomial cases: m=2m=2m=2 (Johnson's rule), and jobs with a single task.

Formalizing it. The result is proved in the paper; nothing here is open. To our knowledge no machine-checked proof of this reduction exists, and the platform has no formal model of preemptive shop schedules. The mission produces one: a piece-based preemptive schedule with zero task times, which subsumes the non-preemptive case, together with the first formal NP-hardness reduction for preemptive flow shops on the platform.

Difficulty

Direction (a) asks for one explicit schedule. Direction (b) must rule out every preemptive schedule of FS, and preemption is exactly what makes this delicate: a task may be split into any finite number of pieces placed anywhere on its processor, so the naive intuition that a failed partition leaves "unusable gaps" is no longer evident, since pieces of different jobs can be interleaved to fill gaps. A correct argument must therefore be an accounting of processor time over the pieces, valid for any number and position of pieces, and it must treat zero-length tasks, which occupy no processor time but still delay the next task of their job. Finally, the non-preemptive equivalence is not a formal consequence of the preemptive one alone: it uses that (a) produces a non-preemptive schedule and that (b) holds for all preemptive schedules, which include the non-preemptive ones.

Formalization scope

  • Processors are Fin 3 (P1,P2,P3P_1,P_2,P_3P1​,P2​,P3​ = 0, 1, 2), jobs of FS are Fin n ⊕ Fin 2 (Sum.inr 0 is job n+1n+1n+1, Sum.inr 1 is job n+2n+2n+2). Task times are real numbers; the PARTITION data are a : Fin n → ℕ, and "has a partition" is 2∑i∈uai=∑iai2\sum_{i\in u}a_i=\sum_i a_i2∑i∈u​ai​=∑i​ai​ in N\mathbb NN.
  • A schedule is a Finset of pieces (s,f)(s,f)(s,f) per task with the four conditions of the Setting. Non-preemptive means at most one piece per task. Zero tasks have no pieces and occupy no processor time. fi(S)f_i(S)fi​(S) and FT(S)\mathrm{FT}(S)FT(S) are maxima with baseline 000.
  • Explicit constants: T=∑iaiT=\sum_i a_iT=∑i​ai​, the times T/2T/2T/2 and TTT of jobs n+1,n+2n+1,n+2n+1,n+2, and the threshold τ=2T\tau=2Tτ=2T, as on p. 39. Lemma 1(a) states finish time exactly 2T2T2T, as the paper does.
  • Not formalized: "NP-complete", the reducibility relation "α\alphaα", membership in NP (Lemma 2, p. 40) and the polynomial computability of FS from SSS. The paper states Theorem 1, Lemma 1 and Corollary 1 as complexity claims. Their proofs establish the equivalences above for the constructed instance, and those equivalences are what is formalized.
  • No trivializing reading is admitted: the statements concern the specific instance FS built from aaa, not an arbitrary flow shop, and the schedule model rules out overlapping pieces and out-of-order tasks while still allowing zero tasks. A sorry-free check confirms that Figure 1 is a valid non-preemptive schedule of FS for S={1,1}S=\{1,1\}S={1,1}.
  • Reusable beyond this mission: the flow-shop model with preemptive pieces, and PARTITION. Proofs of the milestones and a proof of the goal from them are welcome.

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
  • P. Brucker, J. K. Lenstra, A. H. G. Rinnooy Kan, Complexity of Machine Scheduling Problems, Mathematisch Centrum report BW 43/75, 1975; Annals of Discrete Mathematics 1, 343–362, 1977. https://doi.org/10.1016/S0167-5060(08)70743-X
  • R. M. Karp, Reducibility among Combinatorial Problems, in Complexity of Computer Computations, Plenum, 85–103, 1972. https://doi.org/10.1007/978-1-4684-2001-2_9
9 thms1 active userReviewed
CombinatoricsOperations ResearchTheoretical Computer Science·Captain: mikedeng1

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 (F3∣pmtn∣Cmax⁡F3\mid pmtn\mid C_{\max}F3∣pmtn∣Cmax​ 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 m≥1m\ge 1m≥1 processors P1,…,PmP_1,\dots,P_mP1​,…,Pm​ and a finite set of jobs. Task jjj of job iii runs on PjP_jPj​ and takes time tj,i≥0t_{j,i}\ge 0tj,i​≥0; zero times are allowed. For each job, task j≥2j\ge 2j≥2 can begin only after task j−1j-1j−1 has been completed, and schedules start at time 000.

A preemptive schedule is given, as in the paper's footnote on p. 40, by finitely many pieces (s,f)(s,f)(s,f) per task: the task is processed on its processor during [s,f)[s,f)[s,f). Pieces have 0≤s<f0\le s<f0≤s<f, pieces on the same processor do not overlap, the pieces of a task have total length tj,it_{j,i}tj,i​, and a piece of task j′j'j′ starts only after every piece of every earlier task j<j′j<j'j<j′ 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 iii is fi(S)f_i(S)fi​(S), the end of its last piece, and the finish time is FT(S)=max⁡ifi(S)FT(S)=\max_i f_i(S)FT(S)=maxi​fi​(S).

3-Partition. An instance C=(a1,…,as,B)C=(a_1,\dots,a_s,B)C=(a1​,…,as​,B), s=3ts=3ts=3t, consists of a positive integer BBB and nonnegative integers aia_iai​ with ∑iai=tB\sum_i a_i=tB∑i​ai​=tB and B/4<ai<B/2B/4<a_i<B/2B/4<ai​<B/2. It has a 3-partition if {1,…,s}\{1,\dots,s\}{1,…,s} splits into ttt disjoint sets L1,…,LtL_1,\dots,L_tL1​,…,Lt​, each of three elements with ∑j∈Lkaj=B\sum_{j\in L_k}a_j=B∑j∈Lk​​aj​=B.

The instance FS. From CCC the proof of Lemma 4 builds a three-processor flow shop with s+t+2s+t+2s+t+2 jobs:

  • jobs 1,…,s1,\dots,s1,…,s: times (ai, 0, ai)(a_i,\,0,\,a_i)(ai​,0,ai​) on (P1,P2,P3)(P_1,P_2,P_3)(P1​,P2​,P3​);
  • job s+1s+1s+1: (0, 2B, B)(0,\,2B,\,B)(0,2B,B);
  • jobs s+i+1s+i+1s+i+1, 1≤i≤t−21\le i\le t-21≤i≤t−2: (B, 2B, B)(B,\,2B,\,B)(B,2B,B);
  • job s+ts+ts+t: (B, 2B, 0)(B,\,2B,\,0)(B,2B,0);
  • job s+t+1s+t+1s+t+1: (0, 0, B)(0,\,0,\,B)(0,0,B);
  • job s+t+2s+t+2s+t+2: (B, 0, 0)(B,\,0,\,0)(B,0,0).

Each processor carries total work exactly 2tB2tB2tB, and the threshold is τ=2tB\tau=2tBτ=2tB.

Formalization targets

Goal: Theorem 2, as Lemma 4's equivalence

For every 3-Partition instance CCC with t≥2t\ge 2t≥2,

∃ S preemptive schedule of FS: FT(S)≤2tB⟺C has a 3-partition,\exists\,S \text{ preemptive schedule of } FS:\ FT(S)\le 2tB \quad\Longleftrightarrow\quad C \text{ has a 3-partition},∃S preemptive schedule of FS: FT(S)≤2tB⟺C has a 3-partition,

and every task time of FSFSFS satisfies tj,i≤2Bt_{j,i}\le 2Btj,i​≤2B. The second clause records that the instance's numbers are bounded by those of CCC, the reduction's contribution to "the problem size being measured as the sum of the length of the tasks".

Milestones

  1. Lemma 3 (p. 40). For a flow shop with m≥1m\ge 1m≥1 processors, every preemptive schedule SSS can be replaced by a schedule S′S'S′ with no preemptions on P1P_1P1​ and on PmP_mPm​ and FT(S′)=FT(S)FT(S')=FT(S)FT(S′)=FT(S).
  2. Lemma 4(a) (p. 41). If CCC has a 3-partition, FSFSFS has a non-preemptive schedule with FT≤2tBFT\le 2tBFT≤2tB.
  3. First step of Lemma 4(b) (pp. 41–42). In every preemptive schedule of FSFSFS with FT≤2tBFT\le 2tBFT≤2tB, the jobs among 1,…,s1,\dots,s1,…,s whose P1P_1P1​ task is completed by time 2B2B2B have ∑t1,i=B\sum t_{1,i}=B∑t1,i​=B.
  4. Lemma 4(b) (pp. 41–42). If CCC has no 3-partition, every preemptive schedule of FSFSFS has FT>2tBFT>2tBFT>2tB.

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 P∣pmtn∣Cmax⁡P\mid pmtn\mid C_{\max}P∣pmtn∣Cmax​) 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 [0,2tB][0,2tB][0,2tB], why exactly BBB units of element jobs end on P1P_1P1​ by 2B2B2B, and how the argument restarts on [2B,2tB][2B,2tB][2B,2tB]. Lemma 3 needs an exchange argument on piece representations. Both are new for the platform.

Difficulty

The direction "3-partition ⇒\Rightarrow⇒ 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 [0,2B][0,2B][0,2B] must contain exactly three element jobs of total BBB on P1P_1P1​ 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 2B2B2B.

Formalization scope

  • Times are real numbers; the 3-Partition data are natural numbers cast to R\mathbb RR. Processors are Fin m with P1=P_1=P1​= 0; in FSFSFS, P1,P2,P3P_1,P_2,P_3P1​,P2​,P3​ are 0, 1, 2.
  • The 3-Partition instance is the published ResourceScheduling.Chain.ThreePartition (0-based indices, t parts, b =B=B=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 j<j′j<j'j<j′ 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 000, never an unattained supremum.
  • "No preemptions on PjP_jPj​" means at most one piece per task on PjP_jPj​.
  • Not formalized: "NP-complete", the reduction symbol ∝\propto∝, "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 tj,i≤2Bt_{j,i}\le 2Btj,i​≤2B on its task times.
  • Added hypothesis: t≥2t\ge 2t≥2. For t<2t<2t<2 the paper's job indices s+1s+1s+1 and s+ts+ts+t coincide with conflicting times, so the construction is undefined there.
  • The first step of Lemma 4(b) is read as: the sum of t1,it_{1,i}t1,i​ over element jobs whose P1P_1P1​ task has completed by time 2B2B2B equals BBB.
  • A trivializing formalization is ruled out: the schedules quantified over are all preemptive schedules of the specific instance FS(C)FS(C)FS(C), the threshold 2tB2tB2tB is explicit, and the validity conditions B/4<ai<B/2B/4<a_i<B/2B/4<ai​<B/2 are kept, so the schedule side cannot match the weaker "partition into ttt groups of sum BBB".

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
8 thms1 active userReviewed
CombinatoricsOperations ResearchTheoretical Computer Science·Captain: mikedeng1

Flowshop and Jobshop Schedules: Complexity and Approximation 4: The 3-Partition Job Shop on Two Machines Has a Schedule of Finish Time 2tB, Preemptive or Not, Iff a 3-Partition ExistsResearch Paper

Motivation

In a job shop, each job has an ordered list of tasks, and each task must use a specified machine. A production planner may be able to interrupt a task and resume it later, yet still be unable to find a short schedule efficiently. Gonzalez and Sahni studied how the ability to preempt changes the difficulty of minimizing the time at which all jobs are complete. Their 1978 paper establishes complexity results for flow shops and job shops and then examines approximation schedules when exact optimization is difficult (Gonzalez and Sahni, 1978).

This mission concerns the paper's two-machine construction from 3-PARTITION. It is the reduction used for their claim that finding an optimal preemptive or non-preemptive finish-time schedule remains NP-complete when input size is measured by the sum of task lengths. The formal target isolates the decision equivalence proved for the constructed instance. It gives solvers a precise schedule statement to establish without conflating the scheduling theorem with the separate complexity-class argument.

Setting

A 3-PARTITION input CCC comprises an integer t≥0t\ge0t≥0, a positive integer target BBB, and s=3ts=3ts=3t positive integer sizes a1,…,asa_1,\ldots,a_sa1​,…,as​. A valid input satisfies

∑i=1sai=tB,B/4<ai<B/2(1≤i≤s).\sum_{i=1}^{s}a_i=tB,\qquad B/4<a_i<B/2\quad(1\le i\le s).i=1∑s​ai​=tB,B/4<ai​<B/2(1≤i≤s).

It has a 3-partition when the sss indices can be assigned to ttt disjoint groups, each containing exactly three indices and having total size BBB. The strict bounds rule out groups of other cardinalities at that sum and are part of the source problem, not a convenience added for formalization. When t=0t=0t=0, the input has no sizes or groups and the empty grouping is a solution.

The paper builds a job shop JS(C)JS(C)JS(C) with machines P1,P2P_1,P_2P1​,P2​ and s+1s+1s+1 jobs. For 1≤i≤s1\le i\le s1≤i≤s, job iii has a task of length aia_iai​ on P1P_1P1​, followed by a task of length aia_iai​ on P2P_2P2​. The last job, s+1s+1s+1, has 2t2t2t tasks, each of length BBB. Its tasks alternate between the machines, starting on P2P_2P2​. This last order matters: reversing it would produce a different construction. The source gives the decision threshold τ=2tB\tau=2tBτ=2tB (Lemma 7, p. 44).

A non-preemptive schedule gives each task one continuous processing interval. A preemptive schedule may divide an operation into finitely many positive-length intervals. In either case, jobs obey their task order, distinct pieces on the same machine do not overlap, and processing starts at or after time zero. Write FT(S)FT(S)FT(S) for the time at which all tasks of schedule SSS have finished. The paper allows the same job to revisit a machine, as the final job does here.

Formalization targets

Lemma 7: the constructed instance

For every valid CCC, the main goal states both the paper's preemptive equivalence and the non-preemptive form established by its two directions:

∃S preemptive for JS(C):FT(S)≤2tB  ⟺  C has a 3-partition,∃S non-preemptive for JS(C):FT(S)≤2tB  ⟺  C has a 3-partition.\begin{aligned} \exists S\text{ preemptive for }JS(C): FT(S)\le2tB &\iff C\text{ has a 3-partition},\\ \exists S\text{ non-preemptive for }JS(C): FT(S)\le2tB &\iff C\text{ has a 3-partition}. \end{aligned}∃S preemptive for JS(C):FT(S)≤2tB∃S non-preemptive for JS(C):FT(S)≤2tB​⟺C has a 3-partition,⟺C has a 3-partition.​

The milestones follow the source's proof text: the schedule supplied by a solution in Lemma 7(a), the timing forced on the final job, the exclusion of short preemptive schedules in Lemma 7(b), and the preemptive equivalence stated in the proof. The final-job milestone describes the occupied time slots of the paper's Figure 4, independently of how many adjacent pieces a formal schedule uses.

Significance

The equivalence transfers the distinction between solvable and unsolvable 3-PARTITION inputs to an exact finish-time threshold in a job shop with only two machines. It also establishes the non-preemptive decision equivalence for this construction, because a solution yields a non-preemptive schedule while an unsolvable input rules out even the more permissive preemptive schedules. These facts supply the scheduling part of the paper's strong NP-completeness claim; membership in NP is handled separately by Lemma 6 (pp. 44–45).

The result is proved in the source paper. The work proposed here is a machine-checked development of its explicit reduction equivalence and the finite-piece scheduling model needed to state it. The milestone theorems expose statements that can be reused when formalizing other preemptive scheduling reductions. The shared job-shop instance and 3-PARTITION input are already published definitions; the particular reduction instance and preemptive schedule predicate are new local definitions.

Difficulty

Preemption makes a task's processing time distributable across intervals. Merely checking that each machine has enough total capacity does not characterize feasible schedules: every job's operations must still occur in order, and pieces of different jobs must avoid one another on each machine. The converse direction must constrain every preemptive schedule that meets the threshold, not only a schedule having the visual pattern in Figure 4. A schedule can also represent one uninterrupted interval as several adjacent pieces, so piece count alone cannot express the source's timing claim.

Formalization scope

Machines are Fin 2, with P1P_1P1​ numbered 000 and P2P_2P2​ numbered 111. Jobs are Fin (3t+1); the final job is index 3t3t3t. Its zero-based operation iii uses machine 111 for even iii and machine 000 for odd iii. The definition uses the published JobShopLTAS.Core.Instance for ordered operations, machines, real processing times, and non-preemptive feasibility. It uses the published ResourceScheduling.Chain.ThreePartition for t,B,ait,B,a_it,B,ai​, validity, and solutions. Those objects have the same conventions as the paper here. The local preemptive model uses finitely many positive-length pieces per task, whose durations sum exactly to that task's processing time. The threshold is the explicit real cast of 2tB2tB2tB; no real infimum or division by a possibly zero optimum appears.

The goal is specific to the instance the paper constructs from each valid input. A free job-shop instance, a freely chosen schedule, or an extra hypothesis that the input has a solution would erase the reduction's content. Validity carries B>0B>0B>0, total tBtBtB, and both strict bounds on each aia_iai​. The case t=0t=0t=0 remains in scope: the constructed job has no tasks and its finish-time threshold is zero. All existing tasks have positive length whenever the input is valid, so the published non-preemptive predicate's treatment of zero-length tasks does not affect this mission.

The paper states “3-Partition α\alphaα preemptive JOFT with m=2m=2m=2” and connects it to NP-completeness for preemptive and non-preemptive scheduling when complexity is measured by the sum of task lengths. The Lean theorem states the proof's two decision equivalences with constant 2tB2tB2tB and machine count 222. It does not formalize α\alphaα as a polynomial-time many-one reduction, the unary task-length measure, NP-completeness, or Lemma 6's NP-membership argument. Contributions that establish the reduction statements, the schedule construction, or general finite-piece scheduling facts are within scope.

Selected references

  • Teofilo Gonzalez and Sartaj Sahni, Flowshop and Jobshop Schedules: Complexity and Approximation, Operations Research 26(1), 1978, pp. 36–52. DOI: 10.1287/opre.26.1.36.
9 thms1 active userReviewed
Operations ResearchTheoretical Computer Science·Captain: mikedeng1

Flowshop and Jobshop Schedules: Complexity and Approximation 5: Sequencing Jobs by Shortest Total Processing Time Gives Mean Flow Time within m Times the OptimumResearch Paper

Motivation

Flow shops and job shops are the basic models of multi-stage production: every job passes through several machines, and each machine handles one task at a time. Gonzalez and Sahni (Operations Research 26(1), 1978) showed that minimizing the finish time of such shops is NP-complete even with preemption, and then asked how well simple heuristics do. One of the two objectives they study is the mean flow time, the average completion time of the jobs, which measures how long a job spends in the shop on average.

Their Lemma 9 analyses the most natural rule for that objective, shortest processing time first (SPT): process the jobs in order of nondecreasing total work. For a single machine SPT is optimal (Smith 1956; Conway, Maxwell and Miller, Theory of Scheduling, 1967, p. 76, which the paper cites). Lemma 9 shows that with mmm processors the same rule loses at most a factor mmm, and the paper's Example 2 shows that the factor mmm is attained in the limit.

Setting

A job shop has m≥1m\ge1m≥1 processors P1,…,PmP_1,\dots,P_mP1​,…,Pm​ and nnn jobs. Job iii is a finite sequence of tasks; each task names the processor that must process it and a processing time p≥0p\ge0p≥0. The tasks of a job are processed in their order: a task may start only after the job's previous task has completed. A flow shop is the special case in which every job has mmm tasks and its kkk-th task runs on PkP_kPk​.

A non-preemptive schedule gives every task a start time s≥0s\ge0s≥0; the task then occupies its processor during [s,s+p)[s,s+p)[s,s+p), and two distinct tasks on one processor never overlap. The finish time fi(S)f_i(S)fi​(S) of job iii in schedule SSS is the time at which all tasks of job iii have been completed, and the mean flow time is

MFT(S)=1n∑i=1nfi(S).\mathrm{MFT}(S)=\frac1n\sum_{i=1}^n f_i(S).MFT(S)=n1​i=1∑n​fi​(S).

An OMFT schedule S∗S^*S∗ is a feasible schedule of least mean flow time.

Let LiL_iLi​ be the sum of the task times of job iii. An SPT order is a listing σ(0),…,σ(n−1)\sigma(0),\dots,\sigma(n-1)σ(0),…,σ(n−1) of the jobs with Lσ(0)≤⋯≤Lσ(n−1)L_{\sigma(0)}\le\dots\le L_{\sigma(n-1)}Lσ(0)​≤⋯≤Lσ(n−1)​, ties broken arbitrarily. The SPT schedule processes the jobs in that order: each job in turn, each positive-time task starting at the later of the completion of the job's previous task and the latest completion of a task already placed on its processor. A zero-time task completes when its preceding task completes and leaves the processor available.

Formalization targets

Goal: Lemma 9

For every job shop, every SPT order σ\sigmaσ with SPT schedule SSS, and every feasible non-preemptive schedule τ\tauτ,

MFT(S)≤m⋅MFT(τ),\mathrm{MFT}(S)\le m\cdot\mathrm{MFT}(\tau),MFT(S)≤m⋅MFT(τ),

so that MFT(S)/MFT(S∗)≤m\mathrm{MFT}(S)/\mathrm{MFT}(S^*)\le mMFT(S)/MFT(S∗)≤m for an OMFT schedule S∗S^*S∗. A separate item states the same bound for flow shops.

Milestones

The milestones follow the paper's proof of Lemma 9 on p. 47:

  1. the SPT schedule is a feasible schedule;
  2. the job in position kkk of the SPT schedule finishes by ∑j≤kLσ(j)\sum_{j\le k}L_{\sigma(j)}∑j≤k​Lσ(j)​;
  3. in any feasible schedule, if i1,…,ini_1,\dots,i_ni1​,…,in​ is the order in which the jobs finish, then fik≥∑j≤kLij/mf_{i_k}\ge\sum_{j\le k}L_{i_j}/mfik​​≥∑j≤k​Lij​​/m;
  4. a prefix sum of any listing of the LiL_iLi​ is at least the corresponding prefix sum of the sorted listing;
  5. MFT(S∗)≥1n∑k=1n∑j=1kLj/m\mathrm{MFT}(S^*)\ge\frac1n\sum_{k=1}^n\sum_{j=1}^k L_j/mMFT(S∗)≥n1​∑k=1n​∑j=1k​Lj​/m.

Significance

Lemma 9 is one of the earliest performance guarantees for a shop-scheduling heuristic under a sum objective. It shows that a rule computable by one sort, O(nlog⁡n)O(n\log n)O(nlogn) plus a linear pass, is within a factor equal to the number of machines, independently of the number of jobs. This is better than the factor nnn that Lemma 8 of the same paper gives for an arbitrary busy schedule, whenever m<nm<nm<n. Example 2 of the paper shows that the factor cannot be improved for SPT. Lower bounds of the work-per-machine type used here recur in later approximation results for total completion time in shops and on parallel machines.

The result has been proved since 1978. As far as a search of the Prove2Me catalogue shows, it has not been machine-checked. This mission adds a machine-checked statement of the SPT schedule as an algorithm, not as an arbitrary schedule with a property. It also adds the guarantee for job shops with arbitrary task sequences, of which flow shops are a special case.

Difficulty

The arithmetic of the proof is short. The work is in two places. The SPT schedule is a concrete construction, a fold over jobs and tasks that updates processor availability, so the bound on its finish times has to be carried through an invariant of that construction. The lower bound on every feasible schedule needs a packing argument: tasks on one processor that complete by a given time have total length at most that time. That argument is not available in Mathlib in a form that applies here. The tempting shortcut of comparing the two schedules job by job fails: the optimal schedule need not finish jobs in SPT order, so the comparison must go through sums of sorted prefixes.

Formalization scope

  • Instance and feasibility. The job data come from the published JobShopLTAS.Core.Instance (jobs Fin n, processors Fin m, tasks Fin (μ j), real processing times ≥0\ge0≥0). The local IsPaperFeasibleSchedule requires nonnegative starts, in-job order, and no overlap of positive-time tasks on the same processor. Zero-time tasks occupy no processor interval. The paper assumes m≥1m\ge1m≥1, and the scheduling theorems carry that hypothesis.
  • Finish time and MFT. fif_ifi​ is the maximum completion time over the tasks of job iii, with baseline 000; MFT divides by nnn, and for n=0n=0n=0 both sides are 000.
  • The SPT schedule is the list schedule constructed by the heuristic, for every SPT order, so ties are broken in every possible way. Zero-time tasks do not advance processor availability. It is not "any feasible schedule whose jobs finish in SPT order", a reading under which an optimal schedule would qualify and the goal would be trivial.
  • The optimum. The paper's "Let S∗S^*S∗ be an OMFT schedule" is stated as "for every feasible non-preemptive schedule τ\tauτ". This is equivalent and does not assume that an optimum exists.
  • Ratios multiplied out. MFT(S)/MFT(S∗)≤m\mathrm{MFT}(S)/\mathrm{MFT}(S^*)\le mMFT(S)/MFT(S∗)≤m is stated as MFT(S)≤m⋅MFT(τ)\mathrm{MFT}(S)\le m\cdot\mathrm{MFT}(\tau)MFT(S)≤m⋅MFT(τ), and the proof's bounds divided by mmm are multiplied by mmm. No division by a possibly zero quantity occurs.
  • Constants. The only constant is the factor mmm, the number of processors.
  • Not formalized. The running time of SPT, the comparison with Lemma 8 and its remark "it is assumed that m<nm<nm<n" (not a hypothesis of Lemma 9), and the tightness Example 2.
  • Milestones 2 and 4 are stated for every listing σ\sigmaσ and every pair of listings; they are combinatorial facts about list schedules and sorted sums that are reusable beyond this mission. Proofs of any milestone, and a reusable packing lemma for non-overlapping intervals, are welcome.

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
  • R. W. Conway, W. L. Maxwell, L. W. Miller, Theory of Scheduling, Addison-Wesley, 1967.
  • W. E. Smith, Various optimizers for single-stage production, Naval Research Logistics Quarterly 3, 59–66, 1956. https://doi.org/10.1002/nav.3800030106
  • K. Jansen, R. Solis-Oba, M. Sviridenko, Makespan Minimization in Job Shops: A Linear Time Approximation Scheme, SIAM J. Discrete Math. 16(2), 288–300, 2003 (source of the job-shop definition reused here). https://doi.org/10.1137/S0895480199363908
9 thms1 active userReviewed
Operations ResearchTheoretical Computer Science·Captain: mikedeng1

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 O(nlog⁡n)O(n\log n)O(nlogn) (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 mmm 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 ⌈m/2⌉\lceil m/2\rceil⌈m/2⌉ (Lemma 11). This mission formalizes that bound.

Setting

A flow shop has mmm processors P1,…,PmP_1,\dots,P_mP1​,…,Pm​ and nnn jobs. Job iii consists of mmm tasks; task jjj runs on processor PjP_jPj​ and needs processing time tj,i≥0t_{j,i}\ge 0tj,i​≥0 (zero is allowed). A non-preemptive schedule gives every task a start time sj,is_{j,i}sj,i​, and the task occupies PjP_jPj​ during [sj,i,sj,i+tj,i)[s_{j,i},s_{j,i}+t_{j,i})[sj,i​,sj,i​+tj,i​). It is feasible when all start times are nonnegative, when task j+1j+1j+1 of a job starts only after task jjj of that job has completed (sj,i+tj,i≤sj+1,is_{j,i}+t_{j,i}\le s_{j+1,i}sj,i​+tj,i​≤sj+1,i​), and when no processor runs two tasks of positive length at the same time. Its finish time FT(s)\mathrm{FT}(s)FT(s) is the latest completion time sj,i+tj,is_{j,i}+t_{j,i}sj,i​+tj,i​ (and 000 if there is no task). An optimal finish time (OFT) schedule S∗S^*S∗ is a feasible schedule of least finish time.

Heuristic H (p. 48) divides the processors into ⌈m/2⌉\lceil m/2\rceil⌈m/2⌉ groups: group ggg consists of P2g−1P_{2g-1}P2g−1​ and P2gP_{2g}P2g​, and when mmm is odd the last group is PmP_mPm​ alone. The flow shop FgF_gFg​ on group ggg has the same jobs, with task times t2g−1,i,t2g,it_{2g-1,i},t_{2g,i}t2g−1,i​,t2g,i​ only. For each group an OFT schedule R(g)R(g)R(g) of FgF_gFg​ is computed (by Johnson's algorithm), with finish time f(R(g))f(R(g))f(R(g)). The schedule SSS generated by H runs these schedules one after another: every task of group ggg starts at its time in R(g)R(g)R(g) plus the offset ∑h<gf(R(h))\sum_{h<g}f(R(h))∑h<g​f(R(h)).

Formalization targets

Goal: Lemma 11 (p. 49)

For every flow shop with mmm processors and nnn jobs, every choice of OFT schedules R(g)R(g)R(g) of the group flow shops, the schedule SSS generated by H, and every feasible non-preemptive schedule τ\tauτ of the flow shop (in particular an OFT schedule S∗S^*S∗),

FT(S)≤⌈m2⌉ FT(τ).\mathrm{FT}(S)\le\Big\lceil\frac m2\Big\rceil\,\mathrm{FT}(\tau).FT(S)≤⌈2m​⌉FT(τ).

The paper writes this as FT(S)/FT(S∗)≤⌈m/2⌉\mathrm{FT}(S)/\mathrm{FT}(S^*)\le\lceil m/2\rceilFT(S)/FT(S∗)≤⌈m/2⌉.

Milestones

  1. Every group flow shop FgF_gFg​ has an OFT schedule (p. 48; the paper obtains it with Johnson's algorithm).
  2. The concatenation of feasible group schedules is a feasible schedule of the mmm-processor flow shop (p. 48).
  3. FT(S∗)≥max⁡gf(R(g))\mathrm{FT}(S^*)\ge\max_g f(R(g))FT(S∗)≥maxg​f(R(g)) (proof of Lemma 11, p. 49).
  4. FT(S)≤∑gf(R(g))≤⌈m/2⌉max⁡gf(R(g))\mathrm{FT}(S)\le\sum_g f(R(g))\le\lceil m/2\rceil\max_g f(R(g))FT(S)≤∑g​f(R(g))≤⌈m/2⌉maxg​f(R(g)) (proof of Lemma 11, p. 49).

Significance

The result gives a polynomial-time heuristic, running in time O(mnlog⁡n)O(mn\log n)O(mnlogn), whose finish time is within a factor ⌈m/2⌉\lceil m/2\rceil⌈m/2⌉ of the optimum on every instance, half the factor mmm that every busy schedule already achieves. The paper's Example 4 (p. 49) shows that for m=3m=3m=3 the factor 2=⌈3/2⌉2=\lceil 3/2\rceil2=⌈3/2⌉ is approached, so the analysis cannot be improved in general.

Formalizing it produces a reusable, machine-checked model of the mmm-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 mmm, 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 R(g)R(g)R(g) to be optimal, makes the statement false; one that lets SSS be any schedule with the right restrictions makes it witnessed by S∗S^*S∗ 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 m and jobs Fin n, both 0-based; times are real numbers. A flow shop is a matrix t : Fin m → Fin n → ℝ with t ≥ 0. A schedule is a matrix of start times. Group ggg (0-based, g : Fin ((m + 1) / 2)) contains the processors 2g2g2g and 2g+12g+12g+1 that exist, min 2 (m - 2g) of them.
  • Finish time. A fold of max with baseline 000 over all tasks; it is 000 for m=0m=0m=0 or n=0n=0n=0. The maximum of the group finish times is also a fold of max with baseline 000. 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 S∗S^*S∗" is replaced by a universally quantified feasible schedule τ\tauτ, which is stronger and needs no existence assumption for S∗S^*S∗. Optimality of R(g)R(g)R(g) is the predicate "feasible, and finish time at most that of every feasible schedule of the same group flow shop".
  • Constants. ⌈m/2⌉\lceil m/2\rceil⌈m/2⌉ is (m + 1) / 2 in N\mathbb NN, cast to R\mathbb RR; the two agree for every m≥0m\ge 0m≥0. The ratio is multiplied out, so a zero optimum does not divide by zero.
  • Not formalized. Johnson's algorithm and the running times O(nlog⁡n)O(n\log n)O(nlogn) and O(mnlog⁡n)O(mn\log n)O(mnlogn). 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 SSS is a function of the R(g)R(g)R(g) with the fixed offsets ∑h<gf(R(h))\sum_{h<g}f(R(h))∑h<g​f(R(h)), and each R(g)R(g)R(g) must be optimal for its group flow shop; neither the offsets nor SSS are free.
  • Infrastructure. Elementary facts about Finset.fold max and sums over Fin; 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
7 thms1 active userReviewed
CombinatoricsOperations ResearchProbability+1·Captain: mikedeng1

Packet Routing and Job-Shop Scheduling in O(Congestion + Dilation) Steps: Edge-Simple Paths with Congestion c and Dilation d Admit an O(c + d)-Step Schedule with Constant-Size QueuesResearch Paper

Motivation

In a store-and-forward network, messages are cut into packets that travel from node to node along wires, one wire per time step, and wait in buffers between moves. Routing such traffic splits into two problems: choosing a path for each packet, and scheduling the packets along their paths, deciding at every step which packets move and which wait. Leighton, Maggs and Rao showed that the second problem always has an essentially optimal solution: once paths are fixed, two simple parameters of the paths determine the routing time up to a constant factor, on every network.

The result separates path selection from timing in the design of routing algorithms for parallel machines, and it reaches beyond networks: a job-shop problem in which every operation takes one unit of time and no job visits a machine twice is the same problem with jobs as packets and machines as edges.

Timeline.

  • 1988: Leighton, Maggs and Rao, extended abstract at FOCS, Universal packet routing algorithms.
  • 1994: the full paper in Combinatorica 14, with the existence theorem of an O(c+d)O(c+d)O(c+d) schedule with constant queues (Theorem 3.4) and a randomized on-line algorithm.
  • 1999: Leighton, Maggs and Richa, Fast algorithms for finding O(congestion + dilation) packet routing schedules, make the construction algorithmic, using the algorithmic Local Lemma of Beck.

Setting

A network is a directed multigraph: a type VVV of nodes, a type EEE of edges, and maps src,tgt:E→V\mathrm{src},\mathrm{tgt}:E\to Vsrc,tgt:E→V. A path is a list of edges e0,…,eℓ−1e_0,\dots,e_{\ell-1}e0​,…,eℓ−1​ with tgt(ek)=src(ek+1)\mathrm{tgt}(e_k)=\mathrm{src}(e_{k+1})tgt(ek​)=src(ek+1​); it is edge-simple if no edge occurs twice. A finite set PPP of packets is given, each with its path.

The dilation ddd is the largest number of edges on a path; the congestion ccc is the largest number of paths through one edge. Since a packet crosses at most one edge per step and an edge carries at most one packet per step, every schedule needs at least max⁡(c,d)\max(c,d)max(c,d) steps.

A schedule assigns to every packet ppp and every index kkk of its path the step τ(p,k)≥1\tau(p,k)\ge1τ(p,k)≥1 at which ppp crosses its kkk-th edge, strictly increasing in kkk. Its length is the last crossing step. A packet waits in its initial queue before its first crossing, in the edge queue at the head of the edge it last crossed between two crossings, and in its final queue after its last crossing. Only edge queues count for queue size: the other two are fixed by the instance. A schedule is valid if at most one packet crosses each edge at each step.

For the proof, the paper measures schedules that are not yet valid through frames: a TTT-frame is a run of TTT consecutive steps, and the relative congestion of a frame is the largest number of packets crossing one edge in it, divided by TTT.

Formalization targets

Goal: Theorem 3.4 (p. 11)

There are absolute constants KKK and QQQ such that every finite set of packets with edge-simple paths of congestion at most ccc and dilation at most ddd, on any network, has a valid schedule with

length≤K (c+d),every edge queue≤Q at every step.\text{length}\le K\,(c+d),\qquad \text{every edge queue}\le Q \text{ at every step}.length≤K(c+d),every edge queue≤Q at every step.

The constants are not fixed: the paper proves existence, and any constants are a valid answer.

Milestones, in the order the proof uses them

  1. Lemma 3.1 (p. 8), the Lovász Local Lemma: events of probability at most ppp with dependence at most b≥1b\ge1b≥1 and 4pb<14pb<14pb<1 all fail together with positive probability.
  2. Lemma 3.2 (p. 8): with congestion and dilation at most ddd, a schedule of length O(d)O(d)O(d) with no waiting in edge queues and at most TTT packets per edge in every frame of size T≥log⁡2dT\ge\log_2 dT≥log2​d.
  3. The recurrences (pp. 12–13): I(1)=log⁡dI^{(1)}=\log dI(1)=logd, I(i+1)=log⁡5I(i)I^{(i+1)}=\log^5 I^{(i)}I(i+1)=log5I(i), r(1)=1r^{(1)}=1r(1)=1, r(i+1)=r(i)(1+κ/log⁡I(i))r^{(i+1)}=r^{(i)}(1+\kappa/\sqrt{\log I^{(i)}})r(i+1)=r(i)(1+κ/logI(i)​) stop at some j=O(log⁡∗d)j=O(\log^* d)j=O(log∗d) with r(j)=O(1)r^{(j)}=O(1)r(j)=O(1).
  4. Lemma 3.5 (p. 14): frame bounds for all sizes from TTT to 2T−12T-12T−1 imply them for all sizes ≥T\ge T≥T.
  5. The final simulation (pp. 12–13): a schedule with relative congestion O(1)O(1)O(1) in frames of constant size, in which every packet waits at most once every k1≥2k_1\ge2k1​≥2 steps, becomes a valid schedule, a constant factor longer, with constant edge queues.

Significance

The theorem shows that congestion and dilation, two quantities read off the paths alone, determine the optimal schedule length up to a constant factor on every network, with buffers of constant size. Path-selection algorithms that minimize c+dc+dc+d therefore yield near-optimal routing, and the same bound holds for unit-time job shops without repeated machines. It is also an often-cited application of the Local Lemma beyond a single round of random choices: the proof applies it O(log⁡∗d)O(\log^* d)O(log∗d) times in succession.

The result has been proved since 1994, and the algorithmic version since 1999. As far as is known, no part of it is machine-checked. The mission produces a formal model of store-and-forward schedules with edge queues and frames, a formal statement of the theorem that excludes the degenerate readings, and formal versions of the steps of its proof.

Difficulty

The naive approach gives each packet a random initial delay and then lets it move without waiting. That gives O(log⁡(Nd))O(\log(Nd))O(log(Nd)) packets per edge per step, and O(c+dlog⁡(Nd))O(c+d\log(Nd))O(c+dlog(Nd)) steps after slowing down. Lemma 3.2 does better only in frames of size log⁡d\log dlogd, not in single steps. Recursing on frames, as in Theorem 3.3, loses a constant factor per level and gives (c+d)2O(log⁡∗(c+d))(c+d)2^{O(\log^* (c+d))}(c+d)2O(log∗(c+d)).

Removing that factor is the central difficulty. Each refinement must keep the relative congestion nearly unchanged, r(i+1)=r(i)(1+O(1)/log⁡I(i))r^{(i+1)}=r^{(i)}(1+O(1)/\sqrt{\log I^{(i)}})r(i+1)=r(i)(1+O(1)/logI(i)​), which requires second-order terms in the tail estimates, delays spread over the block rather than inserted at its start, and careful handling of block boundaries. The constant queue bound needs an invariant: every packet waits at most once every I(i)I^{(i)}I(i) steps. The Local Lemma gives existence only; the construction is non-constructive.

Formalization scope

Conventions committed to in Lean:

  • The network is arbitrary: V E : Type with src tgt : E → V, no finiteness or degree bound. Packets form a Fintype P; paths are List E with matching endpoints (List.IsChain) and List.Nodup.
  • Congestion and dilation are bounds (CongestionLE path c, DilationLE path d), equivalent to exact values because every bound is monotone.
  • A schedule is a Timetable: time p k : ℕ, the step at which packet p crosses its k-th edge, at least 1 and strictly increasing in k. Length at most L means every crossing step is ≤ L. Valid means two different crossings of one edge happen at different steps.
  • The edge-queue size of edge g at the end of step t counts crossings of g at a step ≤ t whose packet crosses its next edge at a step > t. Initial and final queues are not counted.
  • Frames: frameCount τ g t T counts the packets that cross g at a step in [t, t+T). Relative congestion at most r in frames of size ≥ T₀ is frameCount ≤ r·T for all T ≥ 1 with T₀ ≤ T.
  • log is Real.logb 2. Every O(1) and "sufficiently large" is a constant quantified before the instance, and in the goal ∃ K Q comes before the network.
  • Lemma 3.1 is stated on an arbitrary probability space with measurable events. Dependence uses independence from the generated σ-algebra, and the statement adds 1 ≤ b, without which the page's statement is false.

These choices rule out the trivial formalizations: constants chosen after the instance would make K=cdK=cdK=cd suffice; a schedule without edge exclusivity would make the greedy schedule of length ddd a solution; a missing queue bound drops half of the theorem; and a statement without its length bound is solved by sending one packet at a time.

Not stated: Lemmas 3.6–3.10 and the summary of the refinement step (p. 20). They concern the block decomposition and delay-insertion rules of pp. 13–14 and 17–18, which the paper defines only in prose. Contributions are welcome on the Local Lemma (finite or general), the probabilistic estimates of Lemma 3.2, Lemma 3.5, the elementary simulation step, and formal definitions of the block operations from which Lemmas 3.6–3.10 can be stated. The schedule model is reusable for other routing results, such as the on-line algorithm of §2 or the O(c+d)O(c+d)O(c+d) results for leveled networks.

Selected references

  • F. T. Leighton, B. M. Maggs, S. B. Rao, Packet routing and job-shop scheduling in O(congestion + dilation) steps, Combinatorica 14 (1994) 167–186. https://doi.org/10.1007/BF01215349 (this mission cites the authors' manuscript).
  • F. T. Leighton, B. M. Maggs, S. B. Rao, Universal packet routing algorithms, Proc. 29th IEEE FOCS (1988) 256–269.
  • F. T. Leighton, B. M. Maggs, A. W. Richa, Fast algorithms for finding O(congestion + dilation) packet routing schedules, Combinatorica 19 (1999) 375–401. https://doi.org/10.1007/s004930050061
  • P. Erdős, L. Lovász, Problems and results on 3-chromatic hypergraphs and some related questions, in Infinite and Finite Sets, Colloq. Math. Soc. János Bolyai 10 (1975) 609–627.
  • J. Spencer, Ten Lectures on the Probabilistic Method, SIAM (1987), pp. 57–58. https://doi.org/10.1137/1.9780898719918
10 thms1 active userReviewed
PreviousNext

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me