Question: Recall the Fractional Knapsack Problem. The inputs to the problem are a positive integer W , the knapsack capacity; item weights w 1 , .

Recall the Fractional Knapsack Problem. The inputs to the problem are a positive integer W, the knapsack capacity; item weights w1,..., wn (positive integers); and item values v1,..., vn (positive integers). The desired output is a fractional subset s of the items maximizing v(S)= i si vi subject to the capacity constraint i si wi <= W Show that this is a special case of the maximum-weight-basis problem for matroids. (What is the matroid?) If you implement the generic greedy algorithm, how fast is it? How does that algorithm compare (both conceptually and in runtime) with the algorithm presented in class?

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!