Cool_Happy wrote:
> 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.
As one poster wrote, you're just looking to find all integer
partitions (without repetitions). Offhand, I don't see how this is
analagous to the subset-sum problem, unless we just make the trivial
knapsack problem using the set {1,2,..,N}. Is there no way to make
use of the special nature of this problem, in which there are no
negative numbers?
Bob H
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---