Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

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

by Limbic~Region (Chancellor)
on Oct 11, 2006 at 13:21 UTC ( #577606=note: print w/ replies, xml ) Need Help??


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
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://577606]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2014-09-15 05:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (145 votes), past polls