Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: Generating powerset with progressive ordering

by tall_man (Parson)
on Feb 27, 2005 at 22:14 UTC ( #434940=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Generating powerset with progressive ordering
in thread Generating powerset with progressive ordering

I object to calling the use of divisors a "violation" of the original question. Given the prime factorization, it is a simple matter to multiply out all the possible combinations, giving the list of divisors. Math::Pari's divisor function just saves the work of doing the multiplications and sorting the results.


Comment on Re^3: Generating powerset with progressive ordering
Re^4: Generating powerset with progressive ordering
by Limbic~Region (Chancellor) on Feb 28, 2005 at 19:55 UTC
    tall_man,
    Given the downvotes - you aren't the only one who feels this way. I still like your solution for brevity, efficiency, and elegance even if it isn't the fastest. I really do need to learn more about Math::Pari.

    Cheers - L~R

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2015-07-03 23:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls