Macaulay2 » Documentation
Packages » SchurRings :: partitions(Set,BasicList)
next | previous | forward | backward | up | index | toc

partitions(Set,BasicList) -- Partitions of a set

Description

Given a set S and a partition L=\{l_1\geq l_2\geq\cdots\}, the method returns the list of set-partitions of S of type L, i.e. ways of writing S=S_1\cup S_2\cup\cdots with the S_i pairwise disjoint and |S_i|=l_i. The blocks come out as an unordered collection of sets.

i1 : partitions(set{1,2,3,4},{2,1,1})

o1 = {set {set {3}, set {4}, set {1, 2}}, set {set {1, 3}, set {4}, set {2}},
     ------------------------------------------------------------------------
     set {set {3}, set {2}, set {4, 1}}, set {set {1}, set {4}, set {2, 3}},
     ------------------------------------------------------------------------
     set {set {4, 2}, set {3}, set {1}}, set {set {1}, set {2}, set {4, 3}}}

o1 : List
i2 : partitions(set{a,b,c,d,e},new Partition from {3,2})

o2 = {set {set {c, d, e}, set {a, b}}, set {set {c, d, a}, set {e, b}}, set
     ------------------------------------------------------------------------
     {set {a, e}, set {c, d, b}}, set {set {c, a, e}, set {d, b}}, set {set
     ------------------------------------------------------------------------
     {c, e, b}, set {d, a}}, set {set {c, a, b}, set {d, e}}, set {set {d, a,
     ------------------------------------------------------------------------
     e}, set {c, b}}, set {set {c, a}, set {d, e, b}}, set {set {c, e}, set
     ------------------------------------------------------------------------
     {d, a, b}}, set {set {a, e, b}, set {c, d}}}

o2 : List

Changing the shape L changes the cycle type. Two blocks of size 2 and one fixed point on five points is the number of permutations of cycle type (2,2,1) divided by the size of the corresponding centralizer:

i3 : partitions(set{1,2,3,4,5},{2,2,1})

o3 = {set {set {5}, set {4, 3}, set {1, 2}}, set {set {5, 3}, set {4}, set
     ------------------------------------------------------------------------
     {1, 2}}, set {set {3}, set {4, 5}, set {1, 2}}, set {set {4, 2}, set
     ------------------------------------------------------------------------
     {5}, set {1, 3}}, set {set {1, 3}, set {4}, set {5, 2}}, set {set {5},
     ------------------------------------------------------------------------
     set {2, 3}, set {4, 1}}, set {set {5, 1}, set {4}, set {2, 3}}, set {set
     ------------------------------------------------------------------------
     {3}, set {5, 2}, set {4, 1}}, set {set {4, 2}, set {3}, set {5, 1}}, set
     ------------------------------------------------------------------------
     {set {1, 3}, set {2}, set {4, 5}}, set {set {5, 3}, set {2}, set {4,
     ------------------------------------------------------------------------
     1}}, set {set {5, 1}, set {2}, set {4, 3}}, set {set {1}, set {4, 5},
     ------------------------------------------------------------------------
     set {2, 3}}, set {set {4, 2}, set {1}, set {5, 3}}, set {set {1}, set
     ------------------------------------------------------------------------
     {4, 3}, set {5, 2}}}

o3 : List
i4 : #partitions(set{1,2,3,4,5},{2,2,1})

o4 = 15

Passing a Partition is equivalent to passing the underlying list; counting block-partitions of shape (3,1) recovers 4 \choose 1:

i5 : partitions(set{1,2,3,4},new Partition from {3,1})

o5 = {set {set {4}, set {1, 2, 3}}, set {set {4, 1, 2}, set {3}}, set {set
     ------------------------------------------------------------------------
     {2}, set {4, 1, 3}}, set {set {4, 2, 3}, set {1}}}

o5 : List
i6 : #partitions(set{1,2,3,4},new Partition from {3,1})

o6 = 4

Supplying a single-block shape returns a singleton list: the only set-partition of type (n) is S itself.

i7 : partitions(set{1,2,3},{3})

o7 = {set {set {1, 2, 3}}}

o7 : List

Ways to use this method:


The source of this document is in SchurRings.m2:6764:0.