Sum of Subsets Problem: Presented By
Sum of Subsets Problem: Presented By
Problem
Presented by:-
B.NUDRIK RAJU
(23C15A6601)
Introduction to the Sum of Subsets Problem
1
Algorithm
Example Scenario
• The subsets that sum to 9 in this case are {4, 5} and {3, 2,
4}.
3
Problem Definition
4
Recursive Backtracking Method
5
Backtracking Approach:
◦The idea is to explore all possible subsets and stop when the sum
exceeds the target or when all elements have been considered.
◦The basic steps:
◦Start from the first element and try to include it in the subset.
◦Move to the next element and try including or excluding it,
recursively.
◦If at any point, the sum of elements equals the target sum, store
that subset.
◦If the sum exceeds the target, backtrack and explore other
possibilities.
Applications of the Problem
8
Challenges and Limitations