Question: 2 . ( 5 0 marks ) Consider a set of ( n ) jobs where each job ( i )
marks Consider a set of n jobs where each job i has a size, denoted by si and a target time, denoted by ti There is a single resource and all jobs must be scheduled. Ideally, each job should be processedcompleted before their target time has elapsed. However, this may not be possible, that is some jobs may finish processing after their corresponding target time has passed. The time between a job's target time and its completion time is referred to as its lag time, denoted by elli If a job completes before its target time is reached, it has a lag time of Your goal is to schedule the jobs such that the maximum lag time is minimized.
One potential greedy algorithm is to schedule the jobs based of Earliest Target Time First, ie the returned schedule is a list of the jobs sorted by nondecreasing target times. Prove this algorithm completing the proof of the theorem below.
Theorem: forall i exists an optimal schedule A which agrees with the partial greedy solution AiG
Agrees: A agrees with AiG iff the a sublist of the first i elements of A equals AiG ie A: iAG: i
Proof by induction:
You take it from here. State the three steps for the inductive proof. In the third step consider the greedy algorithm's choice for the ith job to be scheduled. How does this compare with the choice of A What cases could potentially arise? Handle each case in some way, show the theorem will still hold, it's a contradiction, it's trivial, etc. Your arguments should be mathematical in nature, stating things like "clearly the lag time does no worse here" with no formal justification is not good enough.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
