subject

Consider the following variation on the interval schedulingproblem. you have a processor that can operate 24 hours a day, every day. people submit requests to run daily jobs on theprocessor. each such job comes with a start time and an end time; if the job is accepted to run on the processor, it must runcontinuously, every day, for the period between its start and endtimes. (note that certain hobs can begin before midnight and endafter midnight; this makes for a type of situation different fromwhat we saw in the interval scheduling problem). given a list of n such jobs, you goal is to accept as many jobs aspossible (regardless of length), subject to the constraint that theprocessor can run at most on job at any given point in time. provide an algorithm to do this with a running time that ispolynomial in n. you may assume for simplicity that no two jobshave the same start or end times. example: consider the following 4 jobs, specified by (start-time, emd-time) pairs: (6 p. m., 6 a. m), (9 p. m., 4 a. (3 a. m., 2 p. (1 p. m., 7p. optimal solution would be to pick the two jobs (9 p. m., 4a. m.) and (1 p. m., 7 p. which can be scheduled withoutoverlapping. analyze the running time complexity and prove the optimality ofthe algorithm you provide. hint: the interval scheduling algorithm(below) may be utilized once we somehow "cut" thearound-the-clock timeline. theobjective of cutting the timeline is to convert the circulartimeline to a linear timeline as given in the interval schedulingproblem of the textbook. think how you can do that. one wayis to remove a job and all other jobs overlapping it. since thereare n jobs, there are n different cases of cutting the circulartimeline. you can then compare the cases to pick an optimalone. initially, let r be the set of all requests, and let a beemptywhile r is not yet emptychoose a request i ∈ r that has the smallest finishingtimeadd a request i to adelete all requests from r that are not compatible with requestiendwhilereturn the set a as the set of accepted requests

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 18:30, smariedegray
All of the following are characteristics that must be contained in any knowledge representation scheme except
Answers: 3
image
Computers and Technology, 22.06.2019 19:10, kaiya789
10. when you create a pivottable, you need to specify where to find the data for the pivottable. is it true
Answers: 2
image
Computers and Technology, 22.06.2019 23:30, jhonpiper
For her science class, elaine is creating a presentation on weather in the united states. she wants to make the presentation beautiful and interesting by drawing simple cloud or wave shapes. which is the best way for elaine to draw these shapes?
Answers: 1
image
Computers and Technology, 23.06.2019 18:30, DSUDLER5555
Write a program that prints the day number of the year, given the date in the form month-day-year. for example, if the input is 1-1-2006, the day number is 1; if the input is 12-25-2006, the day number is 359. the program should check for a leap year. a year is a leap year if it is divisible by 4, but not divisible by 100. for example, 1992 and 2008 are divisible by 4, but not by 100. a year that is divisible by 100 is a leap year if it is also divisible by 400. for example, 1600 and 2000 are divisible by 400. however, 1800 is not a leap year because 1800 is not divisible by 400.
Answers: 3
You know the right answer?
Consider the following variation on the interval schedulingproblem. you have a processor that can op...

Questions in other subjects:

Konu
English, 21.04.2021 17:10
Konu
Mathematics, 21.04.2021 17:10
Konu
English, 21.04.2021 17:10