combinat::skewPartitions --
skew partitions
IntroductionThe library combinat::skewPartitions provides functions for counting,
generating, and manipulating skew partitions of fixed
size.
Details[.outer, inner]
[[5,4,3,1],[3,3,1]]: +---+
| |
+---+---+---+
| | |
+---+---+---+
| |
+---+---+
| | |
+---+---+
And this is not a skew partition:
+---+
| |
+---+---+---+
| | |
+---+---+
+---+---+
| | |
+---+---+
[[5,4,3,1],[3,1]]: +---+
| |
+---+---+---+
| | | |
+---+---+---+---+
| | | |
+---+---+---+---+
| | |
+---+---+
And our first example of skew partition is not a connected one.[[4,3,3,2,1],[3,2,2]]:
+---+
| |
+---+---+
| | |
+---+---+---+
| |
+---+
| |
+---+---+
| |
+---+
See combinat::skewPartitions::conjugate.Cat::CombinatorialClass
Related DomainsThe MuPAD domain of skew partitions: DOM_LIST
The MuPAD type of connected skew partitions.
isA(any type skp
<, nonnegative integer n>
<, Connected>)skp is a skew partition.
The second argument is either Connectedor
a non negative integer. In the case it is a non negative
integer, it indicates the size of the skew partition
and the function tests if skp is a
skew partition of size n,
and if it is Connectedthe function tests whether
skp is a connected skew partition.
With three arguments it is possible to tests if
skp is a connected skew partition of size n.
count(nonnegative integer n <, Connected>)n.
The result counts only the connected skew partitions
if it is said so.
generator(nonnegative integer n <, Connected>)n.
The result gives access only to connected skew partitions
if it is said so.
list(nonnegative integer n <, Connected>)n.
The result is a list of connected skew partitions
if it is said so.
conjugate(skew partition skp)skp. Geometrically, this operation amounts to a reflection of
the diagram of the partition with respect to the main diagonal.
jacobiTrudy(skew partition skp <, function>)skp. Its determinant express the skew Schur
polynomial associated to skp on the basis of homogenous complete
symmetric polynomial (see Macdonald I.-G., (1995), "Symmetric Functions
and Hall Polynomials", Oxford Science Publication). The default value of
the function argument is i -> h[i].
innerCorners(skew partition skp)
outerCorners(skew partition skp)skp.
printPretty(skew partition skp)
printCompact(skew partition skp)#.
printPrettyCorners(skew partition skp)x
and outer corners are marked with *. A %
marks a corner which is inner and outer at the same time.
printCompactCorners(skew partition skp)#, and x, *,
% mark the corners.
Example 1There are 9 skew partitions of size 3:
>> combinat::skewPartitions::count(3)
9
Here is the list:
>> combinat::skewPartitions::list(3)
[[[3], []], [[2, 1], []], [[3, 1], [1]], [[2, 2], [1]],
[[3, 2], [2]], [[1, 1, 1], []], [[2, 2, 1], [1, 1]],
[[2, 1, 1], [1]], [[3, 2, 1], [2, 1]]]
Here is a graphic representation of the list:
>> map(combinat::skewPartitions::list(3),
combinat::skewPartitions::printCompact)
-- # # ## ## # # # # --
| ###, ##, ##, #, #, #, #, # , # |
-- # # # # --
There are 4 connected skew partitions of size 3:
>> combinat::skewPartitions::count(3, Connected)
4
Here is the list:
>> combinat::skewPartitions::list(3, Connected)
[[[3], []], [[2, 1], []], [[2, 2], [1]], [[1, 1, 1], []]]
Here is a graphic representation of the list:
>> map(combinat::skewPartitions::list(3, Connected),
combinat::skewPartitions::printPretty)
-- +---+ --
| +---+ +---+---+ | | |
| +---+---+---+ | | | | | +---+ |
| | | | |, +---+---+, +---+---+, | | |
| +---+---+---+ | | | | | +---+ |
| +---+---+ +---+ | | |
-- +---+ --
When you want to run through the skew partitions of a given size, you can generate them one by one to save memory:
>> g := combinat::skewPartitions::generator(3):
g(); g(); g(); g(); g(); g(); g(); g(); g(); g()
[[3], []]
[[2, 1], []]
[[3, 1], [1]]
[[2, 2], [1]]
[[3, 2], [2]]
[[1, 1, 1], []]
[[2, 2, 1], [1, 1]]
[[2, 1, 1], [1]]
[[3, 2, 1], [2, 1]]
FAIL
It is also possible to generate connected skew partitions of a given size:
>> g := combinat::skewPartitions::generator(3, Connected):
g(); g(); g(); g(); g()
[[3], []]
[[2, 1], []]
[[2, 2], [1]]
[[1, 1, 1], []]
FAIL
Typically, this would be used as follows:
>> g := combinat::skewPartitions::generator(3, Connected):
while (p := g()) <> FAIL do print(p): end:
[[3], []]
[[2, 1], []]
[[2, 2], [1]]
[[1, 1, 1], []]
Example 2This is the conjugate of the skew partition [[4, 3, 1], [2]]:
>> combinat::skewPartitions::conjugate([[4, 3, 1], [2]])
[[3, 2, 2, 1], [1, 1]]
Geometrically, we just applied a reflection with respect to the main diagonal on the diagram of the partition. Of course, this operation is an involution:
>> combinat::skewPartitions::conjugate([[3, 2, 2, 1], [1, 1]])
[[4, 3, 1], [2]]
Example 3The "jacobiTrudy" function compute the Jacobi-Trudy matrix,
see Macdonald I.-G., (1995), "Symmetric Functions and Hall
Polynomials", Oxford Science Publication.
>> combinat::skewPartitions::jacobiTrudy([[4, 3, 1], [2]])
+- -+
| h[2], h[0], 0 |
| |
| h[5], h[3], h[0] |
| |
| h[6], h[4], h[1] |
+- -+
>> combinat::skewPartitions::jacobiTrudy([[4, 3, 1], [2]], T)
+- -+
| T(2), T(0), 0 |
| |
| T(5), T(3), T(0) |
| |
| T(6), T(4), T(1) |
+- -+
Example 4This example shows how to compute the corners of a skew partition.
>> combinat::skewPartitions::innerCorners([[4, 3, 1], [2]])
[[1, 3], [2, 1]]
>> combinat::skewPartitions::outerCorners([[4, 3, 1], [2]])
[[1, 4], [2, 3], [3, 1]]
The inner and outer corners can be represented graphically:
>> combinat::skewPartitions::printPrettyCorners([[4, 3, 1], [2]])
+---+
| * |
+---+---+---+
| x | | * |
+---+---+---+---+
| x | * |
+---+---+
Sometimes inner and outer corners coincide:
>> combinat::skewPartitions::printPrettyCorners([[4, 3, 1], [3]])
+---+
| * |
+---+---+---+
| x | | * |
+---+---+---+---+
| % |
+---+
Or we can prefer a more compact representation:
>> combinat::skewPartitions::printPrettyCorners(
[[9, 8, 4, 3, 1], [6, 4, 3, 1]])
+---+
| % |
+---+---+---+
| x | * |
+---+---+---+
| % |
+---+---+---+---+---+
| x | | | * |
+---+---+---+---+---+
| x | | * |
+---+---+---+
>> combinat::skewPartitions::printCompactCorners(
[[9, 8, 4, 3, 1], [6, 4, 3, 1]])
%
x*
%
x##*
x#*
Super-DomainAx::systemRep
combinat::skewPartitions is a new library
MuPAD Combinat, an open source algebraic combinatorics package