Hello! Welcome to the fourth lesson in our module on single-machine scheduling.
In the previous lessons, we've seen a sharp contrast. For objectives like minimizing total completion time or maximum lateness, we found simple, highly efficient greedy rules (SPT and EDD). However, for minimizing total tardiness, we turned to a much more general and computationally intensive method: Mixed-Integer Linear Programming (MILP).
This raises a crucial question: why are some problems "easy" and others "hard"? This lesson directly tackles that question, addressing the learning outcome: Analyze the complexity of single machine problems with different objectives.
Understanding computational complexity is not just an academic exercise. For your thesis work on the Flexible Job Shop Problem, knowing if a problem is "hard" (formally, NP-hard) is critical. It tells you that searching for a simple, fast, and always-optimal algorithm is likely a futile effort. Instead, it guides you to focus on the exact methods (like MILP), heuristics, and metaheuristics that are appropriate for such challenges.
1. From "Easy" to "Hard": A Conceptual Introduction
The idea that small changes to a problem can dramatically alter its difficulty is a central theme in algorithm design and complexity theory. The following video from MIT OpenCourseWare provides an excellent introduction to this concept and formally defines the key complexity classes.
1. Course Overview, Interval Scheduling
This video, 'Course Overview, Interval Scheduling', uses a concrete example to illustrate how slight modifications to a problem's definition can shift it from being efficiently solvable to being computationally intractable.
Please watch the following two segments: The Theme of Today's Lecture (09:19 - 11:08): Pay attention to the core idea of how small changes in a problem statement can lead to big changes in complexity. Complexity Class Definitions (11:08 - 15:48): Focus on understanding the definitions of the classes P, NP, and NP-complete. Note the key difference between solving a problem and verifying a solution.
To summarize and formalize the concepts from the video:
- Class P (Polynomial Time): This class contains "easy" or "tractable" decision problems. An algorithm is polynomial-time if its running time on an input of size is bounded by for some constant . Problems like sorting a list or finding the shortest path in a graph are in P. The SPT and EDD rules we learned are polynomial-time algorithms.
- Class NP (Nondeterministic Polynomial Time): This class contains decision problems for which a proposed solution (a "certificate") can be verified in polynomial time. For example, for the question "Does this graph have a path that visits every city exactly once?", if someone gives you a path, you can easily check if it's a valid solution in polynomial time. The challenge is finding that path in the first place.
- P versus NP: A major open question in computer science is whether P = NP. It is widely believed that P ≠ NP, meaning there are problems in NP that cannot be solved in polynomial time.
- Class NP-complete: These are the "hardest" problems in NP. If a polynomial-time algorithm were found for any single NP-complete problem, it would mean that all problems in NP could be solved in polynomial time (implying P = NP).
- Class NP-hard: A problem is NP-hard if it is at least as hard as any NP-complete problem. This class includes optimization problems (like minimizing makespan) whose decision versions are NP-complete. When we say a scheduling problem is "hard," we typically mean it is NP-hard.
These definitions are fundamental to a rigorous study of optimization. The following reading provides a concise, text-based summary of these ideas, which will be useful for your thesis.
Sequencing and scheduling : algorithms and complexity - Pure
The paper 'Sequencing and scheduling : algorithms and complexity' is a foundational survey. Its introduction to complexity theory is precise and academically rigorous.
Please read Section 2, 'ALGORITHMS AND COMPLEXITY' (pages 5-7). Focus on solidifying your understanding of P, NP, NP-complete, and NP-hard. Also, pay close attention to the concepts of: Pseudo-polynomial time: This is crucial for problems involving numbers, like processing times. An algorithm is pseudo-polynomial if its runtime is polynomial in the value of the input numbers, but not in the length of their binary encoding. Strongly NP-hard: Problems that remain NP-hard even if all numbers in the input are small (encoded in unary). These problems do not admit pseudo-polynomial time algorithms (unless P=NP).
2. A Concrete Example of Shifting Complexity
Let's return to the MIT video to see these concepts in action. The lecturer demonstrates how a simple problem becomes progressively harder.
1. Course Overview, Interval Scheduling
We will now watch the remainder of the 'Interval Scheduling' video to see how the problem's complexity changes with each modification.
Please watch from 15:48 to the end. The lecturer will analyze three variations of the interval scheduling problem: Unweighted Interval Scheduling (starts at 17:37): Solved with a simple greedy rule. This is in P. Weighted Interval Scheduling (starts at 44:35): Greedy fails. It requires a more complex dynamic programming approach, but is still in P. Multi-resource Interval Scheduling (starts at 1:19:54): A further generalization makes the problem NP-complete.
This example clearly illustrates the core principle: adding features like job weights or additional resource constraints can fundamentally change a problem's computational nature, moving it from tractable (P) to intractable (NP-hard).
3. The Complexity Landscape of Single Machine Scheduling
Now, let's apply this framework to the single-machine scheduling problems we are studying. The complexity of a problem, defined in the standard notation, often depends on the choices for the (job characteristics) and (objective function) fields.
The table below summarizes the complexity of several key single-machine problems. This directly addresses our learning outcome and explains the different solution methods we've seen.
| Problem () | Complexity | Typical Optimal Algorithm |
| :--- | :--- | :--- |
| Simple Objectives | | |
| 1||ΣC_j | P | SPT Rule () |
| 1||L_max | P | EDD Rule () |
| 1||Σw_jC_j | P | WSPT Rule () |
| Adding Release Dates | | |
| 1|r_j|ΣC_j | Strongly NP-hard | Branch and Bound, MILP |
| 1|r_j|L_max | Strongly NP-hard | Branch and Bound, MILP |
| Minimizing Late Jobs | | |
| 1||ΣU_j | P | Moore-Hodgson Algorithm () |
| 1||Σw_jU_j | NP-hard | Dynamic Programming (Pseudo-polynomial) |
| Minimizing Tardiness | | |
| 1||ΣT_j | NP-hard | Dynamic Programming (Pseudo-polynomial) |
| 1||Σw_jT_j | Strongly NP-hard | Branch and Bound, MILP |
This table is synthesized from results in the survey papers by Pinedo, and by Gafarov et al., which you can refer to as "An Overview of Some Single Machine Scheduling Problems" (resource LINK).
Key Observations from the Table:
- Changing the Objective: Simply changing the objective from
L_max(in P) toΣT_j(NP-hard) moves the problem into a different complexity class. This explains why we could use a simple EDD rule for one but needed a full MILP model for the other. - Adding Constraints: The
1||L_maxproblem is easy. However, adding release dates to get1|r_j|L_maxmakes it strongly NP-hard. This again shows how a seemingly small modification can have a huge impact. - Pseudo-Polynomial vs. Strong NP-hardness: Notice the distinction for the tardiness and late jobs objectives. Problems like
1||ΣT_jand1||Σw_jU_jare NP-hard, but they can be solved by dynamic programming algorithms whose runtimes depend polynomially on the sum of processing times (e.g., ). These are pseudo-polynomial and are only "hard" when the processing times are very large numbers. In contrast, strongly NP-hard problems like1||Σw_jT_jare considered harder, as they don't have such algorithms.
Test your understanding!
You are tasked with solving a 1|prec|L_max problem, where jobs have arbitrary precedence constraints. Based on the patterns you've observed, would you start by trying to find a simple, efficient sorting rule (like SPT or EDD) that is optimal for all cases? Or would you pursue a different strategy? Why?
Show answer
I would not start by looking for a simple sorting rule. The table shows that adding constraints like release dates (r_j) can make a simple problem NP-hard. Precedence constraints (prec) are another form of complex constraint. While 1||L_max is easy, it is very likely that adding general precedence constraints makes the problem NP-hard, meaning a simple, efficient, optimal sorting rule probably doesn't exist. The better strategy would be to investigate if it's NP-hard and, if so, formulate it as a MILP or use a heuristic approach.
(Indeed, the problem 1|prec|L_max can be solved in polynomial time by extending the EDD logic, but the reasoning to be skeptical of a simple rule is sound. If the objective were ΣC_j, adding general precedence constraints does make the problem NP-hard.)
Conclusion
This lesson provided a formal basis for a practical reality in optimization: some problems are vastly harder than others. Understanding where a problem lies on the complexity spectrum is the first step in selecting an appropriate solution method.
Key Takeaways:
- Scheduling problems can be classified by their computational complexity into classes like P (tractable) and NP-hard (intractable).
- Slight changes to a problem's definition—such as adding release dates, weights, or changing the objective function—can move it from P to NP-hard.
- Problems like
1||ΣC_jand1||L_maxare in P, which is why simple, optimal rules exist. - Problems like
1||ΣT_jand1|r_j|L_maxare NP-hard, justifying the use of more powerful but less scalable methods like MILP or heuristics. - The distinction between NP-hard and strongly NP-hard is important, as it relates to whether a pseudo-polynomial time algorithm (like dynamic programming) exists.
Preview of the Next Lesson:
We have now established a strong foundation in the single-machine environment. In the next lesson, we will increase the complexity of the machine environment itself and begin our study of the flow shop. We will start by defining the permutation flow shop problem, understanding its core assumptions, and learning how to visualize its schedules using Gantt charts. This is the first major step toward the more complex job shop and flexible job shop environments central to your research.