next | previous | forward | backward | up | top | index | toc | Macaulay2 website
Posets :: greeneKleitmanPartition

greeneKleitmanPartition -- computes the Greene-Kleitman partition of a poset



The Greene-Kleitman partition $l$ of $P$ is the partition such that the sum of the first $k$ parts of $l$ is the maximum number of elements in a union of $k$ chains in $P$.

i1 : P = poset {{1,2},{2,3},{3,4},{2,5},{6,3}};
i2 : greeneKleitmanPartition P

o2 = Partition{4, 2}

o2 : Partition

The conjugate of $l$ has the same property, but with chains replaced by antichains. Because of this, it is often better to count via antichains instead of chains. This can be done by passing "antichains" as the Strategy.

i3 : D = dominanceLattice 6;
i4 : time greeneKleitmanPartition(D, Strategy => "antichains")
     -- used 0.364424 seconds

o4 = Partition{9, 2}

o4 : Partition
i5 : time greeneKleitmanPartition(D, Strategy => "chains")
     -- used 0.000010936 seconds

o5 = Partition{9, 2}

o5 : Partition

The Greene-Kleitman partition of the $n$ chain is the partition of $n$ with $1$ part.

i6 : greeneKleitmanPartition chain 10

o6 = Partition{10}

o6 : Partition

See also

Ways to use greeneKleitmanPartition :

For the programmer

The object greeneKleitmanPartition is a method function with options.