Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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,

image text in transcribedprovide 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Excel As Your Database

Authors: Paul Cornell

1st Edition

1590597516, 978-1590597514

More Books

Students also viewed these Databases questions

Question

What qualities do you see as necessary for your line of work?

Answered: 1 week ago