Question 7
We have a set of jobs to be performed, and we are given the following information about each job: a job ID, the duration required to complete the job, and the time by which the job is due. All jobs have to be performed on a single machine, which can perform one job at a time. Given a schedule for the jobs, the lateness of a job is defined as 0 if it is completed before it is due, and is defined as the difference between the completion time and the time it is due otherwise. This machine has to rest for an hour mandatorily after every 5 hours of continuous work but the machine can take rest for one hour even before 5 hours.
If the jobs are executed in an optimal sequence, what is the total lateness?
| Id | Time required | Due time |
|---|---|---|
| 0 | 2 | 10 |
| 1 | 1 | 2 |
| 2 | 4 | 8 |
| 3 | 3 | 7 |