Well, we have the greedy algorithm for the job scheduling (scheduling the maximum number of jobs). we can use different techniques
- Shortest job first
- Earliest start time first
- Job with minimal conflicts first
- Earliest end time first
I have the counter example of first three strategies but I couldn't find the counter example for the fourth one.
here are the counter examples for first three methods
Shortest Job First :
Here we can schedule 2 jobs instead of one shorter.
Earliest start time first :
Here we can schedule 6 smaller job that starts later instead on one that start earlier
Job with minimal conflicts first :
Here we can schedule 4 jobs with conflicts 3,4,4,3 instead of 3 with minimal conflicts, that's 2,3,3
So, what would be the counter example of the last one Earliest end time first I couldn't find the counter example for this. So, it always gives an optimum solution for each set of data?
UPDATE 1 :
I have one executor to execute the job and I want to execute the maximum number of jobs.