Question: 2. 0-1 Knap Sack Problem Array S[ ] has the size of items available for selection. Given an integer K (the size of a knap
![2. 0-1 Knap Sack Problem Array S[ ] has the size](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f4f416d6e78_30266f4f41655bdd.jpg)
2. 0-1 Knap Sack Problem Array S[ ] has the size of items available for selection. Given an integer K (the size of a knap sack) and n items of different sizes such that ith - item has an integer size S[i], find a selection of subset of items whose sizes sum to exactly K, or determine that no such subset exists. No fractional selection is permitted. K=14//knapsacksize//itemsS[1]=2,S[2]=4,S[3]=7,S[4]=8 Table is given below to help you. In the table, Enter a ' T ' in the table if a solution exists for a sack size and includes the item. Enter a ' O ' in the table if a solution exists for a sack size and does not include the item. Enter a-- in the table if a solution does not exist for a sack size
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
