Perl solution to the Subset Sum problem.
authorBradley M. Kuhn <bkuhn@ebb.org>
Tue, 8 Jan 2013 18:38:23 +0000 (13:38 -0500)
committerBradley M. Kuhn <bkuhn@ebb.org>
Tue, 8 Jan 2013 18:38:23 +0000 (13:38 -0500)
commit2dca069d810b61cdfad46e00abcb1a3edaf56d1b
tree6de52a76d209630bb36d4ab03c43f47ac206acf2
parentd0e37d596c2bfa9368ea89005f4916999e38c58e
Perl solution to the Subset Sum problem.

This uses the well-known Dynamic Programming solution.  I found two
different incarnations of it around, one for nonnegative set, and one for
integers.

Reference for the nonnegative one:
  http://stackoverflow.com/questions/4355955/subset-sum-algorithm

Reference for integers one:
  http://en.wikipedia.org/wiki/Subset_sum_problem
subsetsumsolver.plx [new file with mode: 0644]