Reporting Reduces to Decision
Assume that subset-sum ({a1,…,an},b) is true X := the empty set;
if subset-sum({ai+1,…,an},b - ai) then
Example: 3, 5, 2, 7, 4, 2, b = 11
5, 2, 7, 4, 2, b = 11-3 --> yes, X = {3}, b = 8
2, 7, 4, 2, b = 8-5 --> no
7, 4, 2, b = 8-2 --> yes, X = {3,2}, b = 6
2, b = 6-4 --> yes, X = {3,2,4}, b = 2
b = 4 -2 --> yes, X ={3,2,4,2}