1. Engineering
  2. Computer Science
  3. please write a full answer...

Question: please write a full answer...

Question details

1. Describe recursive algorithms for the following generalizations of SUBSET- SUMİvenanarrayxțin]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

Please write a full answer

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution