Académique Documents
Professionnel Documents
Culture Documents
Given a set S of unique positive integers and a positive integer k, is there a subset
of S that adds up to k?
Requirements:
The project requires groups made up of 3 students (or 4 if the lab size is not divisible by 3). Your
group will create a program that “solves” the Subset Sum problem.
2 //# of sets
22 //target sum for the first set
3 21 17 14 8 1 9 34 5 11 //integers of the first set
70 //target sum for the second set
67 4 33 19 12 //integers of the second set
You are required to use the iterative backtracking algorithm discussed in the laboratory in
creating the Subset Sum Solver. That code may be modified to accommodate the nature of the
problem.
Example: