Computers and Technology

The input is a set of jobs j1, j2, . . . , jN, each of which takes a 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 sort the jobs by money. The rest of the algorithm can be implemented, using the disjoint set data structure, in o(N logN).)

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 17:30, yoyo9661
Under which key category do the page up and page down keys fall? page up and page down keys fall under the keys category.
Answers: 1
image
Computers and Technology, 23.06.2019 01:30, solikhalifeoy3j1r
In deadlock avoidance using banker’s algorithm, what would be the consequence(s) of: (i) a process declaring its maximum need as maximum possible for each resource. in other words, if a resource a has 5 instances, then each process declares its maximum need as 5. (ii) a process declaring its minimum needs as maximum needs. for example, a process may need 2-5 instances of resource a. but it declares its maximum need as 2.
Answers: 3
image
Computers and Technology, 23.06.2019 11:00, abdulbasharee99
In the context of the box model, what is the difference between a margin and a padding? a. a padding lies outside a box border, while a margin lies inside it. b. a padding lies inside a box border, while a margin lies outside it. c. a padding can be adjusted independently, while a margin depends on the size of its box. d. a padding depends on the size of its box, while a margin can be adjusted independently.
Answers: 3
image
Computers and Technology, 23.06.2019 16:00, keyonaemanieevans
Helen is having a meeting with her colleagues in her company. they are working on the goals and objectives for the coming year. they want to ensure that these goals and objectives of the processes involved are properly evaluated. which system can helen and her colleagues apply to evaluate this? helen and her colleagues require a blank to evaluate the goals and objectives.
Answers: 2
Do you know the correct answer?
The input is a set of jobs j1, j2, . . . , jN, each of which takes a one-time unit to complete. Each...

Questions in other subjects:

Konu
History, 14.12.2020 03:10
Konu
Mathematics, 14.12.2020 03:20
Konu
Mathematics, 14.12.2020 03:20