in reply to Which Permute or other module can give me all possible subsets of 6 numbers out of 40?

Hello,

your answer is in the tartaglia's triangle aka pascal one

n! C(n,k) = ---------- k!(n-k)!

is the basic formula to get your answer. To get some code search for tartaglia and pascal here at the monastery or look here.

If you want a module you can look at Math::Combinatorics too

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
  • Comment on Re: Which Permute or other module can give me all possible subsets of 6 numbers out of 40?
  • Download Code