combinat::setPartitions – set partitions of a set

The library combinat::setPartitions provides functions for counting, generating, and manipulating set partitions.

→ Examples

Related Domains:

combinat::partitions, combinat::setPartitionsOrdered

Details:

A set partition  s of a set set is a partition of set, into subsets called parts and represented as a set of sets. By extension, a set partition of a nonnegative integer n is the set partition of the integers from 1 to n. The number of set partitions of n is called the n-th Bell number.

There is a natural integer partition associated with a set partition, that is the non-decreasing sequence of sizes of all its parts.

There is a classical lattice associated with all set partitions of n. The infimum of two set partitions is the set partition obtained by intersecting all the parts of both set partitions. The supremum is obtained by transitive closure of the relation i related to j iff they are in the same part in at least one of the set partitions.

Entries

"domtype"

The MuPAD domain used to represent set partitions: DOM_SET

isA – test if an object is a set partition

combinat::setPartitions::isA(any type set, <set s, partition p>)

Returns whether set is a set partition.

If the first optional argument s is present, returns whether set is a set partition of s.

If the second optional argument p is present, returns whether set is a set partition of swith parts of sizes given by p.

count – number of set partitions

combinat::setPartitions::count(any type set, <partition p>)

Returns the number of partitions of set whose underlying partition is p.

list – list of the set partitions

combinat::setPartitions::list(any type set, <partition p>)

Returns the list of the set partitions of set whose underlying partition is p.

inf – infimum of two set partitions

combinat::setPartitions::inf(any type math)

Returns the infimum of the two set partitions s and t.

sup – supremum of two set partitions

combinat::setPartitions::sup(any type math)

Returns the supremum of the two set partitions s and t.

Example 1:

There are math set partitions of math:

combinat::setPartitions::count(3)

math

Here is the list:

combinat::setPartitions::list(3)

math

There are math set partitions of math whose underlying partition is math:

combinat::setPartitions::list(4,[2,1,1])

math

Example 2:

The infimum of {{2,3,4},{1}} and {{1,3},{2,4}} is:

combinat::setPartitions::inf({{2,3,4},{1}},{{1,3},{2,4}})

math

The supremum of {{2,3,4},{1}} and {{1,3},{2,4}} is:

combinat::setPartitions::sup({{2,3,4},{1}},{{1,3},{2,4}})

math