> Suppose u r given a positive number N.
> How will we find a set of distinct positive numbers having sum equal
> to N.
> There could be multiple such sets so what is the algo to find all
> those sets.

Yes, this is the subset-sum problem but all is not lost.

There is a dynamic programming solution:
http://en.wikipedia.org/wiki/Subset_sum_problem#Pseudo-polynomial_time_dynamic_programming_solution

And, there are the core branch and bound algorithms that can solve the
problem of size ~10000 in milliseconds. Search for "core knapsack
problems".


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to