subject

Athief is given the choice ofnobjects to steal, but only has one knapsack with a capacity of takingmweight. each objectihas weightwi, and profitpi.(a) first, suppose that the objects are divisible (e. g., the thief is in a cheese shop and the itemsare rolls of cheese that can be cut). for each objecti, if a fractionxi, 0≤xi≤1 (takingxi= 1 would be taking the entire object) is placed in the knapsack, then the profit earnedispixi. come up with an efficient greedy algorithm for maximizing the profit of the thief. prove the correctness and running time.(b) now, suppose the items cannot be taken fractionally. in other words, the thief can eithertake an entire item or leave it behind. suppose we also know the following: the order of theseitems when sorted by increasing weight is the same as their order when sorted by decreasingvalue. give a greedy algorithm to find an optimal solution to this variant of the knapsackproblem. prove the correctness and running time.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:00
1. so if i wanted to build a linux server for web services(apache) with 1cpu and 2 gb of memory.-operating at 75% of memory capacity2. a windows server with 2 cpu/ 4gb memory- operating at 85% of memory capacity3. a storage server with 1 cpu/ 2gb memory- operating at 85% of memory capacityhow much memory do i have to add for each server.so that the utilization rate for both cpu and memory is at a baseline of 60%."the details for the cpu like its processor or the memory's speed isnt to be concerned" yeah i kept asking my teacher if he's even sure about the but the whole class seems to be confused and the project is due in 3 days..this is a virtualization project where i have to virtualize a typical server into an exsi hypervisor.
Answers: 2
question
Computers and Technology, 23.06.2019 12:00
If you're using an existing powerpoint presentation that will receive new slides based on a word outline, select the a. slide that will appear after the new slides. b. first slide in the presentation. c. slide that will appear before the new slides. d. last slide in the presentation.
Answers: 2
question
Computers and Technology, 23.06.2019 15:00
Plz ( which is an example of a good url?
Answers: 1
question
Computers and Technology, 23.06.2019 21:20
In microsoft word, when you highlight existing text you want to replace, you're in              a.  advanced mode.    b.  automatic mode.    c.  basic mode.    d.  typeover mode
Answers: 1
You know the right answer?
Athief is given the choice ofnobjects to steal, but only has one knapsack with a capacity of takingm...
Questions
question
Mathematics, 07.01.2021 18:20
question
Mathematics, 07.01.2021 18:20
question
Mathematics, 07.01.2021 18:20
Questions on the website: 13722366