Consider the Knapsack problem. Let I be the set of items, a, b, be the size and the profit of item i for any
Consider the Knapsack problem. Let I be the set of items, a, b, be the size and the profit of item i for any i I, and W be the knapsack size. Consider the following greedy algorithm: 1. Sort the items in I in non-increasing order of b;/a, for all i I. 2. Pack the items in the knapsack whenever possible according to the above order. Show that the above algorithm can perform arbitrarily bad, i.e., for any fixed constant > 0, there exists an instance such that the approximation ratio of the above algorithm on this instance is at most .
Step by Step Solution
3.60 Rating (157 Votes )
There are 3 Steps involved in it
Step: 1
The Knapsack problem is a wellknown NPhard optimization problem To show that the given greedy algori...See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started