Question: please show steps to answer ! Knapsack Problem: Given a set of five items, with each item having a positive benefit and a positive weight.
Knapsack Problem: Given a set of five items, with each item having a positive benefit and a positive weight. Use the dynamic programming method to select items from the set to maximize the total benefit while keeping the total weight at W=12 lbs or less. (15 pts) The DP solution is given as: [k,w]={[k1,w]max{k1,w],[k1,wwk]+bk}ifwk>welse The best subset of Sk with weight at most w is either the best subset of Sk1 with weight at most w or the best subset of Sk1 with weight at most wwk plus item k. Let Tk denote the total benefit of Sk. Determine each value of Tk with weight at most each w. nswer this question: which items are to select and what is total benefit of items in this knapsack? Please xplain your reasoning
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
