The possibility is ruled out by your question itself.There are exponential
subsets of a set,so finding all subset is not possible in polynomail time.
A backtracking approach is what you should think on,
On Mon, Dec 5, 2011 at 12:51 PM, Piyush Grover piyush4u.iit...@gmail.comwrote:
Given a set
Yeah but there's one more condition where it says if subset x is a
solution then all the subsets of x will not be part of the solution.
It should make some difference, exponential time solution is an obvious one.
On Mon, Dec 5, 2011 at 2:16 PM, saurabh singh saurab...@gmail.com wrote:
The
Given a set S of objects having weights Wi and values Vi, and given a
maximum weight Wmax.
Find *ALL* the maximal subsets of set S such that Sum(Wi) = Wmax.
Maximal subset means if {a, b, c} is a solution (such that Wa+Wb+Wc =
Wmax) it means there doesn't exist any other object x in S such that