subject

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).)

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 06:30, scoutbuffy2512
On early television stations, what typically filled the screen from around 11pm until 6am? test dummies test patterns tests testing colors
Answers: 1
image
Computers and Technology, 23.06.2019 13:50, mrfishyyyy
Explain how email technologies enable the exchange of messages between users. find out the typical parts of an email address and explain each part.
Answers: 1
image
Computers and Technology, 23.06.2019 14:30, Vanesssajohn2962
Norder to receive financial aid at his vocational school, mario must fill out the fafsa. the fafsa is a form that must be completed to determine . in order to complete a fafsa, you must submit . the fafsa can students obtain
Answers: 2
image
Computers and Technology, 24.06.2019 15:00, MilanPatel
In excel, what happens to the cell contents when you click and drag a cell into multiple cells?
Answers: 1
You know the right 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: