Combinatorica`
Combinatorica`
KSetPartitions
KSetPartitions[set,k]
returns the list of set partitions of set with k blocks.
KSetPartitions[n,k]
returns the list of set partitions of {1,2,…} with k blocks. If all set partitions of a set are needed, use the function SetPartitions.
Details and Options
- To use KSetPartitions, you first need to load the Combinatorica Package using Needs["Combinatorica`"].