Johnson's rule
# Johnson's rule

In operations research, Johnson's rule is a method of scheduling jobs in two work centers. Its primary objective is to find an optimal sequence of jobs to reduce makespan (the total amount of time it takes to complete all jobs). It also reduces the amount of idle time between the two work centers. The method minimizes the makespan in the case of two work centers. Furthermore, the method finds the shortest makespan in the case of three work centers if additional constraints are met.

## Algorithm

The technique requires several preconditions:

* The time for each job must be constant.
* Job times must be mutually exclusive of the job sequence.
* All jobs must be processed in the first work center before going through the second work center.
* All jobs are equally prioritised.

Johnson's rule is as follows:

* List the jobs and their times at each work center.
* Select the job with the shortest activity time. If that activity time is for the first work center, then schedule the job first. If that activity time is for the second work center then schedule the job last. Break ties arbitrarily.
* Eliminate the shortest job from further consideration.
* Repeat steps 2 and 3, working towards the center of the job schedule until all jobs have been scheduled.

Given significant idle time at the second work center (from waiting for the job to be finished at the first work center), job splitting may be used.

## Example

Each of five jobs needs to go through work center A and B. Find the optimum sequence of jobs using Johnson's rule.

Job times (hours) :

| Job | Work center A | Work center B |
| - | - | - |
| A | 3.2 | 4.2 |
| B | 4.7 | 1.5 |
| C | 2.2 | 5.0 |
| D | 5.8 | 4.0 |
| E | 3.1 | 2.8 |

* The smallest time is located in Job B (1.5 hours). Since the time is in Work Center B, schedule this job last. Eliminate Job B from further consideration.  ? ? ? ? B
* The next smallest time is located in Job C (2.2 hours). Since the time is in Work Center A, schedule this job first. Eliminate Job C from further consideration. C ? ? ? B
* The next smallest time after that is located in Job E (2.8 hours). Since the time is in Work Center B, schedule this job last. Eliminate Job E from further consideration. C ? ? E B
* The next smallest time after is located in Job A (3.2 hours). Since the time is in Work Center A, schedule this job first. Eliminate Job A from further consideration. C A ? E B
* The only job left to consider is Job D. C A D E B

So, the jobs must be processed in the order C → A → D → E → B, and must be processed in the same order on both work centers.

