Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. (20pts) Consider the following variation of Activity Selection problem: Input: A set of n task a1, a2,.., an each expressed as ai-(ri di) where

image text in transcribed

2. (20pts) Consider the following variation of Activity Selection problem: Input: A set of n task a1, a2,.., an each expressed as ai-(ri di) where r is the release time, and di the time duration. All the tasks are executed by a single CPU without a time overlap after the time ri taking duration time di Output: Minimum finish time of the last executed task The difference from the original problem is ai- (release time, duration) changed from (start time, finish time): Each task a, is released at the time r, 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 0(n2) time to compute the problem. Write all of: o your basic method in 3-10 lines, o complete pseudo code, o proof of the algorithm correctness, and o that of the running time

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

Inductive Databases And Constraint Based Data Mining

Authors: Saso Dzeroski ,Bart Goethals ,Pance Panov

2010th Edition

1489982175, 978-1489982179

More Books

Students also viewed these Databases questions