Question: 6. (8 points) Greedy Algorithms Consider a version of the Knapsack problem in which every item has the same weight (say the weight is 1).

 6. (8 points) Greedy Algorithms Consider a version of the Knapsack

6. (8 points) Greedy Algorithms Consider a version of the Knapsack problem in which every item has the same weight (say the weight is 1). In this case the problem is simpler and we can use a greedy algorithm to solve the problem. a) ( point) Consider the following instance of the Knapsack problem where every item has weight 1. We will assume the capacity of our knapsack is 5. Which items should we select if we want to maximize the total value given this input set of the values of each item? V = { 15, 36, 22, 52, 31, 15, 72, 24, 26, 41 } b) (2 points) Describe a Greedy Algorithm that will solve this special case of the Knapsack problem. c) (5 points) Prove your algorithm is correct

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!