# Skew Tableaux¶

AUTHORS:

• Mike Hansen: Initial version
• Travis Scrimshaw, Arthur Lubovsky (2013-02-11): Factored out CombinatorialClass
class sage.combinat.skew_tableau.SemistandardSkewTableaux(category=None)

Semistandard skew tableaux.

This class can be initialized with several optional variables: the size of the skew tableaux (as a nameless integer variable), their shape (as a nameless skew partition variable), their weight (weight(), as a nameless second variable after either the size or the shape) and their maximum entry (as an optional keyword variable called max_entry, unless the weight has been specified). If neither the weight nor the maximum entry is specified, the maximum entry defaults to the size of the tableau.

Note that “maximum entry” does not literally mean the highest entry; instead it is just an upper bound that no entry is allowed to surpass.

EXAMPLES:

The (infinite) class of all semistandard skew tableaux:

sage: SemistandardSkewTableaux()
Semistandard skew tableaux


The (still infinite) class of all semistandard skew tableaux with maximum entry $$2$$:

sage: SemistandardSkewTableaux(max_entry=2)
Semistandard skew tableaux with maximum entry 2


The class of all semistandard skew tableaux of given size $$3$$ and maximum entry $$3$$:

sage: SemistandardSkewTableaux(3)
Semistandard skew tableaux of size 3 and maximum entry 3


To set a different maximum entry:

sage: SemistandardSkewTableaux(3, max_entry = 7)
Semistandard skew tableaux of size 3 and maximum entry 7


Specifying a shape:

sage: SemistandardSkewTableaux([[2,1],[]])
Semistandard skew tableaux of shape [2, 1] / [] and maximum entry 3


Specifying both a shape and a maximum entry:

sage: S = SemistandardSkewTableaux([[2,1],[1]], max_entry = 3); S
Semistandard skew tableaux of shape [2, 1] / [1] and maximum entry 3
sage: S.list()
[[[None, 1], [1]],
[[None, 2], [1]],
[[None, 1], [2]],
[[None, 3], [1]],
[[None, 1], [3]],
[[None, 2], [2]],
[[None, 3], [2]],
[[None, 2], [3]],
[[None, 3], [3]]]

sage: for n in range(5):
....:     print n, len(SemistandardSkewTableaux([[2,2,1],[1]], max_entry = n))
0 0
1 0
2 1
3 9
4 35


Specifying a shape and a weight:

sage: SemistandardSkewTableaux([[2,1],[]],[2,1])
Semistandard skew tableaux of shape [2, 1] / [] and weight [2, 1]


(the maximum entry is redundant in this case and thus is ignored).

Specifying a size and a weight:

sage: SemistandardSkewTableaux(3, [2,1])
Semistandard skew tableaux of size 3 and weight [2, 1]


Warning

If the shape is not specified, the iterator of this class yields only skew tableaux whose shape is reduced, in the sense that there are no empty rows before the last nonempty row, and there are no empty columns before the last nonempty column. (Otherwise it would go on indefinitely.)

Warning

This class acts as a factory. The resulting classes are mainly useful for iteration. Do not rely on their containment tests, as they are not correct, e. g.:

sage: SkewTableau([[None]]) in SemistandardSkewTableaux(2)
True

class sage.combinat.skew_tableau.SemistandardSkewTableaux_all(max_entry)

Class of all semistandard skew tableaux, possibly with a given maximum entry.

class sage.combinat.skew_tableau.SemistandardSkewTableaux_shape(p, max_entry)

Class of semistandard skew tableaux of a fixed skew shape $$\lambda / \mu$$ with a given max entry.

A semistandard skew tableau with max entry $$i$$ is required to have all its entries less or equal to $$i$$. It is not required to actually contain an entry $$i$$.

INPUT:

• p – A skew partition
• max_entry – The max entry; defaults to the size of p.

Warning

Input is not checked; please use SemistandardSkewTableaux to ensure the options are properly parsed.

cardinality()

EXAMPLES:

sage: SemistandardSkewTableaux([[2,1],[]]).cardinality()
8
sage: SemistandardSkewTableaux([[2,1],[]], max_entry=2).cardinality()
2

class sage.combinat.skew_tableau.SemistandardSkewTableaux_shape_weight(p, mu)

Class of semistandard skew tableaux of a fixed skew shape $$\lambda / \nu$$ and weight $$\mu$$.

class sage.combinat.skew_tableau.SemistandardSkewTableaux_size(n, max_entry)

Class of all semistandard skew tableaux of a fixed size $$n$$, possibly with a given maximum entry.

cardinality()

EXAMPLES:

sage: SemistandardSkewTableaux(2).cardinality()
8

class sage.combinat.skew_tableau.SemistandardSkewTableaux_size_weight(n, mu)

Class of semistandard tableaux of a fixed size $$n$$ and weight $$\mu$$.

cardinality()

EXAMPLES:

sage: SemistandardSkewTableaux(2,[1,1]).cardinality()
4

class sage.combinat.skew_tableau.SkewTableau(parent, st)

A skew tableau.

Note that Sage by default uses the English convention for partitions and tableaux. To change this, see TableauOptions.

EXAMPLES:

sage: st = SkewTableau([[None, 1],[2,3]]); st
[[None, 1], [2, 3]]
sage: st.inner_shape()
[1]
sage: st.outer_shape()
[2, 2]


The expr form of a skew tableau consists of the inner partition followed by a list of the entries in each row from bottom to top:

sage: SkewTableau(expr=[[1,1],[[5],[3,4],[1,2]]])
[[None, 1, 2], [None, 3, 4], [5]]

bender_knuth_involution(k, rows=None, check=True)

Return the image of self under the $$k$$-th Bender–Knuth involution, assuming self is a skew semistandard tableau.

Let $$T$$ be a tableau, then a lower free k in T means a cell of $$T$$ which is filled with the integer $$k$$ and whose direct lower neighbor is not filled with the integer $$k + 1$$ (in particular, this lower neighbor might not exist at all). Let an upper free k + 1 in T mean a cell of $$T$$ which is filled with the integer $$k + 1$$ and whose direct upper neighbor is not filled with the integer $$k$$ (in particular, this neighbor might not exist at all). It is clear that for any row $$r$$ of $$T$$, the lower free $$k$$‘s and the upper free $$k + 1$$‘s in $$r$$ together form a contiguous interval or $$r$$.

The k-th Bender–Knuth switch at row i changes the entries of the cells in this interval in such a way that if it used to have $$a$$ entries of $$k$$ and $$b$$ entries of $$k + 1$$, it will now have $$b$$ entries of $$k$$ and $$a$$ entries of $$k + 1$$. For fixed $$k$$, the $$k$$-th Bender–Knuth switches for different $$i$$ commute. The composition of the $$k$$-th Bender–Knuth switches for all rows is called the k-th Bender–Knuth involution. This is used to show that the Schur functions defined by semistandard (skew) tableaux are symmetric functions.

INPUT:

• k – an integer
• rows – (Default None) When set to None, the method computes the $$k$$-th Bender–Knuth involution as defined above. When an iterable, this computes the composition of the $$k$$-th Bender–Knuth switches at row $$i$$ over all $$i$$ in rows. When set to an integer $$i$$, the method computes the $$k$$-th Bender–Knuth switch at row $$i$$. Note the indexing of the rows starts with $$1$$.
• check – (Default: True) Check to make sure self is semistandard. Set to False to avoid this check.

OUTPUT:

The image of self under either the $$k$$-th Bender–Knuth involution, the $$k$$-th Bender–Knuth switch at a certain row, or the composition of such switches, as detailed in the INPUT section.

EXAMPLES:

sage: t = SkewTableau([[None,None,None,4,4,5,6,7],[None,2,4,6,7,7,7],[None,4,5,8,8,9],[None,6,7,10],[None,8,8,11],[None],[4]])
sage: t
[[None, None, None, 4, 4, 5, 6, 7], [None, 2, 4, 6, 7, 7, 7], [None, 4, 5, 8, 8, 9], [None, 6, 7, 10], [None, 8, 8, 11], [None], [4]]
sage: t.bender_knuth_involution(1)
[[None, None, None, 4, 4, 5, 6, 7], [None, 1, 4, 6, 7, 7, 7], [None, 4, 5, 8, 8, 9], [None, 6, 7, 10], [None, 8, 8, 11], [None], [4]]
sage: t.bender_knuth_involution(4)
[[None, None, None, 4, 5, 5, 6, 7], [None, 2, 4, 6, 7, 7, 7], [None, 5, 5, 8, 8, 9], [None, 6, 7, 10], [None, 8, 8, 11], [None], [5]]
sage: t.bender_knuth_involution(5)
[[None, None, None, 4, 4, 5, 6, 7], [None, 2, 4, 5, 7, 7, 7], [None, 4, 6, 8, 8, 9], [None, 5, 7, 10], [None, 8, 8, 11], [None], [4]]
sage: t.bender_knuth_involution(6)
[[None, None, None, 4, 4, 5, 6, 6], [None, 2, 4, 6, 6, 7, 7], [None, 4, 5, 8, 8, 9], [None, 6, 7, 10], [None, 8, 8, 11], [None], [4]]
sage: t.bender_knuth_involution(666) == t
True
sage: t.bender_knuth_involution(4, 2) == t
True
sage: t.bender_knuth_involution(4, 3)
[[None, None, None, 4, 4, 5, 6, 7], [None, 2, 4, 6, 7, 7, 7], [None, 5, 5, 8, 8, 9], [None, 6, 7, 10], [None, 8, 8, 11], [None], [4]]


The Bender–Knuth involution is an involution:

sage: t = SkewTableau([[None,3,4,4],[None,6,10],[7,7,11],[18]])
sage: all(t.bender_knuth_involution(k).bender_knuth_involution(k) == t for k in range(1,4))
True


The same for the single switches:

sage: all(t.bender_knuth_involution(k, j).bender_knuth_involution(k, j) == t for k in range(1,5) for j in range(1, 5))
True


Locality of the Bender–Knuth involutions:

sage: all(t.bender_knuth_involution(k).bender_knuth_involution(l) == t.bender_knuth_involution(l).bender_knuth_involution(k) for k in range(1,5) for l in range(1,5) if abs(k - l) > 1)
True


Coxeter relation of the Bender–Knuth involutions (they have the form $$(ab)^6 = 1$$):

sage: p = lambda t, k: t.bender_knuth_involution(k).bender_knuth_involution(k + 1)
sage: all(p(p(p(p(p(p(t,k),k),k),k),k),k) == t for k in range(1,5))
True


TESTS:

sage: t = SkewTableau([])
sage: t.bender_knuth_involution(3)
[]
sage: t = SkewTableau([[None,None],[None]])
sage: t.bender_knuth_involution(3)
[[None, None], [None]]


AUTHORS:

• Darij Grinberg (2013-05-14)
cells()

Return the cells in self.

EXAMPLES:

sage: s = SkewTableau([[None,1,2],[3],[6]])
sage: s.cells()
[(0, 1), (0, 2), (1, 0), (2, 0)]

cells_by_content(c)

Return the coordinates of the cells in self with content c.

EXAMPLES:

sage: s = SkewTableau([[None,1,2],[3,4,5],[6]])
sage: s.cells_by_content(0)
[(1, 1)]
sage: s.cells_by_content(1)
[(0, 1), (1, 2)]
sage: s.cells_by_content(2)
[(0, 2)]
sage: s.cells_by_content(-1)
[(1, 0)]
sage: s.cells_by_content(-2)
[(2, 0)]

cells_containing(i)

Return the list of cells in which the letter i appears in the tableau self. The list is ordered with cells appearing from left to right.

Cells are given as pairs of coordinates $$(a, b)$$, where both rows and columns are counted from $$0$$ (so $$a = 0$$ means the cell lies in the leftmost column of the tableau, etc.).

EXAMPLES:

sage: t = SkewTableau([[None,None,3],[None,3,5],[4,5]])
sage: t.cells_containing(5)
[(2, 1), (1, 2)]
sage: t.cells_containing(4)
[(2, 0)]
sage: t.cells_containing(2)
[]

sage: t = SkewTableau([[None,None,None,None],[None,4,5],[None,5,6],[None,9],[None]])
sage: t.cells_containing(2)
[]
sage: t.cells_containing(4)
[(1, 1)]
sage: t.cells_containing(5)
[(2, 1), (1, 2)]

sage: SkewTableau([]).cells_containing(3)
[]

sage: SkewTableau([[None,None],[None]]).cells_containing(3)
[]

conjugate()

Return the conjugate of self.

EXAMPLES:

sage: SkewTableau([[None,1],[2,3]]).conjugate()
[[None, 2], [1, 3]]

entries_by_content(c)

Return the entries in self with content c.

EXAMPLES:

sage: s = SkewTableau([[None,1,2],[3,4,5],[6]])
sage: s.entries_by_content(0)
[4]
sage: s.entries_by_content(1)
[1, 5]
sage: s.entries_by_content(2)
[2]
sage: s.entries_by_content(-1)
[3]
sage: s.entries_by_content(-2)
[6]

evaluation()

Return the weight (aka evaluation) of the tableau self. Trailing zeroes are omitted when returning the weight.

The weight of a skew tableau $$T$$ is the sequence $$(a_1, a_2, a_3, \ldots )$$, where $$a_k$$ is the number of entries of $$T$$ equal to $$k$$. This sequence contains only finitely many nonzero entries.

The weight of a skew tableau $$T$$ is the same as the weight of the reading word of $$T$$, for any reading order.

evaluation() is a synonym for this method.

EXAMPLES:

sage: SkewTableau([[1,2],[3,4]]).weight()
[1, 1, 1, 1]

sage: SkewTableau([[None,2],[None,4],[None,5],[None]]).weight()
[0, 1, 0, 1, 1]

sage: SkewTableau([]).weight()
[]

sage: SkewTableau([[None,None,None],[None]]).weight()
[]

sage: SkewTableau([[None,3,4],[None,6,7],[4,8],[5,13],[6],[7]]).weight()
[0, 0, 1, 2, 1, 2, 2, 1, 0, 0, 0, 0, 1]


TESTS:

We check that this agrees with going to the word:

sage: t = SkewTableau([[None,None,4,7,15],[6,2,16],[2,3,19],[4,5],[7]])
sage: def by_word(T):
....:     ed = T.to_word().evaluation_dict()
....:     m = max(ed.keys()) + 1
....:     return [ed.get(k,0) for k in range(1,m)]
sage: by_word(t) == t.weight()
True
sage: SST = SemistandardTableaux(shape=[3,1,1])
sage: all(by_word(t) == SkewTableau(t).weight() for t in SST)
True

filling()

Return a list of the non-empty entries in self.

EXAMPLES:

sage: t = SkewTableau([[None,1],[2,3]])
sage: t.filling()
[[1], [2, 3]]

inner_shape()

Return the inner shape of self.

EXAMPLES:

sage: SkewTableau([[None,1,2],[None,3],[4]]).inner_shape()
[1, 1]
sage: SkewTableau([[1,2],[3,4],[7]]).inner_shape()
[]
sage: SkewTableau([[None,None,None,2,3],[None,1],[None],[2]]).inner_shape()
[3, 1, 1]

inner_size()

Return the size of the inner shape of self.

EXAMPLES:

sage: SkewTableau([[None, 2, 4], [None, 3], [1]]).inner_size()
2
sage: SkewTableau([[None, 2], [1, 3]]).inner_size()
1

is_k_tableau(k)

Checks whether self is a valid skew weak $$k$$-tableau.

EXAMPLES:

sage: t = SkewTableau([[None,2,3],[2,3],[3]])
sage: t.is_k_tableau(3)
True
sage: t = SkewTableau([[None,1,3],[2,2],[3]])
sage: t.is_k_tableau(3)
False

is_ribbon()

Return True if and only if the shape of self is a ribbon, that is if it has no $$2 \times 2$$ boxes.

EXAMPLES:

sage: SkewTableau([[None,1],[2,3]]).is_ribbon()
True
sage: SkewTableau([[None,1,2],[3,4,5]]).is_ribbon()
False

is_semistandard()

Return True if self is a semistandard skew tableau and False otherwise.

EXAMPLES:

sage: SkewTableau([[None, 2, 2], [1, 3]]).is_semistandard()
True
sage: SkewTableau([[None, 2], [2, 4]]).is_semistandard()
True
sage: SkewTableau([[None, 3], [2, 4]]).is_semistandard()
True
sage: SkewTableau([[None, 2], [1, 2]]).is_semistandard()
False

is_standard()

Return True if self is a standard skew tableau and False otherwise.

EXAMPLES:

sage: SkewTableau([[None, 2], [1, 3]]).is_standard()
True
sage: SkewTableau([[None, 2], [2, 4]]).is_standard()
False
sage: SkewTableau([[None, 3], [2, 4]]).is_standard()
False
sage: SkewTableau([[None, 2], [2, 4]]).is_standard()
False

outer_shape()

Return the outer shape of self.

EXAMPLES:

sage: SkewTableau([[None,1,2],[None,3],[4]]).outer_shape()
[3, 2, 1]

outer_size()

Return the size of the outer shape of self.

EXAMPLES:

sage: SkewTableau([[None, 2, 4], [None, 3], [1]]).outer_size()
6
sage: SkewTableau([[None, 2], [1, 3]]).outer_size()
4

pp()

Return a pretty print string of the tableau.

EXAMPLES:

sage: SkewTableau([[None,2,3],[None,4],[5]]).pp()
.  2  3
.  4
5

rectify()

Return a Tableau formed by applying the jeu de taquin process to self. See page 15 of [FW].

REFERENCES:

 [FW] (1, 2) William Fulton, Young Tableaux, Cambridge University Press 1997.

EXAMPLES:

sage: s = SkewTableau([[None,1],[2,3]])
sage: s.rectify()
[[1, 3], [2]]
sage: SkewTableau([[None, None, None, 4],[None,None,1,6],[None,None,5],[2,3]]).rectify()
[[1, 3, 4, 6], [2, 5]]


TESTS:

sage: s
[[None, 1], [2, 3]]

restrict(n)

Return the restriction of the (semi)standard skew tableau to all the numbers less than or equal to n.

Note

If only the outer shape of the restriction, rather than the whole restriction, is needed, then the faster method restriction_outer_shape() is preferred. Similarly if only the skew shape is needed, use restriction_shape().

EXAMPLES:

sage: SkewTableau([[None,1],[2],[3]]).restrict(2)
[[None, 1], [2]]
sage: SkewTableau([[None,1],[2],[3]]).restrict(1)
[[None, 1]]
sage: SkewTableau([[None,1],[1],[2]]).restrict(1)
[[None, 1], [1]]

restriction_outer_shape(n)

Return the outer shape of the restriction of the semistandard skew tableau self to $$n$$.

If $$T$$ is a semistandard skew tableau and $$n$$ is a nonnegative integer, then the restriction of $$T$$ to $$n$$ is defined as the (semistandard) skew tableau obtained by removing all cells filled with entries greater than $$n$$ from $$T$$.

This method computes merely the outer shape of the restriction. For the restriction itself, use restrict().

EXAMPLES:

sage: SkewTableau([[None,None],[2,3],[3,4]]).restriction_outer_shape(3)
[2, 2, 1]
sage: SkewTableau([[None,2],[None],[4],[5]]).restriction_outer_shape(2)
[2, 1]
sage: T = SkewTableau([[None,None,3,5],[None,4,4],[17]])
sage: T.restriction_outer_shape(0)
[2, 1]
sage: T.restriction_outer_shape(2)
[2, 1]
sage: T.restriction_outer_shape(3)
[3, 1]
sage: T.restriction_outer_shape(4)
[3, 3]
sage: T.restriction_outer_shape(19)
[4, 3, 1]

restriction_shape(n)

Return the skew shape of the restriction of the semistandard skew tableau self to n.

If $$T$$ is a semistandard skew tableau and $$n$$ is a nonnegative integer, then the restriction of $$T$$ to $$n$$ is defined as the (semistandard) skew tableau obtained by removing all cells filled with entries greater than $$n$$ from $$T$$.

This method computes merely the skew shape of the restriction. For the restriction itself, use restrict().

EXAMPLES:

sage: SkewTableau([[None,None],[2,3],[3,4]]).restriction_shape(3)
[2, 2, 1] / [2]
sage: SkewTableau([[None,2],[None],[4],[5]]).restriction_shape(2)
[2, 1] / [1, 1]
sage: T = SkewTableau([[None,None,3,5],[None,4,4],[17]])
sage: T.restriction_shape(0)
[2, 1] / [2, 1]
sage: T.restriction_shape(2)
[2, 1] / [2, 1]
sage: T.restriction_shape(3)
[3, 1] / [2, 1]
sage: T.restriction_shape(4)
[3, 3] / [2, 1]

shape()

Return the shape of self.

EXAMPLES:

sage: SkewTableau([[None,1,2],[None,3],[4]]).shape()
[3, 2, 1] / [1, 1]

size()

Return the number of cells in self.

EXAMPLES:

sage: SkewTableau([[None, 2, 4], [None, 3], [1]]).size()
4
sage: SkewTableau([[None, 2], [1, 3]]).size()
3

slide(corner=None)

Apply a jeu-de-taquin slide to self on the specified corner and returns the new tableau. If no corner is given an arbitrary corner is chosen.

See [FW] p12-13.

EXAMPLES:

sage: st = SkewTableau([[None, None, None, None,2],[None, None, None, None,6], [None, 2, 4, 4], [2, 3, 6], [5,5]])
sage: st.slide((2,0))
[[None, None, None, None, 2], [None, None, None, None, 6], [2, 2, 4, 4], [3, 5, 6], [5]]


TESTS:

sage: st
[[None, None, None, None, 2], [None, None, None, None, 6], [None, 2, 4, 4], [2, 3, 6], [5, 5]]

standardization(check=True)

Return the standardization of self, assuming self is a semistandard skew tableau.

The standardization of a semistandard skew tableau $$T$$ is the standard skew tableau $$\mathrm{st}(T)$$ of the same shape as $$T$$ whose reversed reading word is the standardization of the reversed reading word of $$T$$.

The standardization of a word $$w$$ can be formed by replacing all $$1$$‘s in $$w$$ by $$1, 2, \ldots, k_1$$ from left to right, all $$2$$‘s in $$w$$ by $$k_1 + 1, k_1 + 2, \ldots, k_2$$, and repeating for all letters that appear in $$w$$. See also Word.standard_permutation().

INPUT:

• check – (Default: True) Check to make sure self is semistandard. Set to False to avoid this check.

EXAMPLES:

sage: t = SkewTableau([[None,None,3,4,7,19],[None,4,4,8],[None,5,16,17],[None],[2],[3]])
sage: t.standardization()
[[None, None, 3, 6, 8, 12], [None, 4, 5, 9], [None, 7, 10, 11], [None], [1], [2]]


Standard skew tableaux are fixed under standardization:

sage: p = Partition([4,3,3,2])
sage: q = Partitions(3).random_element()
sage: all((t == t.standardization() for t in StandardSkewTableaux([p, q])))
True


The reading word of the standardization is the standardization of the reading word:

sage: t = SkewTableau([[None,3,4,4],[None,6,10],[7,7,11],[18]])
sage: t.to_word().standard_permutation() == t.standardization().to_permutation()
True


TESTS:

Some corner cases:

sage: t = SkewTableau([[None,None],[None]])
sage: t.standardization()
[[None, None], [None]]
sage: t = SkewTableau([])
sage: t.standardization()
[]

to_chain(max_entry=None)

Return the chain of partitions corresponding to the (semi)standard skew tableau self.

The optional keyword parameter max_entry can be used to customize the length of the chain. Specifically, if this parameter is set to a nonnegative integer n, then the chain is constructed from the positions of the letters $$1, 2, \ldots, n$$ in the tableau.

EXAMPLES:

sage: SkewTableau([[None,1],[2],[3]]).to_chain()
[[1], [2], [2, 1], [2, 1, 1]]
sage: SkewTableau([[None,1],[1],[2]]).to_chain()
[[1], [2, 1], [2, 1, 1]]
sage: SkewTableau([[None,1],[1],[2]]).to_chain(max_entry=2)
[[1], [2, 1], [2, 1, 1]]
sage: SkewTableau([[None,1],[1],[2]]).to_chain(max_entry=3)
[[1], [2, 1], [2, 1, 1], [2, 1, 1]]
sage: SkewTableau([[None,1],[1],[2]]).to_chain(max_entry=1)
[[1], [2, 1]]
sage: SkewTableau([[None,None,2],[None,3],[None,5]]).to_chain(max_entry=6)
[[2, 1, 1], [2, 1, 1], [3, 1, 1], [3, 2, 1], [3, 2, 1], [3, 2, 2], [3, 2, 2]]
sage: SkewTableau([]).to_chain()
[[]]
sage: SkewTableau([]).to_chain(max_entry=1)
[[], []]


TESTS:

Check that to_chain() does not skip letters:

sage: t = SkewTableau([[None, 2, 3], [3]])
sage: t.to_chain()
[[1], [1], [2], [3, 1]]

sage: T = SkewTableau([[None]])
sage: T.to_chain()
[[1]]

to_expr()

The first list in a result corresponds to the inner partition of the skew shape. The second list is a list of the rows in the skew tableau read from the bottom up.

Provided for compatibility with MuPAD-Combinat. In MuPAD-Combinat, if t is a skew tableau, then to_expr gives the same result as expr(t) would give in MuPAD-Combinat.

EXAMPLES:

sage: SkewTableau([[None,1,1,3],[None,2,2],[1]]).to_expr()
[[1, 1], [[1], [2, 2], [1, 1, 3]]]
sage: SkewTableau([]).to_expr()
[[], []]

to_permutation()

Return a permutation with the entries of self obtained by reading self row by row, from the bottommost to the topmost row, with each row being read from left to right, in English convention. See to_word_by_row().

EXAMPLES:

sage: SkewTableau([[None,2],[3,4],[None],[1]]).to_permutation()
[1, 3, 4, 2]
sage: SkewTableau([[None]]).to_permutation()
[]

to_ribbon()

Return the ribbon version of self.

EXAMPLES:

sage: SkewTableau([[None,1],[2,3]]).to_ribbon()
[[None, 1], [2, 3]]

to_tableau()

Returns a tableau with the same filling. This only works if the inner shape of the skew tableau has size zero.

EXAMPLES:

sage: SkewTableau([[1,2],[3,4]]).to_tableau()
[[1, 2], [3, 4]]

to_word()

Return a word obtained from a row reading of self. Specifically, this is the word obtained by concatenating the rows from the bottommost one (in English notation) to the topmost one.

EXAMPLES:

sage: s = SkewTableau([[None,1],[2,3]])
sage: s.pp()
.  1
2  3
sage: s.to_word_by_row()
word: 231
sage: s = SkewTableau([[None, 2, 4], [None, 3], [1]])
sage: s.pp()
.  2  4
.  3
1
sage: s.to_word_by_row()
word: 1324


TESTS:

sage: SkewTableau([[None, None, None], [None]]).to_word_by_row()
word:
sage: SkewTableau([]).to_word_by_row()
word:

to_word_by_column()

Return the word obtained from a column reading of the skew tableau. Specifically, this is the word obtained by concatenating the columns from the rightmost one (in English notation) to the leftmost one.

EXAMPLES:

sage: s = SkewTableau([[None,1],[2,3]])
sage: s.pp()
.  1
2  3
sage: s.to_word_by_column()
word: 132

sage: s = SkewTableau([[None, 2, 4], [None, 3], [1]])
sage: s.pp()
.  2  4
.  3
1
sage: s.to_word_by_column()
word: 4231

to_word_by_row()

Return a word obtained from a row reading of self. Specifically, this is the word obtained by concatenating the rows from the bottommost one (in English notation) to the topmost one.

EXAMPLES:

sage: s = SkewTableau([[None,1],[2,3]])
sage: s.pp()
.  1
2  3
sage: s.to_word_by_row()
word: 231
sage: s = SkewTableau([[None, 2, 4], [None, 3], [1]])
sage: s.pp()
.  2  4
.  3
1
sage: s.to_word_by_row()
word: 1324


TESTS:

sage: SkewTableau([[None, None, None], [None]]).to_word_by_row()
word:
sage: SkewTableau([]).to_word_by_row()
word:

weight()

Return the weight (aka evaluation) of the tableau self. Trailing zeroes are omitted when returning the weight.

The weight of a skew tableau $$T$$ is the sequence $$(a_1, a_2, a_3, \ldots )$$, where $$a_k$$ is the number of entries of $$T$$ equal to $$k$$. This sequence contains only finitely many nonzero entries.

The weight of a skew tableau $$T$$ is the same as the weight of the reading word of $$T$$, for any reading order.

evaluation() is a synonym for this method.

EXAMPLES:

sage: SkewTableau([[1,2],[3,4]]).weight()
[1, 1, 1, 1]

sage: SkewTableau([[None,2],[None,4],[None,5],[None]]).weight()
[0, 1, 0, 1, 1]

sage: SkewTableau([]).weight()
[]

sage: SkewTableau([[None,None,None],[None]]).weight()
[]

sage: SkewTableau([[None,3,4],[None,6,7],[4,8],[5,13],[6],[7]]).weight()
[0, 0, 1, 2, 1, 2, 2, 1, 0, 0, 0, 0, 1]


TESTS:

We check that this agrees with going to the word:

sage: t = SkewTableau([[None,None,4,7,15],[6,2,16],[2,3,19],[4,5],[7]])
sage: def by_word(T):
....:     ed = T.to_word().evaluation_dict()
....:     m = max(ed.keys()) + 1
....:     return [ed.get(k,0) for k in range(1,m)]
sage: by_word(t) == t.weight()
True
sage: SST = SemistandardTableaux(shape=[3,1,1])
sage: all(by_word(t) == SkewTableau(t).weight() for t in SST)
True

class sage.combinat.skew_tableau.SkewTableaux(category=None)

Class of all skew tableaux.

Element

alias of SkewTableau

from_expr(expr)

Return a SkewTableau from a MuPAD-Combinat expr for a skew tableau. The first list in expr is the inner shape of the skew tableau. The second list are the entries in the rows of the skew tableau from bottom to top.

Provided primarily for compatibility with MuPAD-Combinat.

EXAMPLES:

sage: SkewTableaux().from_expr([[1,1],[[5],[3,4],[1,2]]])
[[None, 1, 2], [None, 3, 4], [5]]

from_shape_and_word(shape, word)

Return the skew tableau corresponding to the skew partition shape and the word word obtained from the row reading.

EXAMPLES:

sage: t = SkewTableau([[None, 1, 3], [None, 2], [4]])
sage: shape = t.shape()
sage: word  = t.to_word()
sage: SkewTableaux().from_shape_and_word(shape, word)
[[None, 1, 3], [None, 2], [4]]

global_options(*get_value, **set_value)

Sets the global options for elements of the tableau, skew_tableau, and tableau tuple classes. The defaults are for tableau to be displayed as a list, latexed as a Young diagram using the English convention.

OPTIONS:

• ascii_art – (default: repr) Controls the ascii art output for tableaux
• compact – minimal length ascii art
• repr – display using the diagram string representation
• table – display as a table
• convention – (default: English) Sets the convention used for displaying tableaux and partitions
• English – use the English convention
• French – use the French convention
• display – (default: list) Controls the way in which tableaux are printed
• array – alias for diagram
• compact – minimal length string representation
• diagram – display as Young diagram (similar to pp()
• ferrers_diagram – alias for diagram
• list – print tableaux as lists
• young_diagram – alias for diagram
• latex – (default: diagram) Controls the way in which tableaux are latexed
• array – alias for diagram
• diagram – as a Young diagram
• ferrers_diagram – alias for diagram
• list – as a list
• young_diagram – alias for diagram
• notation – alternative name for convention

Note

Changing the convention for tableaux also changes the convention for partitions.

If no parameters are set, then the function returns a copy of the options dictionary.

EXAMPLES:

sage: T = Tableau([[1,2,3],[4,5]])
sage: T
[[1, 2, 3], [4, 5]]
sage: Tableaux.global_options(display="array")
sage: T
1  2  3
4  5
sage: Tableaux.global_options(convention="french")
sage: T
4  5
1  2  3


Changing the convention for tableaux also changes the convention for partitions and vice versa:

sage: P = Partition([3,3,1])
sage: print P.ferrers_diagram()
*
***
***
sage: Partitions.global_options(convention="english")
sage: print P.ferrers_diagram()
***
***
*
sage: T
1  2  3
4  5


The ASCII art can also be changed:

sage: t = Tableau([[1,2,3],[4,5]])
sage: ascii_art(t)
1  2  3
4  5
sage: Tableaux.global_options(ascii_art="normal")
sage: ascii_art(t)
+---+---+
| 4 | 5 |
+---+---+---+
| 1 | 2 | 3 |
+---+---+---+
sage: Tableaux.global_options(ascii_art="compact")
sage: ascii_art(t)
|4|5|
|1|2|3|
sage: Tableaux.global_options.reset()


See GlobalOptions for more features of these options.

class sage.combinat.skew_tableau.StandardSkewTableaux(category=None)

Standard skew tableaux.

EXAMPLES:

sage: S = StandardSkewTableaux(); S
Standard skew tableaux
sage: S.cardinality()
+Infinity

sage: S = StandardSkewTableaux(2); S
Standard skew tableaux of size 2
sage: S.cardinality()
4

sage: StandardSkewTableaux([[3, 2, 1], [1, 1]]).list()
[[[None, 1, 2], [None, 3], [4]],
[[None, 1, 2], [None, 4], [3]],
[[None, 1, 3], [None, 2], [4]],
[[None, 1, 4], [None, 2], [3]],
[[None, 1, 3], [None, 4], [2]],
[[None, 1, 4], [None, 3], [2]],
[[None, 2, 3], [None, 4], [1]],
[[None, 2, 4], [None, 3], [1]]]

class sage.combinat.skew_tableau.StandardSkewTableaux_all

Class of all standard skew tableaux.

class sage.combinat.skew_tableau.StandardSkewTableaux_shape(skp)

Standard skew tableaux of a fixed skew shape $$\lambda / \mu$$.

cardinality()

Return the number of standard skew tableaux with shape of the skew partition skp. This uses a formula due to Aitken (see Cor. 7.16.3 of [Sta-EC2]).

EXAMPLES:

sage: StandardSkewTableaux([[3, 2, 1], [1, 1]]).cardinality()
8

class sage.combinat.skew_tableau.StandardSkewTableaux_size(n)

Standard skew tableaux of a fixed size $$n$$.

cardinality()

EXAMPLES:

sage: StandardSkewTableaux(1).cardinality()
1
sage: StandardSkewTableaux(2).cardinality()
4
sage: StandardSkewTableaux(3).cardinality()
24
sage: StandardSkewTableaux(4).cardinality()
194


Skew Partitions

#### Next topic

Functions that compute some of the sequences in Sloane’s tables