Combinatorica`
Combinatorica`
SetPartitions
SetPartitions[set]
returns the list of set partitions of set.
returns the list of set partitions of {1,2,…,n}.
更多信息和选项
- To use SetPartitions, you first need to load the Combinatorica Package using Needs["Combinatorica`"].
- If all set partitions with a fixed number of subsets are needed, use KSetPartitions.