Re: counting subsets of S so that sum(S_n) = N



Well, it's not really the NP completeness that bothers me, but rather
my lame "subset" generation method.. Many "subsets" repeat over time
so I have to keep track of already summed sets and check them each
time I've encountered a "valid" subset.

I'm wondering.. Is there really no elegant way to get rid of repeated
subsets, and make my algorithm generate only unique subsets?

.