Question: Design and analysis os algorithms A thief robbing a store finds n items. The i item is worth v, dollars and weighs w, pounds, where
Design and analysis os algorithms
A thief robbing a store finds n items. The i item is worth v, dollars and weighs w, pounds, where v, and w, are integers. The thief wants to take as valuable a load as possible, but he can carry at most W pounds in his knapsack, for some integer W=13. Which items should he take? Where, W= 12. 1, 2} and V= {4, 2. 10)
Step by Step Solution
There are 3 Steps involved in it
This problem is a classic example of the knapsack problem which is an NPhard problem There is no known polynomialtime algorithm to solve the knapsack ... View full answer
Get step-by-step solutions from verified subject matter experts
