What are the solutions for the following sum of a subset problem?
What are the solutions for the following sum of a subset problem?
w[1:5]={2,7,8,9,15}; Sum required = 17
1 means the item is included.
0 means the item is excluded.
Show answerHide answer
Correct answer: (B) 11100; 10001; 00110
Explanation
The subsets summing to 17 are 2 + 7 + 8 (11100), 2 + 15 (10001) and 8 + 9 (00110).