Combinatorica`
Combinatorica`

KSubsets

KSubsets[l,k]

gives all subsets of set l containing exactly k elements, ordered lexicographically.

Details