Question: Consider the following variation of Activity Selection problem: Input A set of n task ay, a.. an,each expressed as All the tasks are executed by

Consider the following variation of Activity Selection problem: Input A set of n task ay, a.. an,each expressed as All the tasks are executed by a single CPU without a time overlap after the time a,-(n, di) where is the release time, and di the time duration taking duration time d Output: Minimum finish time of the last executed task The difference from the original problem is a (release time, duration) changed from (start time, finish time): Each task ais released at the time , after which the CPU can execute it anytime taking duration di. So the CPU can finish all the tasks anyway. Now you don't maximize the number of executed tasks, but find a schedule with the earliest time to finish all Design a greedy algorithm running in O(n2) time to compute the problem. Write all of o o o your basic method in 3-10 lines, complete pseudo code. proof of the algorithm correctness, and o that of the running time. Make your answers succinct but include everything necessary to reason the above Hint: You can compute fi=r,t di for every a. and use it as a part of the greedy criterion, but not all Consider the following variation of Activity Selection problem: Input A set of n task ay, a.. an,each expressed as All the tasks are executed by a single CPU without a time overlap after the time a,-(n, di) where is the release time, and di the time duration taking duration time d Output: Minimum finish time of the last executed task The difference from the original problem is a (release time, duration) changed from (start time, finish time): Each task ais released at the time , after which the CPU can execute it anytime taking duration di. So the CPU can finish all the tasks anyway. Now you don't maximize the number of executed tasks, but find a schedule with the earliest time to finish all Design a greedy algorithm running in O(n2) time to compute the problem. Write all of o o o your basic method in 3-10 lines, complete pseudo code. proof of the algorithm correctness, and o that of the running time. Make your answers succinct but include everything necessary to reason the above Hint: You can compute fi=r,t di for every a. and use it as a part of the greedy criterion, but not all
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
