AUTHORS:
Bases: sage.combinat.skew_tableau.SkewTableaux
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 :
sage: SemistandardSkewTableaux(max_entry=2)
Semistandard skew tableaux with maximum entry 2
The class of all semistandard skew tableaux of given size
and maximum entry
:
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
Bases: sage.combinat.skew_tableau.SemistandardSkewTableaux
Class of all semistandard skew tableaux, possibly with a given maximum entry.
Bases: sage.combinat.skew_tableau.SemistandardSkewTableaux
Class of semistandard skew tableaux of a fixed skew shape
with a given max entry.
A semistandard skew tableau with max entry is required to have all
its entries less or equal to
. It is not required to actually
contain an entry
.
INPUT:
Warning
Input is not checked; please use SemistandardSkewTableaux to ensure the options are properly parsed.
EXAMPLES:
sage: SemistandardSkewTableaux([[2,1],[]]).cardinality()
8
sage: SemistandardSkewTableaux([[2,1],[]], max_entry=2).cardinality()
2
Bases: sage.combinat.skew_tableau.SemistandardSkewTableaux
Class of semistandard skew tableaux of a fixed skew shape
and weight
.
Bases: sage.combinat.skew_tableau.SemistandardSkewTableaux
Class of all semistandard skew tableaux of a fixed size ,
possibly with a given maximum entry.
EXAMPLES:
sage: SemistandardSkewTableaux(2).cardinality()
8
Bases: sage.combinat.skew_tableau.SemistandardSkewTableaux
Class of semistandard tableaux of a fixed size and weight
.
EXAMPLES:
sage: SemistandardSkewTableaux(2,[1,1]).cardinality()
4
Bases: sage.combinat.combinat.CombinatorialObject, sage.structure.element.Element
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]]
Return the image of self under the -th Bender–Knuth
involution, assuming self is a skew semistandard tableau.
Let be a tableau, then a lower free `k` in `T` means a cell of
which is filled with the integer
and whose direct lower
neighbor is not filled with the integer
(in particular,
this lower neighbor might not exist at all). Let an upper free `k + 1`
in `T` mean a cell of
which is filled with the integer
and whose direct upper neighbor is not filled with the integer
(in particular, this neighbor might not exist at all). It is clear
that for any row
of
, the lower free
‘s and the upper
free
‘s in
together form a contiguous interval or
.
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
entries of
and
entries of
, it will now
have
entries of
and
entries of
. For fixed
, the
-th Bender–Knuth switches for different
commute. The
composition of the
-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:
OUTPUT:
The image of self under either the -th Bender–Knuth
involution, the
-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
):
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:
Returns the cells in self.
EXAMPLES:
sage: s = SkewTableau([[None,1,2],[3],[6]])
sage: s.cells()
[(0, 1), (0, 2), (1, 0), (2, 0)]
Return the coordinates of the cells in self with content c.
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)]
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 , where both
rows and columns are counted from
(so
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)
[]
Return the conjugate of self.
EXAMPLES:
sage: SkewTableau([[None,1],[2,3]]).conjugate()
[[None, 2], [1, 3]]
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]
Return the weight (aka evaluation) of the tableau self. Trailing zeroes are omitted when returning the weight.
The weight of a skew tableau is the sequence
, where
is the number of
entries of
equal to
. This sequence contains only
finitely many nonzero entries.
The weight of a skew tableau is the same as the weight
of the reading word of
, 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
Return a list of the non-empty entries in self.
EXAMPLES:
sage: t = SkewTableau([[None,1],[2,3]])
sage: t.filling()
[[1], [2, 3]]
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]
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
Checks whether self is a valid skew weak -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
Return True if and only if the shape of self is a ribbon,
that is if it has no boxes.
EXAMPLES:
sage: SkewTableau([[None,1],[2,3]]).is_ribbon()
True
sage: SkewTableau([[None,1,2],[3,4,5]]).is_ribbon()
False
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
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
Return the outer shape of self.
EXAMPLES:
sage: SkewTableau([[None,1,2],[None,3],[4]]).outer_shape()
[3, 2, 1]
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
Return a pretty print string of the tableau.
EXAMPLES:
sage: SkewTableau([[None,2,3],[None,4],[5]]).pp()
. 2 3
. 4
5
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]]
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]]
Return the outer shape of the restriction of the semistandard skew
tableau self to .
If is a semistandard skew tableau and
is a nonnegative
integer, then the restriction of
to
is defined as the
(semistandard) skew tableau obtained by removing all cells filled
with entries greater than
from
.
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]
Return the skew shape of the restriction of the semistandard skew tableau self to n.
If is a semistandard skew tableau and
is a nonnegative
integer, then the restriction of
to
is defined as the
(semistandard) skew tableau obtained by removing all cells filled
with entries greater than
from
.
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]
Return the shape of self.
EXAMPLES:
sage: SkewTableau([[None,1,2],[None,3],[4]]).shape()
[3, 2, 1] / [1, 1]
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
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]]
Return the standardization of self, assuming self is a semistandard skew tableau.
The standardization of a semistandard skew tableau is the standard
skew tableau
of the same shape as
whose
reversed reading word is the standardization of the reversed reading
word of
.
The standardization of a word can be formed by replacing all
‘s
in
by
from left to right, all
‘s in
by
, and repeating for all letters that
appear in
.
See also Word.standard_permutation().
INPUT:
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()
[]
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
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]]
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()
[[], []]
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()
[]
Return the ribbon version of self.
EXAMPLES:
sage: SkewTableau([[None,1],[2,3]]).to_ribbon()
[[None, 1], [2, 3]]
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]]
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:
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
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:
Return the weight (aka evaluation) of the tableau self. Trailing zeroes are omitted when returning the weight.
The weight of a skew tableau is the sequence
, where
is the number of
entries of
equal to
. This sequence contains only
finitely many nonzero entries.
The weight of a skew tableau is the same as the weight
of the reading word of
, 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
Bases: sage.structure.parent.Parent, sage.structure.unique_representation.UniqueRepresentation
Class of all skew tableaux.
alias of SkewTableau
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]]
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]]
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:
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.
Bases: sage.combinat.skew_tableau.SkewTableaux
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]]]
Bases: sage.combinat.skew_tableau.StandardSkewTableaux
Class of all standard skew tableaux.
Bases: sage.combinat.skew_tableau.StandardSkewTableaux
Standard skew tableaux of a fixed skew shape .
Bases: sage.combinat.skew_tableau.StandardSkewTableaux
Standard skew tableaux of a fixed size .
EXAMPLES:
sage: StandardSkewTableaux(1).cardinality()
1
sage: StandardSkewTableaux(2).cardinality()
4
sage: StandardSkewTableaux(3).cardinality()
24
sage: StandardSkewTableaux(4).cardinality()
194
EXAMPLES:
sage: sage.combinat.skew_tableau.StandardSkewTableaux_skewpartition([[1],[]])
doctest:...: DeprecationWarning: this class is deprecated. Use StandardSkewTableaux_shape instead
See http://trac.sagemath.org/14101 for details.
Standard skew tableaux of shape [1] / []
Deprecated in trac ticket #14101. Use instead SkewTableaux.from_expr().
EXAMPLES:
sage: sage.combinat.skew_tableau.from_expr([[1,1],[[5],[3,4],[1,2]]])
doctest:...: DeprecationWarning: from_expr is deprecated. Use SkewTableaux().from_expr instead
See http://trac.sagemath.org/14101 for details.
[[None, 1, 2], [None, 3, 4], [5]]
Deprecated in trac ticket #14101. Use instead SkewTableaux.from_shape_and_word().
EXAMPLES:
sage: t = SkewTableau([[None, 1, 3], [None, 2], [4]])
sage: shape = t.shape()
sage: word = t.to_word()
sage: sage.combinat.skew_tableau.from_shape_and_word(shape, word)
doctest:...: DeprecationWarning: from_shape_and_word is deprecated. Use SkewTableaux().from_shape_and_word instead
See http://trac.sagemath.org/14101 for details.
[[None, 1, 3], [None, 2], [4]]