Combinatorica`
Combinatorica`
KSubsets
KSubsets[l,k]
gives all subsets of set l containing exactly k elements, ordered lexicographically.
更多信息和选项
- To use KSubsets, you first need to load the Combinatorica Package using Needs["Combinatorica`"].
KSubsets[l,k]
gives all subsets of set l containing exactly k elements, ordered lexicographically.