According to Wikipedia:
In computer science, the subset sum problem is an important problem in complexity theory and cryptography. The problem is this: given a set (or multiset) of integers, is there a non-empty subset whose sum is zero? For example, given the set {−7, −3, −2, 5, 8}, the answer is yes because the subset {−3, −2, 5} sums to zero. The problem is NP-complete.
What is the output of the known algorithms which resolve exactly the subset sum problem?
For example:
- The algorithm which take $O(2^N*N)$ time.
- The algorithme which take $O(2^{N/2})$ time.
Is it just Yes / No or do they also give the extraction of solution?
Example:
$A = \{1, 3, 4, 5\}$
$k = 8$ (The search item)
- Output : YES
- Output : {1,3,4}, {5,3} (where 1+3+4=8 and 5+3=8)