Plane Partitions#
AUTHORS:
Jang Soo Kim (2016): Initial implementation
Jessica Striker (2016): Added additional methods
Kevin Dilks (2021): Added symmetry classes
- class sage.combinat.plane_partition.PlanePartition(parent, pp, check=True)#
Bases:
ClonableArray
A plane partition.
A plane partition is a stack of cubes in the positive orthant.
INPUT:
PP
– a list of lists which represents a tableaubox_size
– (optional) a list[A, B, C]
of 3 positive integers, whereA
,B
,C
are the lengths of the box in the \(x\)-axis, \(y\)-axis, \(z\)-axis, respectively; if this is not given, it is determined by the smallest box boundingPP
OUTPUT:
The plane partition whose tableau representation is
PP
.EXAMPLES:
sage: PP = PlanePartition([[4,3,3,1],[2,1,1],[1,1]]) sage: PP Plane partition [[4, 3, 3, 1], [2, 1, 1], [1, 1]]
- bounding_box()#
Return the smallest box \((a, b, c)\) that
self
is contained in.EXAMPLES:
sage: PP = PlanePartition([[5,2,1,1], [2,2], [2]]) sage: PP.bounding_box() (3, 4, 5)
- cells()#
Return the list of cells inside
self
.EXAMPLES:
sage: PP = PlanePartition([[3,1],[2]]) sage: PP.cells() [[0, 0, 0], [0, 0, 1], [0, 0, 2], [0, 1, 0], [1, 0, 0], [1, 0, 1]]
- check()#
Check to see that
self
is a valid plane partition.EXAMPLES:
sage: a = PlanePartition([[4,3,3,1],[2,1,1],[1,1]]) sage: a.check() sage: b = PlanePartition([[1,2],[1]]) Traceback (most recent call last): ... ValueError: not weakly decreasing along rows sage: c = PlanePartition([[1,1],[2]]) Traceback (most recent call last): ... ValueError: not weakly decreasing along columns sage: d = PlanePartition([[2,-1],[-2]]) Traceback (most recent call last): ... ValueError: entries not all nonnegative sage: e = PlanePartition([[3/2,1],[.5]]) Traceback (most recent call last): ... ValueError: entries not all integers
- complement(tableau_only=False)#
Return the complement of
self
.If the parent of
self
consists only of partitions inside a given box, then the complement is taken in this box. Otherwise, the complement is taken in the smallest box containing the plane partition. The empty plane partition with no box specified is its own complement.If
tableau_only
is set toTrue
, then only the tableau consisting of the projection of boxes size onto the \(xy\)-plane is returned instead of aPlanePartition
. This output will not have empty trailing rows or trailing zeros removed.EXAMPLES:
sage: PP = PlanePartition([[4,3,3,1],[2,1,1],[1,1]]) sage: PP.complement() Plane partition [[4, 4, 3, 3], [4, 3, 3, 2], [3, 1, 1]] sage: PP.complement(True) [[4, 4, 3, 3], [4, 3, 3, 2], [3, 1, 1, 0]]
- contains(PP)#
Return
True
ifPP
is a plane partition that fits insideself
.Specifically,
self
containsPP
if, for all \(i\), \(j\), the height ofPP
at \(ij\) is less than or equal to the height ofself
at \(ij\).EXAMPLES:
sage: P1 = PlanePartition([[5,4,3], [3,2,2], [1]]) sage: P2 = PlanePartition([[3,2], [1,1], [0,0], [0,0]]) sage: P3 = PlanePartition([[5,5,5], [2,1,0]]) sage: P1.contains(P2) True sage: P2.contains(P1) False sage: P1.contains(P3) False sage: P3.contains(P2) True
- cyclically_rotate(preserve_parent=False)#
Return the cyclic rotation of
self
.By default, if the parent of
self
consists of plane partitions inside an \(a \times b \times c\) box, the result will have a parent consisting of partitions inside a \(c \times a \times b\) box, unless the optional parameterpreserve_parent
is set toTrue
. Enabling this setting may give an element that is not an element of its parent.EXAMPLES:
sage: PlanePartition([[3,2,1],[2,2],[2]]).cyclically_rotate() Plane partition [[3, 3, 1], [2, 2], [1]] sage: PP = PlanePartition([[4,1],[1],[1]]) sage: PP.cyclically_rotate() Plane partition [[3, 1, 1, 1], [1]] sage: PP == PP.cyclically_rotate().cyclically_rotate().cyclically_rotate() True sage: PP = PlanePartitions([4,3,2]).random_element() sage: PP.cyclically_rotate().parent() Plane partitions inside a 2 x 4 x 3 box sage: PP = PlanePartitions([3,4,2])([[2,2,2,2],[2,2,2,2],[2,2,2,2]]) sage: PP_rotated = PP.cyclically_rotate(preserve_parent=True) sage: PP_rotated in PP_rotated.parent() False
- is_CSPP()#
Return whether
self
is a cyclically symmetric plane partition.A plane partition is cyclically symmetric if its \(x\), \(y\), and \(z\) tableaux are all equal.
EXAMPLES:
sage: PP = PlanePartition([[4,3,3,1],[2,1,1],[1,1]]) sage: PP.is_CSPP() False sage: PP = PlanePartition([[3,2,2],[3,1,0],[1,1,0]]) sage: PP.is_CSPP() True
- is_CSSCPP()#
Return whether
self
is a cyclically symmetric and self-complementary plane partition.EXAMPLES:
sage: PP = PlanePartition([[4,3,3,1],[2,1,1],[1,1]]) sage: PP.is_CSSCPP() False sage: PP = PlanePartition([[4,4,4,1],[3,3,2,1],[3,2,1,1],[3,0,0,0]]) sage: PP.is_CSSCPP() True
- is_CSTCPP()#
Return whether
self
is a cyclically symmetric and transpose-complementary plane partition.EXAMPLES:
sage: PP = PlanePartition([[4,3,3,1],[2,1,1],[1,1]]) sage: PP.is_CSTCPP() False sage: PP = PlanePartition([[4,4,3,2],[4,3,2,1],[3,2,1,0],[2,1,0,0]]) sage: PP.is_CSTCPP() True
- is_SCPP()#
Return whether
self
is a self-complementary plane partition.Note that the complement of a plane partition (and thus the property of being self-complementary) is dependent on the choice of a box that it is contained in. If no parent/bounding box is specified, the box is taken to be the smallest box that contains the plane partition.
EXAMPLES:
sage: PP = PlanePartition([[4,3,3,1],[2,1,1],[1,1]]) sage: PP.is_SCPP() False sage: PP = PlanePartition([[4,4,4,4],[4,4,2,0],[4,2,0,0],[0,0,0,0]]) sage: PP.is_SCPP() False sage: PP = PlanePartitions([4,4,4])([[4,4,4,4],[4,4,2,0],[4,2,0,0],[0,0,0,0]]) sage: PP.is_SCPP() True
- is_SPP()#
Return whether
self
is a symmetric plane partition.A plane partition is symmetric if the corresponding tableau is symmetric about the diagonal.
EXAMPLES:
sage: PP = PlanePartition([[4,3,3,1],[2,1,1],[1,1]]) sage: PP.is_SPP() False sage: PP = PlanePartition([[3,3,2],[3,3,2],[2,2,2]]) sage: PP.is_SPP() True sage: PP = PlanePartition([[3,2,1],[2,0,0]]) sage: PP.is_SPP() False sage: PP = PlanePartition([[3,2,0],[2,0,0]]) sage: PP.is_SPP() True sage: PP = PlanePartition([[3,2],[2,0],[1,0]]) sage: PP.is_SPP() False sage: PP = PlanePartition([[3,2],[2,0],[0,0]]) sage: PP.is_SPP() True
- is_SSCPP()#
Return whether
self
is a symmetric, self-complementary plane partition.EXAMPLES:
sage: PP = PlanePartition([[4,3,3,1],[2,1,1],[1,1]]) sage: PP.is_SSCPP() False sage: PP = PlanePartition([[4,3,3,2],[3,2,2,1],[3,2,2,1],[2,1,1,0]]) sage: PP.is_SSCPP() True sage: PP = PlanePartition([[2,1],[1,0]]) sage: PP.is_SSCPP() True sage: PP = PlanePartition([[4,3,2],[3,2,1],[2,1,0]]) sage: PP.is_SSCPP() True sage: PP = PlanePartition([[4,2,2,2],[2,2,2,2],[2,2,2,2],[2,2,2,0]]) sage: PP.is_SSCPP() True
- is_TCPP()#
Return whether
self
is a transpose-complementary plane partition.EXAMPLES:
sage: PP = PlanePartition([[4,3,3,1],[2,1,1],[1,1]]) sage: PP.is_TCPP() False sage: PP = PlanePartition([[4,4,3,2],[4,4,2,1],[4,2,0,0],[2,0,0,0]]) sage: PP.is_TCPP() True
- is_TSPP()#
Return whether
self
is a totally symmetric plane partition.A plane partition is totally symmetric if it is both symmetric and cyclically symmetric.
EXAMPLES:
sage: PP = PlanePartition([[4,3,3,1],[2,1,1],[1,1]]) sage: PP.is_TSPP() False sage: PP = PlanePartition([[3,3,3],[3,3,2],[3,2,1]]) sage: PP.is_TSPP() True
- is_TSSCPP()#
Return whether
self
is a totally symmetric self-complementary plane partition.EXAMPLES:
sage: PP = PlanePartition([[4,3,3,1],[2,1,1],[1,1]]) sage: PP.is_TSSCPP() False sage: PP = PlanePartition([[4,4,3,2],[4,3,2,1],[3,2,1,0],[2,1,0,0]]) sage: PP.is_TSSCPP() True
- maximal_boxes()#
Return the coordinates of the maximal boxes of
self
.The maximal boxes of a plane partitions are the boxes that can be removed from a plane partition and still yield a valid plane partition.
EXAMPLES:
sage: sorted(PlanePartition([[3,2,1],[2,2],[2]]).maximal_boxes()) [[0, 0, 2], [0, 2, 0], [1, 1, 1], [2, 0, 1]] sage: sorted(PlanePartition([[2,1],[1],[1]]).maximal_boxes()) [[0, 0, 1], [0, 1, 0], [2, 0, 0]]
- number_of_boxes()#
Return the number of boxes in the plane partition.
EXAMPLES:
sage: PP = PlanePartition([[3,1],[2]]) sage: PP.number_of_boxes() 6
- plot(show_box=False, colors=None)#
Return a plot of
self
.INPUT:
show_box
– boolean (default:False
); ifTrue
, also shows the visible tiles on the \(xy\)-, \(yz\)-, \(zx\)-planescolors
– (default:["white", "lightgray", "darkgray"]
) list[A, B, C]
of 3 strings representing colors
EXAMPLES:
sage: PP = PlanePartition([[4,3,3,1],[2,1,1],[1,1]]) sage: PP.plot() # optional - sage.plot Graphics object consisting of 27 graphics primitives
- plot3d(colors=None)#
Return a 3D-plot of
self
.INPUT:
colors
– (default:["white", "lightgray", "darkgray"]
) list[A, B, C]
of 3 strings representing colors
EXAMPLES:
sage: PP = PlanePartition([[4,3,3,1],[2,1,1],[1,1]]) sage: PP.plot3d() # optional - sage.plot Graphics3d Object
- pp(show_box=False)#
Return a pretty print of the plane partition.
INPUT:
show_box
– boolean (default:False
); ifTrue
, also shows the visible tiles on the \(xy\)-, \(yz\)-, \(zx\)-planes
OUTPUT:
A pretty print of the plane partition.
EXAMPLES:
sage: PlanePartition([[4,3,3,1],[2,1,1],[1,1]]).pp() __ /\_\ __/\/_/ __/\_\/\_\ /\_\/_/\/\_\ \/\_\_\/\/_/ \/_/\_\/_/ \/_/\_\ \/_/ sage: PlanePartition([[4,3,3,1],[2,1,1],[1,1]]).pp(True) ______ /_/_/\_\ /_/_/\/_/\ /_/\_\/\_\/\ /\_\/_/\/\_\/\ \/\_\_\/\/_/\/ \/_/\_\/_/\/ \_\/_/\_\/ \_\_\/_/
- to_order_ideal()#
Return the order ideal corresponding to
self
.Todo
As many families of symmetric plane partitions are in bijection with order ideals in an associated poset, this function could feasibly have options to send symmetric plane partitions to the associated order ideal in that poset, instead.
EXAMPLES:
sage: PlanePartition([[3,2,1],[2,2],[2]]).to_order_ideal() [(0, 0, 0), (0, 0, 1), (0, 0, 2), (0, 1, 0), (0, 1, 1), (0, 2, 0), (1, 0, 0), (1, 0, 1), (1, 1, 0), (1, 1, 1), (2, 0, 0), (2, 0, 1)] sage: PlanePartition([[2,1],[1],[1]]).to_order_ideal() [(0, 0, 0), (0, 0, 1), (0, 1, 0), (1, 0, 0), (2, 0, 0)]
- to_tableau()#
Return the tableau class of
self
.EXAMPLES:
sage: PP = PlanePartition([[4,3,3,1],[2,1,1],[1,1]]) sage: PP.to_tableau() [[4, 3, 3, 1], [2, 1, 1], [1, 1]]
- transpose(tableau_only=False)#
Return the transpose of
self
.If
tableau_only
is set toTrue
, then only the tableau consisting of the projection of boxes size onto the \(xy\)-plane is returned instead of aPlanePartition
. This will not necessarily have trailing rows or trailing zeros removed.EXAMPLES:
sage: PP = PlanePartition([[4,3,3,1],[2,1,1],[1,1]]) sage: PP.transpose() Plane partition [[4, 2, 1], [3, 1, 1], [3, 1], [1]] sage: PP.transpose(True) [[4, 2, 1], [3, 1, 1], [3, 1, 0], [1, 0, 0]] sage: PPP = PlanePartitions([1, 2, 3]) sage: PP = PPP([[1, 1]]) sage: PT = PP.transpose(); PT Plane partition [[1], [1]] sage: PT.parent() Plane partitions inside a 2 x 1 x 3 box
- x_tableau(tableau=True)#
Return the projection of
self
in the \(x\) direction.If
tableau
is set toFalse
, then only the list of lists consisting of the projection of boxes size onto the \(yz\)-plane is returned instead of aTableau
object. This output will not have empty trailing rows or trailing zeros removed.EXAMPLES:
sage: PP = PlanePartition([[4,3,3,1],[2,1,1],[1,1]]) sage: PP.x_tableau() [[3, 2, 1, 1], [3, 1, 1, 0], [2, 1, 1, 0], [1, 0, 0, 0]]
- y_tableau(tableau=True)#
Return the projection of
self
in the \(y\) direction.If
tableau
is set toFalse
, then only the list of lists consisting of the projection of boxes size onto the \(xz\)-plane is returned instead of aTableau
object. This output will not have empty trailing rows or trailing zeros removed.EXAMPLES:
sage: PP = PlanePartition([[4,3,3,1],[2,1,1],[1,1]]) sage: PP.y_tableau() [[4, 3, 2], [3, 1, 0], [3, 0, 0], [1, 0, 0]]
- z_tableau(tableau=True)#
Return the projection of
self
in the \(z\) direction.If
tableau
is set toFalse
, then only the list of lists consisting of the projection of boxes size onto the \(xy\)-plane is returned instead of aTableau
object. This output will not have empty trailing rows or trailing zeros removed.EXAMPLES:
sage: PP = PlanePartition([[4,3,3,1],[2,1,1],[1,1]]) sage: PP.z_tableau() [[4, 3, 3, 1], [2, 1, 1, 0], [1, 1, 0, 0]]
- class sage.combinat.plane_partition.PlanePartitions(box_size=None, symmetry=None, category=None)#
Bases:
UniqueRepresentation
,Parent
Plane partitions.
PlanePartitions()
returns the class of all plane partitions.PlanePartitions(n)
return the class of all plane partitions with precisely \(n\) boxes.PlanePartitions([a, b, c])
returns the class of plane partitions that fit inside an \(a \times b \times c\) box.PlanePartitions([a, b, c])
has the optional keywordsymmetry
, which restricts the plane partitions inside a box of the specified size satisfying certain symmetry conditions.symmetry='SPP'
gives the class of symmetric plane partitions. which is all plane partitions fixed under reflection across the diagonal. Requires that \(a = b\).symmetry='CSPP'
gives the class of cyclic plane partitions, which is all plane partitions fixed under cyclic rotation of coordinates. Requires that \(a = b = c\).symmetry='TSPP'
gives the class of totally symmetric plane partitions, which is all plane partitions fixed under any interchanging of coordinates. Requires that \(a = b = c\).symmetry='SCPP'
gives the class of self-complementary plane partitions. which is all plane partitions that are equal to their own complement in the specified box. Requires at least one of \(a,b,c\) be even.symmetry='TCPP'
gives the class of transpose complement plane partitions, which is all plane partitions whose complement in the box of the specified size is equal to their transpose. Requires \(a = b\) and at least one of \(a, b, c\) be even.symmetry='SSCPP'
gives the class of symmetric self-complementary plane partitions, which is all plane partitions that are both symmetric and self-complementary. Requires \(a = b\) and at least one of \(a, b, c\) be even.symmetry='CSTCPP'
gives the class of cyclically symmetric transpose complement plane partitions, which is all plane partitions that are both symmetric and equal to the transpose of their complement. Requires \(a = b = c\).symmetry='CSSCPP'
gives the class of cyclically symmetric self-complementary plane partitions, which is all plane partitions that are both cyclically symmetric and self-complementary. Requires \(a = b = c\) and all \(a, b, c\) be even.symmetry='TSSCPP'
gives the class of totally symmetric self-complementary plane partitions, which is all plane partitions that are totally symmetric and also self-complementary. Requires \(a = b = c\) and all \(a, b, c\) be even.
EXAMPLES:
If no arguments are passed, then the class of all plane partitions is returned:
sage: PlanePartitions() Plane partitions sage: [[2,1],[1]] in PlanePartitions() True
If an integer \(n\) is passed, then the class of plane partitions of \(n\) is returned:
sage: PlanePartitions(3) Plane partitions of size 3 sage: PlanePartitions(3).list() [Plane partition [[3]], Plane partition [[2, 1]], Plane partition [[1, 1, 1]], Plane partition [[2], [1]], Plane partition [[1, 1], [1]], Plane partition [[1], [1], [1]]]
If a three-element tuple or list \([a,b,c]\) is passed, then the class of all plane partitions that fit inside and \(a \times b \times c\) box is returned:
sage: PlanePartitions([2,2,2]) Plane partitions inside a 2 x 2 x 2 box sage: [[2,1],[1]] in PlanePartitions([2,2,2]) True
If an additional keyword
symmetry
is pass along with a three-element tuple or list \([a, b,c ]\), then the class of all plane partitions that fit inside an \(a \times b \times c\) box with the specified symmetry is returned:sage: PlanePartitions([2,2,2], symmetry='CSPP') Cyclically symmetric plane partitions inside a 2 x 2 x 2 box sage: [[2,1],[1]] in PlanePartitions([2,2,2], symmetry='CSPP') True
See also
- Element#
alias of
PlanePartition
- box()#
Return the size of the box of the plane partition of
self
is contained in.EXAMPLES:
sage: P = PlanePartitions([4,3,5]) sage: P.box() (4, 3, 5) sage: PP = PlanePartitions() sage: PP.box() is None True
- symmetry()#
Return the symmetry class of
self
.EXAMPLES:
sage: PP = PlanePartitions([3,3,2], symmetry='SPP') sage: PP.symmetry() 'SPP' sage: PP = PlanePartitions() sage: PP.symmetry() is None True
- class sage.combinat.plane_partition.PlanePartitions_CSPP(box_size)#
Bases:
PlanePartitions
Plane partitions that fit inside a box of a specified size that are cyclically symmetric.
- cardinality()#
Return the cardinality of
self
.The number of cyclically symmetric plane partitions inside an \(a \times a \times a\) box is equal to
\[\left(\prod_{i=1}^{a} \frac{3i - 1}{3i - 2}\right) \left(\prod_{1 \leq i < j \leq a} \frac{i+j+a-1}{2i+j-1}\right).\]EXAMPLES:
sage: P = PlanePartitions([4,4,4], symmetry='CSPP') sage: P.cardinality() 132
- from_antichain(acl)#
Return the cyclically symmetric plane partition corresponding to an antichain in the poset given in
to_poset()
.EXAMPLES:
sage: PP = PlanePartitions([3,3,3], symmetry='CSPP') sage: A = [(0, 2, 2), (1, 1, 1)] sage: PP.from_antichain(A) Plane partition [[3, 3, 3], [3, 2, 1], [3, 1, 1]]
- from_order_ideal(I)#
Return the cylically symmetric plane partition corresponding to an order ideal in the poset given in
to_poset()
.EXAMPLES:
sage: PP = PlanePartitions([3,3,3], symmetry='CSPP') sage: I = [(0, 0, 0), (0, 0, 1), (0, 0, 2), (0, 1, 1), (0, 1, 2), ....: (1, 0, 2), (0, 2, 2), (1, 1, 1), (1, 1, 2), (1, 2, 2)] sage: PP.from_order_ideal(I) Plane partition [[3, 3, 3], [3, 3, 3], [3, 3, 2]]
- random_element()#
Return a uniformly random element of
self
.ALGORITHM:
This uses the
random_order_ideal()
method and the natural bijection between cyclically symmetric plane partitions and order ideals in an associated poset.EXAMPLES:
sage: PP = PlanePartitions([3,3,3], symmetry='CSPP') sage: PP.random_element() # random Plane partition [[3, 2, 2], [3, 1], [1, 1]]
- to_poset()#
Return a partially ordered set whose order ideals are in bijection with cyclically symmetric plane partitions.
EXAMPLES:
sage: PP = PlanePartitions([3,3,3], symmetry='CSPP') sage: PP.to_poset() Finite poset containing 11 elements sage: PP.to_poset().order_ideals_lattice().cardinality() == PP.cardinality() True
- class sage.combinat.plane_partition.PlanePartitions_CSSCPP(box_size)#
Bases:
PlanePartitions
Plane partitions that fit inside a box of a specified size that are cyclically symmetric self-complementary.
- cardinality()#
Return the cardinality of
self
.The number of cyclically symmetric self-complementary plane partitions inside a \(2a \times 2a \times 2a\) box is equal to
\[\left( \prod_{i=0}^{a-1} \frac{(3i+1)!}{(a+i)!} \right)^2.\]EXAMPLES:
sage: P = PlanePartitions([6,6,6], symmetry='CSSCPP') sage: P.cardinality() 49
- class sage.combinat.plane_partition.PlanePartitions_CSTCPP(box_size)#
Bases:
PlanePartitions
Plane partitions that fit inside a box of a specified size that are cyclically symmetric and transpose-complement.
- cardinality()#
Return the cardinality of
self
.The number of cyclically symmetric transpose complement plane partitions inside a \(2a \times 2a \times 2a\) box is equal to
\[\prod_{i=0}^{a-1} \frac{(3i+1)(6i)!(2i)!}{(4i+1)!(4i)!}.\]EXAMPLES:
sage: P = PlanePartitions([6,6,6], symmetry='CSTCPP') sage: P.cardinality() 11
- class sage.combinat.plane_partition.PlanePartitions_SCPP(box_size)#
Bases:
PlanePartitions
Plane partitions that fit inside a box of a specified size that are self-complementary.
- cardinality()#
Return the cardinality of
self
.The number of self complementary plane partitions inside a \(2a \times 2b \times 2c\) box is equal to
\[\left(\prod_{i=1}^{r}\prod_{j=1}^{b} \frac{i + j + c - 1}{i + j - 1}\right)^2.\]The number of self complementary plane partitions inside an \((2a+1) \times 2b \times 2c\) box is equal to
\[\left(\prod_{i=1}^{a} \prod_{j=1}^{b} \frac{i+j+c-1}{i+j-1} \right) \left(\prod_{i=1}^{a+1} \prod_{j=1}^{b} \frac{i+j+c-1}{i+j-1} \right).\]The number of self complementary plane partitions inside an \((2a+1) \times (2b+1) \times 2c\) box is equal to
\[\left(\prod_{i=1}^{a+1} \prod_{j=1}^{b} \frac{i+j+c-1}{i+j-1} \right) \left(\prod_{i=1}^{a} \prod_{j=1}^{b+1} \frac{i+j+c-1}{i+j-1} \right).\]EXAMPLES:
sage: P = PlanePartitions([4,4,4], symmetry='SCPP') sage: P.cardinality() 400 sage: P = PlanePartitions([5,4,4], symmetry='SCPP') sage: P.cardinality() 1000 sage: P = PlanePartitions([4,5,4], symmetry='SCPP') sage: P.cardinality() 1000 sage: P = PlanePartitions([4,4,5], symmetry='SCPP') sage: P.cardinality() 1000 sage: P = PlanePartitions([5,5,4], symmetry='SCPP') sage: P.cardinality() 2500 sage: P = PlanePartitions([5,4,5], symmetry='SCPP') sage: P.cardinality() 2500 sage: P = PlanePartitions([4,5,5], symmetry='SCPP') sage: P.cardinality() 2500
- class sage.combinat.plane_partition.PlanePartitions_SPP(box_size)#
Bases:
PlanePartitions
Plane partitions that fit inside a box of a specified size that are symmetric.
- cardinality()#
Return the cardinality of
self
.The number of symmetric plane partitions inside an \(a \times a \times b\) box is equal to
\[\left(\prod_{i=1}^{a} \frac{2i + b - 1}{2i - 1}\right) \left(\prod_{1 \leq i < j \leq a} \frac{i+j+b-1}{i+j-1}\right).\]EXAMPLES:
sage: P = PlanePartitions([3,3,2], symmetry='SPP') sage: P.cardinality() 35
- from_antichain(A)#
Return the symmetric plane partition corresponding to an antichain in the poset given in
to_poset()
.EXAMPLES:
sage: PP = PlanePartitions([3,3,2], symmetry='SPP') sage: A = [(2, 2, 0), (1, 0, 1), (1, 1, 0)] sage: PP.from_antichain(A) Plane partition [[2, 2, 1], [2, 1, 1], [1, 1, 1]]
- from_order_ideal(I)#
Return the symmetric plane partition corresponding to an order ideal in the poset given in
to_poset()
.EXAMPLES:
sage: PP = PlanePartitions([3,3,2], symmetry='SPP') sage: I = [(0, 0, 0), (1, 0, 0), (1, 1, 0), (2, 0, 0)] sage: PP.from_order_ideal(I) Plane partition [[1, 1, 1], [1, 1], [1]]
- random_element()#
Return a uniformly random element of
self
.ALGORITHM:
This uses the
random_order_ideal()
method and the natural bijection between symmetric plane partitions and order ideals in an associated poset.EXAMPLES:
sage: PP = PlanePartitions([3,3,2], symmetry='SPP') sage: PP.random_element() # random Plane partition [[2, 2, 2], [2, 2], [2]]
- to_poset()#
Return a poset whose order ideals are in bijection with symmetric plane partitions.
EXAMPLES:
sage: PP = PlanePartitions([3,3,2], symmetry='SPP') sage: PP.to_poset() Finite poset containing 12 elements sage: PP.to_poset().order_ideals_lattice().cardinality() == PP.cardinality() True
- class sage.combinat.plane_partition.PlanePartitions_SSCPP(box_size)#
Bases:
PlanePartitions
Plane partitions that fit inside a box of a specified size that are symmetric self-complementary.
- cardinality()#
Return the cardinality of
self
.The number of symmetric self-complementary plane partitions inside a \(2a \times 2a \times 2b\) box is equal to
\[\prod_{i=1}^a \prod_{j=1}^a \frac{i + j + b - 1}{i + j - 1}.\]The number of symmetric self-complementary plane partitions inside a \((2a+1) \times (2a+1) \times 2b\) box is equal to
\[\prod_{i=1}^a \prod_{j=1}^{a+1} \frac{i + j + b - 1}{i + j - 1}.\]EXAMPLES:
sage: P = PlanePartitions([4,4,2], symmetry='SSCPP') sage: P.cardinality() 6 sage: Q = PlanePartitions([3,3,2], symmetry='SSCPP') sage: Q.cardinality() 3
- class sage.combinat.plane_partition.PlanePartitions_TCPP(box_size)#
Bases:
PlanePartitions
Plane partitions that fit inside a box of a specified size that are transpose-complement.
- cardinality()#
Return the cardinality of
self
.The number of transpose complement plane partitions inside an \(a \times a \times 2b\) box is equal to
\[\binom{b+1-1}{a-1} \prod_{1\leq i,j \leq a-2} \frac{i + j + 2b - 1}{i + j - 1}.\]EXAMPLES:
sage: P = PlanePartitions([3,3,2], symmetry='TCPP') sage: P.cardinality() 5
- class sage.combinat.plane_partition.PlanePartitions_TSPP(box_size)#
Bases:
PlanePartitions
Plane partitions that fit inside a box of a specified size that are totally symmetric.
- cardinality()#
Return the cardinality of
self
.The number of totally symmetric plane partitions inside an \(a \times a \times a\) box is equal to
\[\prod_{1 \leq i \leq j \leq a} \frac{i+j+a-1}{i+2j-2}.\]EXAMPLES:
sage: P = PlanePartitions([4,4,4], symmetry='TSPP') sage: P.cardinality() 66
- from_antichain(acl)#
Return the totally symmetric plane partition corresponding to an antichain in the poset given in
to_poset()
.EXAMPLES:
sage: PP = PlanePartitions([3,3,3], symmetry='TSPP') sage: A = [(0, 0, 2), (0, 1, 1)] sage: PP.from_antichain(A) Plane partition [[3, 2, 1], [2, 1], [1]]
- from_order_ideal(I)#
Return the totally symmetric plane partition corresponding to an order ideal in the poset given in
to_poset()
.EXAMPLES:
sage: PP = PlanePartitions([3,3,3], symmetry='TSPP') sage: I = [(0, 0, 0), (0, 0, 1), (0, 0, 2), (0, 1, 1)] sage: PP.from_order_ideal(I) Plane partition [[3, 2, 1], [2, 1], [1]]
- to_poset()#
Return a poset whose order ideals are in bijection with totally symmetric plane partitions.
EXAMPLES:
sage: PP = PlanePartitions([3,3,3], symmetry='TSPP') sage: PP.to_poset() Finite poset containing 10 elements sage: PP.to_poset().order_ideals_lattice().cardinality() == PP.cardinality() True
- class sage.combinat.plane_partition.PlanePartitions_TSSCPP(box_size)#
Bases:
PlanePartitions
Plane partitions that fit inside a box of a specified size that are totally symmetric self-complementary.
- cardinality()#
Return the cardinality of
self
.The number of totally symmetric self-complementary plane partitions inside a \(2a \times 2a \times 2a\) box is equal to
\[\prod_{i=0}^{a-1} \frac{(3i+1)!}{(a+i)!}.\]EXAMPLES:
sage: P = PlanePartitions([6,6,6], symmetry='TSSCPP') sage: P.cardinality() 7
- from_antichain(acl)#
Return the totally symmetric self-complementary plane partition corresponding to an antichain in the poset given in
to_poset()
.EXAMPLES:
sage: PP = PlanePartitions([6,6,6], symmetry='TSSCPP') sage: A = [(0, 0, 1), (1, 1, 0)] sage: PP.from_antichain(A) Plane partition [[6, 6, 6, 5, 5, 3], [6, 5, 5, 4, 3, 1], [6, 5, 4, 3, 2, 1], [5, 4, 3, 2, 1], [5, 3, 2, 1, 1], [3, 1, 1]]
- from_order_ideal(I)#
Return the totally symmetric self-complementary plane partition corresponding to an order ideal in the poset given in
to_poset()
.EXAMPLES:
sage: PP = PlanePartitions([6,6,6], symmetry='TSSCPP') sage: I = [(0, 0, 0), (0, 1, 0), (1, 1, 0)] sage: PP.from_order_ideal(I) Plane partition [[6, 6, 6, 5, 5, 3], [6, 5, 5, 3, 3, 1], [6, 5, 5, 3, 3, 1], [5, 3, 3, 1, 1], [5, 3, 3, 1, 1], [3, 1, 1]]
- to_poset()#
Return a poset whose order ideals are in bijection with totally symmetric self-complementary plane partitions.
EXAMPLES:
sage: PP = PlanePartitions([6,6,6], symmetry='TSSCPP') sage: PP.to_poset() Finite poset containing 4 elements sage: PP.to_poset().order_ideals_lattice().cardinality() == PP.cardinality() True
- class sage.combinat.plane_partition.PlanePartitions_all#
Bases:
PlanePartitions
,DisjointUnionEnumeratedSets
All plane partitions.
- an_element()#
Return a particular element of the class.
- class sage.combinat.plane_partition.PlanePartitions_box(box_size)#
Bases:
PlanePartitions
All plane partitions that fit inside a box of a specified size.
By convention, a plane partition in an \(a \times b \times c\) box will have at most \(a\) rows, of lengths at most \(b\), with entries at most \(c\).
- cardinality()#
Return the cardinality of
self
.The number of plane partitions inside an \(a \times b \times c\) box is equal to
\[\prod_{i=1}^{a} \prod_{j=1}^{b} \prod_{k=1}^{c} \frac{i+j+k-1}{i+j+k-2}.\]EXAMPLES:
sage: P = PlanePartitions([4,3,5]) sage: P.cardinality() 116424
- from_antichain(A)#
Return the plane partition corresponding to an antichain in the poset given in
to_poset()
.EXAMPLES:
sage: A = [(1,0,1), (0,1,1), (1,1,0)] sage: PlanePartitions([2,2,2]).from_antichain(A) Plane partition [[2, 2], [2, 1]]
- from_order_ideal(I)#
Return the plane partition corresponding to an order ideal in the poset given in
to_poset()
.EXAMPLES:
sage: I = [(1, 0, 0), (1, 0, 1), (1, 1, 0), (0, 1, 0), (0, 0, 0), (0, 0, 1), (0, 1, 1)] sage: PlanePartitions([2,2,2]).from_order_ideal(I) Plane partition [[2, 2], [2, 1]]
- random_element()#
Return a uniformly random plane partition inside a box.
ALGORITHM:
This uses the
random_order_ideal()
method and the natural bijection with plane partitions.EXAMPLES:
sage: P = PlanePartitions([4,3,5]) sage: P.random_element() # random Plane partition [[4, 3, 3], [4], [2]]
- to_poset()#
Return the product of three chains poset, whose order ideals are naturally in bijection with plane partitions inside a box.
EXAMPLES:
sage: PlanePartitions([2,2,2]).to_poset() Finite lattice containing 8 elements
- class sage.combinat.plane_partition.PlanePartitions_n(n)#
Bases:
PlanePartitions
Plane partitions with a fixed number of boxes.
- cardinality()#
Return the number of plane partitions with
n
boxes.Calculated using the recurrence relation
\[PL(n) = \sum_{k=1}^n PL(n-k) \sigma_2(k),\]where \(\sigma_k(n)\) is the sum of the \(k\)-th powers of divisors of \(n\).
EXAMPLES:
sage: P = PlanePartitions(17) sage: P.cardinality() 18334