Question: 2 . ( 5 0 marks ) Consider a set of ( n ) jobs where each job ( i )

2.(50 marks) Consider a set of \( n \) jobs where each job \( i \) has a size, denoted by \( s_{i}\), and a target time, denoted by \( t_{i}\). There is a single resource and all jobs must be scheduled. Ideally, each job should be processed/completed 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 \(\ell_{i}\). If a job completes before its target time is reached, it has a lag time of 0. 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, i.e. 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 \( A_{i}^{G}\).
Agrees: \( A^{*}\) agrees with \( A_{i}^{G}\) iff the a sublist of the first \( i \) elements of \( A^{*}\) equals \( A_{i}^{G}\), i.e.\( A^{*}[: i]=A^{G}[: 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.
2 . ( 5 0 marks ) Consider a set of \ ( n \ )

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!