Let S = {1, 2, . . . ,m} be a set of m machines, and let J ={J 1 , . . . , J n } be a set of n jobs.

Need your ASSIGNMENT done? Use our paper writing service to score better and meet your deadline.


Order a Similar Paper Order a Different Paper

Let S = {1, 2, . . . ,m} be a set of m machines, and let J ={J1, . . . , Jn} be a set of n jobs
each of which has to be done by one of the machines. No morethan one machine can work on
the same job, and a machine cannot work on more than one job.Moreover, with each job Jk is
associated a contiguous interval [lk,rk] of integers, 1 ≤lk ≤rk ≤ m, whose significance is that only
machines i for which lk ≤ i ≤rk can work on job Jk.

a) Give an O(mn) time algorithm for assigning machines tojobs so as to maximize the number of
busy machines (which is the same as the numberof jobs being done).

b) Carefully prove the correctness of your algorithm.

Note. An algorithm that takes sub-quadratic time is possible,but you are not responsible for it
(it consists of a more clever implementation of the greedyidea that you are asked to design in
this question).