Problem

The input is a set of jobs j1, j2, .. ., jN, each of which takes one time unit to complete...

The input is a set of jobs j1, j2, .. ., jN, each of which takes one time unit to complete. Each job ji earns di dollars if it is completed by the time limit ti, but no money if completed after the time limit.

a. Give an O(N2) greedy algorithm to solve the problem.


b. Modify your algorithm to obtain an O(N logN) time bound. (Hint: The time bound is due entirely to sorting the jobs by money. The rest of the algorithm can be implemented, using the disjoint set data structure, in o(N logN).)

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT