You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MINIMUM TARDINESS SEQUENCING (SS2) from Garey & Johnson, Computers and Intractability, Chapter 3, Section 3.2.3, p.73. A classical NP-complete single-machine scheduling problem where unit-length tasks with precedence constraints and deadlines must be scheduled to minimize the number of tardy tasks (tasks that finish after their deadline). Corresponds to the scheduling notation 1|prec, pⱼ=1|∑Uⱼ.
Planned reductions:
CLIQUE → MinimumTardinessSequencing (Garey & Johnson Theorem 3.10, Section 3.2.3) — the original NP-completeness proof reduces Maximum Clique to this problem by encoding vertices as tasks and edges as deadline-constrained tasks with precedence from their endpoints.
Definition
Name:MinimumTardinessSequencing Reference: Garey & Johnson, Computers and Intractability, Chapter 3, Section 3.2.3, p.73 (listed as SS2 in appendix)
Mathematical definition:
INSTANCE: A set T of "tasks," each t ∈ T having "length" 1 and a "deadline" d(t) ∈ Z⁺, and a partial order ≺ on T.
OBJECTIVE: Find a "schedule" σ: T → {0,1,...,|T|−1} such that σ(t) ≠ σ(t') whenever t ≠ t', such that σ(t) < σ(t') whenever t ≺ t', that minimizes |{t ∈ T : σ(t)+1 > d(t)}| (the number of tardy tasks).
Formulation: This is an optimization problem (minimize tardy task count), consistent with the MinimumVertexCover / MinimumDominatingSet pattern. The bound K from the original decision version is not part of the instance; instead the solver minimizes the objective directly.
Variables
Count: |T| variables, one per task.
Per-variable domain: Each task t is assigned a position σ(t) ∈ {0, 1, ..., |T|−1}.
dims(): Returns [num_tasks; num_tasks] — each variable takes values in 0..num_tasks. Configurations that are not valid permutations or that violate precedence constraints evaluate to SolutionSize::Invalid. Only bijective, precedence-respecting schedules yield SolutionSize::Valid(tardy_count).
Meaning: σ(t) is the 0-indexed start time (= finish time − 1) of task t. A task t is tardy if σ(t) + 1 > d(t). The brute-force solver explores all num_tasks^num_tasks configurations; the valid subset is the set of topological sorts of the precedence DAG (at most num_tasks!).
Schema (data type)
Type name:MinimumTardinessSequencing Variants: No generic parameters needed; a single concrete type. Traits:OptimizationProblem with type Value = usize, direction() = Minimize, Metric = SolutionSize<usize>.
Field
Type
Description
num_tasks
usize
Number of tasks |T|
deadlines
Vec<usize>
Deadline d(t) for each task t (1-indexed: task finishes at position+1)
precedences
Vec<(usize, usize)>
List of (predecessor, successor) pairs encoding the partial order on T
Size fields:num_tasks() (= |T|), num_precedences() (= number of precedence pairs).
Note: No max_tardy / K field — this is an optimization problem that minimizes tardy count directly.
Complexity
Best known exact algorithm: Standard subset dynamic programming over the precedence DAG runs in O(2^n · n) time, where n = |T| (see Lawler, Lenstra, Rinnooy Kan, Shmoys, "Sequencing and Scheduling: Algorithms and Complexity," Handbooks in Operations Research and Management Science, Vol. 4, 1993). No faster-than-2^n exact algorithm is known for the general precedence-constrained case (unlike 1|prec|∑Cⱼ where Cygan et al. (2014) achieved O*((2 − ε)^n)).
NP-completeness: Garey & Johnson, Theorem 3.10, via reduction from CLIQUE. Remains NP-complete even when the partial order consists only of chains (Lenstra & Rinnooy Kan, 1980).
Polynomial special cases: K=0 solvable by Lawler (1973); empty precedence solvable by Moore (1968) / Sidney, J.B. (1975), "Decomposition Algorithms for Single-Machine Sequencing with Precedence Relations and Deferral Costs," Operations Research, 23(2):283–298.
Parameterized complexity: For the variant without precedences (1||∑wⱼUⱼ), Heeger & Hermelin (ESA 2024) showed W[1]-hardness parameterized by number of distinct processing times or weights alone. No significant FPT results are known for the precedence-constrained version.
Extra Remark
Full book text:
INSTANCE: A set T of "tasks," each t ∈ T having "length" 1 and a "deadline" d(t) ∈ Z+, a partial order < on T, and a non-negative integer K ≤ |T|.
QUESTION: Is there a "schedule" σ: T → {0,1,...,|T|−1} such that σ(t) ≠ σ(t') whenever t ≠ t', such that σ(t) < σ(t') whenever t < t', and such that |{t ∈ T: σ(t)+1 > d(t)}| ≤ K?
Reference: [Garey and Johnson, 1976c]. Transformation from CLIQUE (see Section 3.2.3).
Comment: Remains NP-complete even if all task lengths are 1 and < consists only of "chains" (each task has at most one immediate predecessor and at most one immediate successor) [Lenstra, 1977]. The general problem can be solved in polynomial time if K = 0 [Lawler, 1973], or if < is empty [Moore, 1968] [Sidney, 1973]. The < empty case remains polynomially solvable if "agreeable" release times (i.e., r(t) < r(t') implies d(t) ≤ d(t')) are added [Kise, Ibaraki, and Mine, 1978], but is NP-complete for arbitrary release times (see previous problem).
How to solve
It can be solved by (existing) bruteforce: enumerate all configurations via dims(), check permutation validity and precedence constraints, count tardy tasks for valid schedules, find the minimum.
It can be solved by reducing to integer programming. The problem 1|prec,pⱼ=1|∑Uⱼ has a natural ILP formulation: introduce binary variables x_{t,s} (task t starts at time slot s), with precedence constraints (if t ≺ t', then ∑_s s·x_{t,s} < ∑_s s·x_{t',s}), permutation constraints (each task assigned exactly one slot, each slot assigned exactly one task), and objective min ∑_t U_t where U_t = 1 iff σ(t)+1 > d(t). Useful for verification against brute-force.
Other: N/A
Example Instance
Small instance:
Tasks: T = {t₀, t₁, t₂, t₃, t₄} (5 tasks, unit length each)
Deadlines:
d(t₀) = 5, d(t₁) = 5, d(t₂) = 5 (vertex-like tasks, very late deadline)
d(t₃) = 3, d(t₄) = 3 (edge-like tasks, early deadline)
Partial order (precedences):
t₀ ≺ t₃ (t₀ must precede t₃)
t₁ ≺ t₃ (t₁ must precede t₃)
t₁ ≺ t₄ (t₁ must precede t₄)
t₂ ≺ t₄ (t₂ must precede t₄)
Optimal schedule σ (1 tardy task):
σ(t₀) = 0 (finish at 1 ≤ d=5 ✓)
σ(t₁) = 1 (finish at 2 ≤ d=5 ✓)
σ(t₃) = 2 (finish at 3 ≤ d=3 ✓ — not tardy; t₀ and t₁ scheduled earlier ✓)
σ(t₂) = 3 (finish at 4 ≤ d=5 ✓)
σ(t₄) = 4 (finish at 5 > d=3 — TARDY)
Tardy tasks: {t₄}, count = 1. This is optimal: both t₃ and t₄ cannot finish by time 3 simultaneously (they each need 2 predecessors scheduled first, requiring at least 3 tasks in positions 0–2, leaving at most one edge task finishable by deadline 3).
Motivation
MINIMUM TARDINESS SEQUENCING (SS2) from Garey & Johnson, Computers and Intractability, Chapter 3, Section 3.2.3, p.73. A classical NP-complete single-machine scheduling problem where unit-length tasks with precedence constraints and deadlines must be scheduled to minimize the number of tardy tasks (tasks that finish after their deadline). Corresponds to the scheduling notation 1|prec, pⱼ=1|∑Uⱼ.
Planned reductions:
Definition
Name:
MinimumTardinessSequencingReference: Garey & Johnson, Computers and Intractability, Chapter 3, Section 3.2.3, p.73 (listed as SS2 in appendix)
Mathematical definition:
INSTANCE: A set T of "tasks," each t ∈ T having "length" 1 and a "deadline" d(t) ∈ Z⁺, and a partial order ≺ on T.
OBJECTIVE: Find a "schedule" σ: T → {0,1,...,|T|−1} such that σ(t) ≠ σ(t') whenever t ≠ t', such that σ(t) < σ(t') whenever t ≺ t', that minimizes |{t ∈ T : σ(t)+1 > d(t)}| (the number of tardy tasks).
Formulation: This is an optimization problem (minimize tardy task count), consistent with the
MinimumVertexCover/MinimumDominatingSetpattern. The bound K from the original decision version is not part of the instance; instead the solver minimizes the objective directly.Variables
dims(): Returns[num_tasks; num_tasks]— each variable takes values in0..num_tasks. Configurations that are not valid permutations or that violate precedence constraints evaluate toSolutionSize::Invalid. Only bijective, precedence-respecting schedules yieldSolutionSize::Valid(tardy_count).num_tasks^num_tasksconfigurations; the valid subset is the set of topological sorts of the precedence DAG (at mostnum_tasks!).Schema (data type)
Type name:
MinimumTardinessSequencingVariants: No generic parameters needed; a single concrete type.
Traits:
OptimizationProblemwithtype Value = usize,direction() = Minimize,Metric = SolutionSize<usize>.num_tasksusizedeadlinesVec<usize>precedencesVec<(usize, usize)>Size fields:
num_tasks()(= |T|),num_precedences()(= number of precedence pairs).Note: No
max_tardy/ K field — this is an optimization problem that minimizes tardy count directly.Complexity
1|prec|∑Cⱼwhere Cygan et al. (2014) achieved O*((2 − ε)^n)).declare_variants!complexity string:"2^num_tasks"(subset DP baseline)1||∑wⱼUⱼ), Heeger & Hermelin (ESA 2024) showed W[1]-hardness parameterized by number of distinct processing times or weights alone. No significant FPT results are known for the precedence-constrained version.Extra Remark
Full book text:
INSTANCE: A set T of "tasks," each t ∈ T having "length" 1 and a "deadline" d(t) ∈ Z+, a partial order < on T, and a non-negative integer K ≤ |T|.
QUESTION: Is there a "schedule" σ: T → {0,1,...,|T|−1} such that σ(t) ≠ σ(t') whenever t ≠ t', such that σ(t) < σ(t') whenever t < t', and such that |{t ∈ T: σ(t)+1 > d(t)}| ≤ K?
Reference: [Garey and Johnson, 1976c]. Transformation from CLIQUE (see Section 3.2.3).
Comment: Remains NP-complete even if all task lengths are 1 and < consists only of "chains" (each task has at most one immediate predecessor and at most one immediate successor) [Lenstra, 1977]. The general problem can be solved in polynomial time if K = 0 [Lawler, 1973], or if < is empty [Moore, 1968] [Sidney, 1973]. The < empty case remains polynomially solvable if "agreeable" release times (i.e., r(t) < r(t') implies d(t) ≤ d(t')) are added [Kise, Ibaraki, and Mine, 1978], but is NP-complete for arbitrary release times (see previous problem).
How to solve
dims(), check permutation validity and precedence constraints, count tardy tasks for valid schedules, find the minimum.1|prec,pⱼ=1|∑Uⱼhas a natural ILP formulation: introduce binary variables x_{t,s} (task t starts at time slot s), with precedence constraints (if t ≺ t', then ∑_s s·x_{t,s} < ∑_s s·x_{t',s}), permutation constraints (each task assigned exactly one slot, each slot assigned exactly one task), and objective min ∑_t U_t where U_t = 1 iff σ(t)+1 > d(t). Useful for verification against brute-force.Example Instance
Small instance:
Tasks: T = {t₀, t₁, t₂, t₃, t₄} (5 tasks, unit length each)
Deadlines:
Partial order (precedences):
Optimal schedule σ (1 tardy task):
Tardy tasks: {t₄}, count = 1. This is optimal: both t₃ and t₄ cannot finish by time 3 simultaneously (they each need 2 predecessors scheduled first, requiring at least 3 tasks in positions 0–2, leaving at most one edge task finishable by deadline 3).