http://www.perlmonks.org?node_id=577606


in reply to Re: Challenge: Number of unique ways to reach target sum
in thread Challenge: Number of unique ways to reach target sum

tall_man,
Quite impressive. It does not come near to being what I had hoped for but that is my fault. I was so close to the problem that I could not see the forest through the trees. I naively assumed that counting the ways would mean generating them and as you and others have shown - this is a very poor assumption.

I am very happy that you have contributed though because not only do I know a little bit more about math theory, I have a new way of looking at problems.

Cheers - L~R

  • Comment on Re^2: Challenge: Number of unique ways to reach target sum

Replies are listed 'Best First'.
Re^3: Challenge: Number of unique ways to reach target sum
by tall_man (Parson) on Oct 12, 2006 at 06:26 UTC
    My second script can be used to generate all the partitions, just by running it for each index up to the count. You could even wrap it in an iterator, just like that Partitions::Unrestricted package you wrote a while ago.