Question: Consider the set of items S = { a , b , c , d , e , f , g , h } ,

Consider the set of items S ={a, b, c, d, e, f, g, h}, where the items have the following (benefit, weight) values: (Total: 18 points)
a (14,3)
b (5,1)
c (10,6)
d (12,4)
e (8,2)
f (10,4)
g (16,8)
h (9,9)
Goal: we want to maximize our benefit by picking items (fraction is allowed), where the maximum total allowed weight for us is Wmax =15.
Can we use greedy algorithm to solve this problem or not? (5 points)
- If no, why? (10 points) OR
- If yes, how to use greedy algorithm to solve it? Please illustrate the procedure. (10 points)
What is the time complexity of your solution and why? (3 points)

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 Programming Questions!