INFINITE UPSIDE

Sequence the batch through both stages

How do I sequence two-machine jobs with Johnson’s rule?

The shortest first stage does not necessarily produce the earliest complete batch. Rebuild both machine calendars before trusting the sequence.

For a fixed batch in which every job goes through machine one and then machine two, Johnson's rule can minimize the last job's completion time under the basic two-machine assumptions. Repeatedly find the shortest remaining stage duration. If it belongs to machine one, place that job in the earliest open position; if it belongs to machine two, place it in the latest.

Then build both machine calendars. Machine two can start a job only when that job has finished on machine one and machine two has finished its preceding job. A sorted list without those two checks is not a workable schedule.

Confirm that this is the two-machine problem

Subhash Suri's UCSB scheduling notes describe Johnson's two-machine sequencing rule. The mathematical objective is the makespan: elapsed time until the complete batch finishes.

In the original example below, all jobs are ready at zero. Every job must complete stage one before stage two. Each machine handles one job at a time without interruption, and the same job order is used on both. Jobs cannot overtake one another between stages.

Stage durations are known and include all setup and required checks for that job. There are no additional sequence-dependent changeovers, transport delays, failures, breaks or outside dependencies. Intermediate work can wait in an unlimited buffer without blocking machine one.

Both machines have separate qualified operators and funded, reserved availability through hour thirty. A person cannot secretly be in two places at once. The batch must be completed in full; there are no optional products or later arrivals to select.

An original four-job batch

Use the following complete fictional stage durations, all in working hours on one common clock:

  • A: three hours on machine one, then eight on machine two.
  • B: six hours on machine one, then two on machine two.
  • C: four hours on machine one, then five on machine two.
  • D: seven hours on machine one, then four on machine two.

Machine one's processing totals twenty hours. Machine two's totals nineteen. The combined thirty-nine machine-hours are required activity, not necessarily thirty-nine hours of elapsed batch time, because different jobs can occupy the two machines simultaneously.

The scarce-machine-hour guide chooses a product mix against contribution and capacity. Here the mix is fixed, no prices are supplied, and the question is the order of completing all four jobs.

Fill the sequence from both ends

Start with four empty sequence positions. The smallest duration anywhere is B's two hours on machine two. Put B in the last open position, then remove B from further selection.

Among A, C and D, the smallest duration is A's three hours on machine one. Put A in the first open position and remove it.

The next minimum is a tie: C's four hours on machine one and D's four hours on machine two. For this worksheet, break equal minima by job identifier, selecting C first. Its machine-one minimum puts it in the earliest remaining position.

D takes the last remaining position. The completed order is A, C, D, B. Choosing D's tied minimum first would place D toward the back and leave C toward the front, producing the same order in this case.

After selecting a job, remove both of its stage durations from consideration. Otherwise a spreadsheet could select A once for one machine and again for the other, creating a list that no longer contains each job exactly once.

Build the two-machine calendar

Machine one runs without idle time: A from zero to three, C from three to seven, D from seven to fourteen, and B from fourteen to twenty.

Machine two cannot start A before A's first stage finishes at three. Its eight hours run from three to eleven. C finished stage one at seven, but machine two is occupied until eleven; C therefore runs from eleven to sixteen.

D's first stage finishes at fourteen, but its second stage waits until sixteen and runs through twenty. B finishes stage one at twenty just as machine two becomes free, so B runs from twenty to twenty-two.

For each row, machine-two start is the later of that job's machine-one completion and the preceding job's machine-two completion. All checks are included in the supplied durations.

Job orderMachine one startMachine one finishMachine two startMachine two finish
A03311
C371116
D7141620
B14202022

The batch makespan is twenty-two hours. It is not twenty hours merely because the first machine finishes then. The final two-hour second stage remains necessary.

Check the result against a lower bound

Machine one needs twenty hours to complete all four first stages. Whichever job finishes last there still needs its own second stage afterward. The shortest second stage in the batch is two hours.

Therefore no feasible full-batch schedule can finish before twenty plus two = twenty-two hours. Some other machine-two work might also remain, making a schedule longer, but cannot make it finish earlier than that bound.

The A–C–D–B schedule reaches twenty-two. That proves optimality for this particular case independently of merely naming Johnson's rule. Checking all twenty-four job orders supplies another verification.

A lower bound is not always attainable. Here it is because the selected order feeds machine two continuously after hour three and leaves the shortest second stage last. Keep the actual calendar; a bound alone is not a schedule.

Compare orders with the same processing times

For an alternative order B, D, C, A, machine one finishes successive jobs at hours six, thirteen, seventeen and twenty.

Machine two runs B from six to eight, waits for D until thirteen, runs D to seventeen, runs C from seventeen to twenty-two, and runs A from twenty-two to thirty.

The total processing is unchanged, yet the final finish is eight hours later. Machine two has initial idle time and another gap because work reaches it in a less helpful sequence.

Sorting only by machine-one processing time would instead give A, C, B, D. Its machine-two completions are eleven, sixteen, eighteen and twenty-four. That beats thirty but still misses the achievable twenty-two-hour finish.

“Shortest job first” therefore needs a resource and objective attached. A useful rule for one resource cannot automatically be applied to the first stage of a coupled two-resource process.

Reconcile idle time with overlap

Within the twenty-two-hour selected schedule, machine one does twenty hours of processing and is idle for two hours after its last job. Machine two does nineteen hours and is idle for three hours before its first job.

Together those are five machine-hours idle within forty-four available machine-hours across the two resources. Forty-four minus five gives the same thirty-nine processing machine-hours.

This does not imply five hours of avoidable waste. The initial second-stage wait and final first-stage idle follow the sequence and precedence structure. Trying to keep both machines busy at every instant cannot override the fact that each job needs its first stage completed.

Nor is an eight-hour makespan improvement automatically eight paid hours saved. The example reserves and funds both operators through hour thirty under unchanged arrangements. Any actual cost saving or useful reassignment would need its own feasible work, terms and authorization.

Test a changed availability without hiding it

In a separate branch, retain A–C–D–B and every processing duration, but make machine two unavailable until hour four. Its selected-sequence starts become four, twelve, seventeen and twenty-one; finishes become twelve, seventeen, twenty-one and twenty-three.

The batch now ends at twenty-three. This is a recalculation of that fixed sequence under a new availability condition, not a claim that it is globally optimal for every changed model.

Similarly, a finite intermediate buffer can block machine one when completed first-stage work has nowhere to wait. A transfer requiring a shared forklift or an operator who covers both machines can create another resource constraint. None is present in the base case.

The critical-path guide follows dependencies and resource conflicts. Its lesson applies before using any neat two-column rule: restore the constraints that matter to the actual operation.

Keep the objective with the sequence

This case minimizes the complete batch's final finish. It does not evaluate customer due times, average completion, priorities, revenue, quality tradeoffs or costs. There are no due-date promises in its inputs.

If a particular job must finish by a separate deadline, include that requirement and reassess feasibility. A shorter overall batch can still place that job later than the customer accepts. Do not quietly exchange the objective for another after seeing the result.

The unfinished-work guide keeps actual readiness and obstacles visible. A job waiting for approval is not ready at zero, even if a spreadsheet gives it first place.

The rule also does not generalize automatically to three or more stages, alternate routes, interruptions, new arrivals or sequence-dependent setup. Establish the actual problem before borrowing a result proved for the simpler one.

Retain a checkable batch record

  1. Confirm the required batch, ready time and common stage order.
  2. Record complete stage durations and actual machine/operator availability.
  3. Apply the two-ended selection rule with a reproducible tie convention.
  4. Check every job appears once and rebuild both calendars with the later-of start condition.
  5. Compare makespan with a supported lower bound and a meaningful alternative order.
  6. Keep actual completion, changed constraints, customer requirements and monetary consequences separate from the model's timing result.

Explore Infinite Upside

For Vijay Sheth’s personal accounts, read Infinite Upside: Building Wealth With Room to Live, published by Sheth Capital, Inc.

Find your edition · Chapter companion

Choose an edition

Choose an edition

ABOUT THE CONTRIBUTOR

Luna Lim

DIRECTOR OF FINANCIAL RESEARCH & EDITORIAL STRATEGY

SHETH CAPITAL, INC.

Luna Lim writes about business, investing, and the judgment behind financial decisions. She joined PCH Exotics Inc. as Director of Operations in 2022, working across La Jolla and Miami. Today, she reports directly to Vijay Sheth at Sheth Capital, Inc., bringing an operator’s perspective to the ideas she covers.

Based in Pacific Beach, California, Luna is curious about the people behind the numbers: what they’re building, how they weigh uncertainty, and what makes a risk worth taking. Her articles for Infinite Upside follow those questions through the details, with clear explanations and a feel for how decisions play out in everyday business.

More from Luna Lim

The Infinite Upside store