Finding elements of an aggregate
sarma at centrum.cz
sarma at centrum.cz
Wed Apr 2 12:10:50 CEST 2008
Hello,
I am solving the following problem: with a given aggregate number and a set of values, I am looking for an algorithm to find all possible combinations of values from the given set whose sum equals to the given aggregate. All values are big numbers thus gmp seems to be the right choice; however I can't find an algorithm efficient in cases when the number of values within the set amounts to several hundred. So I'd like to ask if anyone could point me in the right direction - which algorithm to choose, what pproach to take? Has anyone done anything similar? Thank you.
Mac
More information about the gmp-discuss
mailing list