Sequencing Problem: Johnsons Algorithm For Jobs and Two Machine

Johnson’s Algorithm tackles scheduling problems where a set of jobs needs to be processed on two machines in a specific order (i.e., Machine 1 then Machine 2). Its objective is to find the optimal sequence that minimizes the total completion time for all jobs. Here’s a deeper dive into how it works:

The Logic Behind Minimizing Idle Time:

Imagine you have a machine shop with two machines. Johnson’s Algorithm prioritizes scheduling jobs that can quickly move through one machine to minimize idle time on the other. By getting short jobs out of the way first, you ensure the second machine isn’t waiting unnecessarily for a long job on Machine 1 to finish. This domino effect minimizes overall processing time.

Step-by-Step Breakdown:

  1. Identify the Shortest Processing Times: Begin by examining the processing times of each job on both machines. Find the job with the absolute shortest processing time, whether it’s on Machine 1 or Machine 2.

  2. Schedule the Shortest Job Strategically: Here’s the key decision point:

    • If the shortest processing time belongs to Machine 1, schedule that job as the very first job in the overall sequence.
    • Conversely, if the shortest processing time belongs to Machine 2, schedule that job as the very last job in the sequence.
  3. Prioritize Jobs that Free Up Machines Quickly: By strategically placing the shortest jobs at the beginning and end, you’re ensuring either Machine 1 or Machine 2 is available as soon as possible to tackle the remaining jobs.

  4. Eliminate and Repeat: Once a job is scheduled (either first or last), remove it from further consideration. Then, repeat steps 1-3 until all jobs have been assigned their positions in the sequence.

Why This Leads to an Optimal Solution:

Johnson’s Algorithm is mathematically proven to guarantee an optimal solution for scheduling jobs on two machines. The logic lies in prioritizing jobs that free up machines quickly, minimizing idle time and ensuring a continuous flow of work through both machines.

Additional Considerations:

  • The order of jobs on each machine will be identical due to the way processing times are considered. There’s no need to create separate sequences for Machine 1 and Machine 2.
  • This algorithm assumes known processing times for each job and negligible setup times between jobs.