Least Impossible Subset Sum

189 Views Asked by At

Given a set A which contains natural numbers from 1 to N. Also given another set B which contains p natural numbers between 1 to N. We have to find out the least sum of subset which is not possible in the set A-B
One way to do so is to apply subset sum problem on set A-B. Is there any faster method which uses set B to determine the least subset sum that is not possible?