Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

(tye)Re2: Permutations

by tye (Sage)
on Mar 22, 2001 at 09:04 UTC ( [id://66251]=note: print w/replies, xml ) Need Help??


in reply to Re: Permutations
in thread Permutations

Actually that post contains code that claims to do "permutations" but that does something different than what the original poster is doing (and different than what I think of when "permutations" are requested) [ the "combinations" part of the code does that I would call "combinations" :) ].

merlyn's code gives all of the different ways of picking one item each from a collection of sets. Both my and the above permutations code gives all of the possible orderings of the items in a single set (though my code gives only unique orderings in cases when there are duplicates in the "set").

I mention this not to claim that my definition of "permutations" is the one true and correct definition, but to point out the difference to help prevent further confusion. (:

        - tye (but my friends call me "Tye")

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2024-04-23 12:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found