Question: provide a python code Consider a different version of the job scheduling problem that minimizes the weighted sum of job completion times. In this version,

provide a python code Consider a different version of the job schedulingprovide a python code

Consider a different version of the job scheduling problem that minimizes the weighted sum of job completion times. In this version, each of n jobs has a weight wi and a duration ti, and all must be scheduled in serial order, starting at time zero (with no slack). A schedule S is therefore an ordering of the jobs, and the completion time of job i in S, C:(S), is defined to be the sum of the durations tk of all jobs (including i) that precede i in S. Find the schedule S* that minimizes over all S: -1 wic.s) 1. Provide a counterexample to the optimality of ordering by heaviest-weight first. 1 pt) 2. Provide a counterexample to the optimality of ordering by shortest-job first. [1 pt 3. Design and analyze an efficient algorithm for computing an optimal schedule. Hint: use an exchange argu- ment, similar to the one used for the minimizing lateness problem for the proof of optimality. Consider a different version of the job scheduling problem that minimizes the weighted sum of job completion times. In this version, each of n jobs has a weight wi and a duration ti, and all must be scheduled in serial order, starting at time zero (with no slack). A schedule S is therefore an ordering of the jobs, and the completion time of job i in S, C:(S), is defined to be the sum of the durations tk of all jobs (including i) that precede i in S. Find the schedule S* that minimizes over all S: -1 wic.s) 1. Provide a counterexample to the optimality of ordering by heaviest-weight first. 1 pt) 2. Provide a counterexample to the optimality of ordering by shortest-job first. [1 pt 3. Design and analyze an efficient algorithm for computing an optimal schedule. Hint: use an exchange argu- ment, similar to the one used for the minimizing lateness problem for the proof of optimality

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 Databases Questions!