0
1.2kviews
| written 6.7 years ago by |
Write and explain sum of subset algorithm for n = 5, W = {2, 7, 8, 9, 15} M = 17
Given positive numbers (weight) w_i where (1<=i<=n) and m.
This problem calls for finding all subsets of w_i whose sum is m.
For e.g. if n=4, m=31, (w_1,w_2,w_3,w_4) = …