Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Factorial Matrix

by Limbic~Region (Chancellor)
on Jan 29, 2008 at 19:33 UTC ( [id://664969]=note: print w/replies, xml ) Need Help??


in reply to Factorial Matrix

isutommyt,
Please note that what you are asking for is a specific type of combinations not permutations. In permutations, order is important so "A, 1, C" is not the same as "A, C, 1". I say a specific type of combination because you are asking for all possible combinations selecting 1 item from each group - a more general combination may have "C, D, 2".

One module has already been suggested. I would suggest Algorithm::Loops and tell you that solving the problem yourself is quite fun.

Cheers - L~R

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2025-03-27 00:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When you first encountered Perl, which feature amazed you the most?










    Results (68 votes). Check out past polls.

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.