Question: The SUBSETSUM problem is defined as: Given A = {a_1, ..., a_m} positive integers, and a positive integer t (the target), find a subset A'
The SUBSETSUM problem is defined as: Given A = {a_1, ..., a_m} positive integers, and a positive integer t (the "target"), find a subset A' A s.t. sigma_a.elementor A'^a = t. (a) Give a Dynamic Programming algorithm for Subset Sum. Argue that if the inputs (the a_i and t) are given in unary, this algorithm runs in polynomial time
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
