Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: How to generate restricted partitions of an integer

by hv (Prior)
on Nov 11, 2004 at 13:17 UTC ( [id://407023]=note: print w/replies, xml ) Need Help??


in reply to Re: How to generate restricted partitions of an integer
in thread How to generate restricted partitions of an integer

This will miss many conversions such as 10 => 2 2 2 2 2 (not catered for by %subs) and 20 => 5 5 5 5 (not catered for by the single iterative substitution approach).

Hugo

Replies are listed 'Best First'.
Re^3: How to generate restricted partitions of an integer
by thor (Priest) on Nov 11, 2004 at 13:23 UTC
    But...there isn't a 2 euro note, per the original OP (I wouldn't know...I'm a dumb American). The breaking of a 20 into 4 5's is valid, though.

    thor

    Feel the white light, the light within
    Be your own disciple, fan the sparks of will
    For all of us waiting, your kingdom will come

Re^3: How to generate restricted partitions of an integer
by BrowserUk (Patriarch) on Nov 11, 2004 at 13:24 UTC

    Agreed. It's an idea that needs some work.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail
    "Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-19 08:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found