A sequencing problem deals with finding the optimum order in which a number of jobs (tasks) should be processed on a number of machines (resources), so as to minimise a chosen criterion — usually the total elapsed time required to complete all jobs.
Let \(t_{ij}\) = processing time of job \(j\) on machine \(i\) (or, equivalently, machine \(M_i\)).
The objective is to find the sequence (permutation of jobs) that minimises the makespan — time from start of the first job on the first machine until the last job finishes on the last machine.
Each job must be processed first on machine M₁ then on M₂. Let \(t_{1j}\) and \(t_{2j}\) be the processing times of job \(j\) on M₁ and M₂.
After all jobs are placed in the sequence, compute the schedule:
For each job in sequence position \(k\):
Total elapsed time = M₂ finish time of the last job.
Idle time on M₂ = M₂ start time of first job + sum of gaps between M₂ activities.
Idle time on M₁ = Total elapsed time − (sum of M₁ processing times).
Times:
| Job | M₁ | M₂ |
|---|---|---|
| A | 5 | 2 |
| B | 1 | 6 |
| C | 9 | 7 |
| D | 3 | 8 |
| E | 10 | 4 |
Smallest = 1 (job B, on M₁) → schedule B first. Sequence so far: B __ __ __ __.
From remaining {A, C, D, E}, smallest is 2 (job A, on M₂) → schedule A last. Sequence: B __ __ __ A.
From {C, D, E}, smallest is 3 (job D, on M₁) → schedule D next from start. Sequence: B D __ __ A.
From {C, E}, smallest is 4 (job E, on M₂) → schedule E next from end. Sequence: B D __ E A.
Only C left → fills middle. Final sequence: B D C E A.
Schedule:
| Job | M₁ in | M₁ out | M₂ in | M₂ out |
|---|---|---|---|---|
| B | 0 | 1 | 1 | 7 |
| D | 1 | 4 | 7 | 15 |
| C | 4 | 13 | 15 | 22 |
| E | 13 | 23 | 23 | 27 |
| A | 23 | 28 | 28 | 30 |
Total elapsed time = 30 hours.
Idle time on M₂ = 1 (initial) + 0 + 0 + 1 + 1 = 3 hours.
Idle time on M₁ = 30 − (5+1+9+3+10) = 30 − 28 = 2 hours.
Times:
| Job | M₁ | M₂ |
|---|---|---|
| 1 | 4 | 5 |
| 2 | 9 | 6 |
| 3 | 8 | 2 |
| 4 | 6 | 3 |
Smallest = 2 (job 3, on M₂) → schedule 3 last. Sequence: __ __ __ 3.
Next smallest = 3 (job 4, on M₂) → schedule 4 second-last. Sequence: __ __ 4 3.
Next = 4 (job 1, on M₁) → schedule 1 first. Sequence: 1 __ 4 3.
Only job 2 left → middle. Final: 1 2 4 3.
Total elapsed time = 29 (M₂ finishes job 3 at 29); checking all 24 orders confirms that no sequence does better.
Each job goes through M₁ → M₂ → M₃. Let \(t_{1j}, t_{2j}, t_{3j}\) be the times.
Johnson's procedure can be applied directly to a 3-machine problem provided at least one of the following holds:
If either condition holds, define two "pseudo-machines":
Apply Johnson's algorithm to \(G_j\) vs \(H_j\) (as if it were a 2-machine problem). The resulting sequence is optimal for the original 3-machine problem.
The algorithm gives a near-optimum but not guaranteed optimum. Heuristic methods or exact branch-and-bound is needed for guarantee.
Same as 2-machine case but with one extra column. For each job in sequence:
Times:
| Job | M₁ | M₂ | M₃ |
|---|---|---|---|
| A | 8 | 5 | 4 |
| B | 10 | 6 | 9 |
| C | 6 | 2 | 8 |
| D | 7 | 3 | 6 |
Check: min(\(t_{1j}\)) = 6, max(\(t_{2j}\)) = 6 — condition (min M₁ ≥ max M₂) holds with equality ⇒ Johnson applies.
Pseudo-machines:
| Job | G = M₁+M₂ | H = M₂+M₃ |
|---|---|---|
| A | 13 | 9 |
| B | 16 | 15 |
| C | 8 | 10 |
| D | 10 | 9 |
Apply Johnson on G, H. Smallest = 8 (job C, G) → C first. Next 9 (job A and D, H) → A or D last (tie). Pick D last; then A second-last; B remains middle.
Sequence: C B A D.
Following the three-machine schedule, C (M₁ 0–6, M₂ 6–8, M₃ 8–16), B (6–16, 16–22, 22–31), A (16–24, 24–29, 31–35), D (24–31, 31–34, 35–41): total elapsed time = 41. The tie could equally give C B D A, also 41; checking all 24 orders confirms that 41 is the minimum.
If max(M₂) is moderate but min(M₃) is large, the second condition often holds. For example, M₁ = 5, 4, 3; M₂ = 2, 1, 3; M₃ = 7, 8, 6. max(M₂) = 3; min(M₃) = 6 ≥ 3 ✓. Apply Johnson on (M₁+M₂, M₂+M₃).
For \(m \ge 3\) machines, the general problem of minimising the total elapsed time is NP-hard: no algorithm is known that is guaranteed to find the optimum in polynomial time. Johnson's reduction in Section 4 covers only the special three-machine case in which the middle machine is dominated.
If \(\min_j t_{1j} \ge \max_j t_{kj}\) for every intermediate machine \(k = 2, \ldots, m - 1\), OR \(\min_j t_{mj} \ge \max_j t_{kj}\) for every such \(k\) (here \(j\) runs over the jobs), then we can reduce by:
and apply Johnson's 2-machine algorithm on (G, H).
Four jobs pass through M₁ → M₂ → M₃ → M₄ with times A (7, 3, 2, 6), B (9, 2, 4, 9), C (8, 4, 3, 5), D (10, 1, 3, 8).
Check. \(\min_j t_{1j} = 7\), and the intermediate machines have \(\max_j t_{2j} = 4\), \(\max_j t_{3j} = 4\); since \(7 \ge 4\), the reduction applies.
Pseudo-machines. \(G_j = t_{1j} + t_{2j} + t_{3j}\) and \(H_j = t_{2j} + t_{3j} + t_{4j}\): A (12, 11), B (15, 15), C (15, 12), D (14, 12).
Johnson on (G, H). The smallest value is 11 (A, on H) → A last. Next 12 on H for both C and D (a tie) → C, then D, from the end. B fills the first place: B D C A.
Schedule. B: M₁ 0–9, M₂ 9–11, M₃ 11–15, M₄ 15–24; D: 9–19, 19–20, 20–23, 24–32; C: 19–27, 27–31, 31–34, 34–39; A: 27–34, 34–37, 37–39, 39–45. Total elapsed time = 45. Checking all 24 orders, the least makespan is 45 (also reached by B C D A and D B C A).
Idle time on a machine is the time during which the machine is waiting (not processing). Computed as:
For machine \(M_k\):
\[ \text{Idle}(M_k) \;=\; \text{Total elapsed time} - \sum_{j} t_{kj}. \]This includes both the time before the machine starts (waiting for upstream machines) and any gaps between consecutive jobs.
From the 5-job, 2-machine example earlier:
This sub-problem considers only 2 jobs, each having its own order of machines (not necessarily the same). Solved graphically on a (job 1 time × job 2 time) plot — but is outside the scope of most undergraduate syllabi.