#sudhakaratchala #daavideos #daaplaylist
Suppose we are given n distinct positive numbers and we desire to find all combinations of these numbers whose sum is M. This is called a sum of subsets problem.
The element xi of the solution vector is either ‘1’ or ‘0’ depends on whether the weight wi is included or not
For a node at level ‘i’ be the left child corresponding to xi =1 and right corresponds to xi =0
Негізгі бет Sum of Subsets Problem using Backtracking || Design and Analysis of Algorithms || DAA
Пікірлер: 40