Question
A small business--say, a photocopying service with a single large machine--faces the following scheduling problem. Each morning they get a set of jobs from customers.
A small business--say, a photocopying service with a single large machine--faces the following scheduling problem. Each morning they get a set of jobs from customers. They want to do the jobs on their single machine in an order that keeps their customers happiest. Customer i’s job will take ti time to complete. Given a schedule (i.e., an ordering of the jobs), let Ci denote the finishing time of job i. For example, if job j is the first to be donel we would have Ci = tj; and ff job j is done right after job i, we would have Ci = Q + ti. Each customer i also has a given weight wg ~sents his or her importance to the business. The happiness of customer i is expected to be dependent o~ the finishing time of i’s job. So the company decides that they want to order the jobs to mJnimlze the weighted sum of the completion times, ~,n wiCi" i=1 Design an efficient algorithm to solve this problem. That is, you are given a set of n jobs with a processing time ti and a weight w~ for each job. You want to order the jobs so as to minimize the weighted sum of the completion times, ~P=I wiCi.
Example. Suppose there are two jobs: the first takes time q = ! and has weight wl = !0, while the second job takes time t2 = 3 and has weight w2 = 2. Then doing job 1 first would yield a weighted completion time of 10.1 + 2.4 = 18, while doing the second job first would yield the larger weighted completion time of 10.4 + 2.3 = 46.
Step by Step Solution
3.40 Rating (156 Votes )
There are 3 Steps involved in it
Step: 1
Let the time of the job be t1 t2 t3 tn and the weights of the jobs be w1 w2 w3 wn ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started