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 a,, a2,.... an each expressed as a,-(n, di) where

image text in transcribed

2. (20pts) Consider the following variation of Activity Selection problem Input: A set of n task a,, a2,.... an each expressed as a,-(n, di) where is the release time, and d, the time duration. taking All the tasks are executed by a single CPU without a time overlap after the time duration time di 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 dj. 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 o your basic method in 3-10 lines, complete pseudo code, proof of the algorithm correctness, and that of the running time. Make your answers succinct but include everything necessary to reason the above. Hint: You can compute f = n+ d 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

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

Database And Expert Systems Applications 31st International Conference Dexa 2020 Bratislava Slovakia September 14 17 2020 Proceedings Part 1 Lncs 12391

Authors: Sven Hartmann ,Josef Kung ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

303059002X, 978-3030590024

More Books

Students also viewed these Databases questions

Question

What percent is 88 of $44?

Answered: 1 week ago