Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://577606]
help
Chatterbox?
shmem is grabbed by nostalgia for Bolivia
[erix]: aah, ok.
[erix]: oh well, in each life some rain must fall
[erix]: if you're interested in tsv file reading in pg, look at file_fdw
[erix]: aka: create extension if not exists file_fdw;

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2018-02-23 15:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (302 votes). Check out past polls.

    Notices?