Question: Please write a full answer 1. Describe recursive algorithms for the following generalizations of SUBSET- SUMvenanarrayxin]ofpositive integersandan integer T, compute the number of subsets of

Please write a full answer
1. Describe recursive algorithms for the following generalizations of SUBSET- SUMvenanarrayxi"n]ofpositive integersandan integer T, compute the number of subsets of X whose elements sum to T. (b) Given two arrays X[1..n] and W[1.. n] of positive integers and an integer T, where each W[i] denotes the weight of the corresponding element X[i], compute the maximum weight subset of X whose elements sum to T. If no subset of X sums to T, your algorithm should return-oo
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
