Returns the combinatorial class of semistandard tableaux.
If p is specified and is a partition, then it returns the class of semistandard tableaux of shape p (and max entry sum(p))
If p is specified and is an integer, it returns the class of semistandard tableaux of size p.
If mu is also specified, then it returns the class of semistandard tableaux with evaluation/content mu.
EXAMPLES:
sage: SST = SemistandardTableaux([2,1]); SST
Semistandard tableaux of shape [2, 1]
sage: SST.list()
[[[1, 1], [2]],
[[1, 1], [3]],
[[1, 2], [2]],
[[1, 2], [3]],
[[1, 3], [2]],
[[1, 3], [3]],
[[2, 2], [3]],
[[2, 3], [3]]]
sage: SST = SemistandardTableaux(3); SST
Semistandard tableaux of size 3
sage: SST.list()
[[[1, 1, 1]],
[[1, 1, 2]],
[[1, 1, 3]],
[[1, 2, 2]],
[[1, 2, 3]],
[[1, 3, 3]],
[[2, 2, 2]],
[[2, 2, 3]],
[[2, 3, 3]],
[[3, 3, 3]],
[[1, 1], [2]],
[[1, 1], [3]],
[[1, 2], [2]],
[[1, 2], [3]],
[[1, 3], [2]],
[[1, 3], [3]],
[[2, 2], [3]],
[[2, 3], [3]],
[[1], [2], [3]]]
Bases: sage.combinat.combinat.CombinatorialClass
TESTS:
sage: SemistandardTableaux().list()
...
NotImplementedError
Bases: sage.combinat.combinat.CombinatorialClass
EXAMPLES:
sage: SemistandardTableaux(3).cardinality()
19
sage: SemistandardTableaux(4).cardinality()
116
sage: ns = range(1, 6)
sage: ssts = [ SemistandardTableaux(n) for n in ns ]
sage: all([sst.cardinality() == len(sst.list()) for sst in ssts])
True
Bases: sage.combinat.combinat.CombinatorialClass
EXAMPLES:
sage: SemistandardTableaux(3, [2,1]).cardinality()
2
sage: SemistandardTableaux(4, [2,2]).cardinality()
3
Bases: sage.combinat.combinat.CombinatorialClass
EXAMPLES:
sage: SemistandardTableaux([2,1]).cardinality()
8
sage: SemistandardTableaux([2,2,1]).cardinality()
75
sage: s = SFASchur(QQ)
sage: s([2,2,1]).expand(5)(1,1,1,1,1)
75
sage: SemistandardTableaux([5]).cardinality()
126
sage: SemistandardTableaux([3,2,1]).cardinality()
896
Bases: sage.combinat.combinat.CombinatorialClass
EXAMPLES:
sage: SemistandardTableaux([2,2], [2, 1, 1]).cardinality()
1
sage: SemistandardTableaux([2,2,2], [2, 2, 1,1]).cardinality()
1
sage: SemistandardTableaux([2,2,2], [2, 2, 2]).cardinality()
1
sage: SemistandardTableaux([3,2,1], [2, 2, 2]).cardinality()
2
EXAMPLES:
sage: SemistandardTableaux([2,2], [2, 1, 1]).list()
[[[1, 1], [2, 3]]]
sage: SemistandardTableaux([2,2,2], [2, 2, 1,1]).list()
[[[1, 1], [2, 2], [3, 4]]]
sage: SemistandardTableaux([2,2,2], [2, 2, 2]).list()
[[[1, 1], [2, 2], [3, 3]]]
sage: SemistandardTableaux([3,2,1], [2, 2, 2]).list()
[[[1, 1, 2], [2, 3], [3]], [[1, 1, 3], [2, 2], [3]]]
Returns the standard tableau object corresponding to t.
Note that Sage uses the English convention for partitions and tableaux.
EXAMPLES:
sage: t = StandardTableau([[1,2,3],[4,5]]); t
[[1, 2, 3], [4, 5]]
sage: t.shape()
[3, 2]
sage: t.is_standard()
True
sage: t = StandardTableau([[1,2,3],[4,4]])
...
ValueError: not a standard tableau
Bases: sage.combinat.tableau.Tableau_class
Returns the content of k in a standard tableau. That is, if k appears in row and column of the tableau then we return .
EXAMPLES:
sage: StandardTableau([[1,2],[3,4]]).content(3)
-1
sage: StandardTableau([[1,2],[3,4]]).content(6)
...
ValueError: 6 does not appear in tableau
Returns the combinatorial class of standard tableaux. If n is specified and is an integer, then it returns the combinatorial class of all standard tableaux of size n. If n is a partition, then it returns the class of all standard tableaux of shape n.
EXAMPLES:
sage: ST = StandardTableaux(3); ST
Standard tableaux of size 3
sage: ST.first()
[[1, 2, 3]]
sage: ST.last()
[[1], [2], [3]]
sage: ST.cardinality()
4
sage: ST.list()
[[[1, 2, 3]], [[1, 3], [2]], [[1, 2], [3]], [[1], [2], [3]]]
sage: ST = StandardTableaux([2,2]); ST
Standard tableaux of shape [2, 2]
sage: ST.first()
[[1, 3], [2, 4]]
sage: ST.last()
[[1, 2], [3, 4]]
sage: ST.cardinality()
2
sage: ST.list()
[[[1, 3], [2, 4]], [[1, 2], [3, 4]]]
Bases: sage.combinat.combinat.CombinatorialClass
EXAMPLES:
sage: StandardTableaux(3).cardinality()
4
sage: ns = [1,2,3,4,5,6]
sage: sts = [StandardTableaux(n) for n in ns]
sage: all([st.cardinality() == len(st.list()) for st in sts])
True
Bases: sage.combinat.combinat.CombinatorialClass
Returns the number of standard Young tableaux associated with a partition pi
A formula for the number of Young tableaux associated with a given partition. In each cell, write the sum of one plus the number of cells horizontally to the right and vertically below the cell (the hook length). The number of tableaux is then n! divided by the product of all hook lengths.
For example, consider the partition [3,2,1] of 6 with Ferrers Diagram:
# # #
# #
#
When we fill in the cells with the hook lengths, we obtain:
5 3 1
3 1
1
The hook length formula returns 6!/(5*3*1*3*1*1) = 16.
EXAMPLES:
sage: StandardTableaux([3,2,1]).cardinality()
16
sage: StandardTableaux([2,2]).cardinality()
2
sage: StandardTableaux([5]).cardinality()
1
sage: StandardTableaux([6,5,5,3]).cardinality()
6651216
REFERENCES:
Returns a list of the standard Young tableau associated with a partition p.
EXAMPLES:
sage: StandardTableaux([2,2]).list()
[[[1, 3], [2, 4]], [[1, 2], [3, 4]]]
sage: StandardTableaux([5]).list()
[[[1, 2, 3, 4, 5]]]
sage: StandardTableaux([3,2,1]).list()
[[[1, 4, 6], [2, 5], [3]],
[[1, 3, 6], [2, 5], [4]],
[[1, 2, 6], [3, 5], [4]],
[[1, 3, 6], [2, 4], [5]],
[[1, 2, 6], [3, 4], [5]],
[[1, 4, 5], [2, 6], [3]],
[[1, 3, 5], [2, 6], [4]],
[[1, 2, 5], [3, 6], [4]],
[[1, 3, 4], [2, 6], [5]],
[[1, 2, 4], [3, 6], [5]],
[[1, 2, 3], [4, 6], [5]],
[[1, 3, 5], [2, 4], [6]],
[[1, 2, 5], [3, 4], [6]],
[[1, 3, 4], [2, 5], [6]],
[[1, 2, 4], [3, 5], [6]],
[[1, 2, 3], [4, 5], [6]]]
Returns a random standard tableau of shape p using the Green-Nijenhuis-Wilf Algorithm.
EXAMPLES:
sage: StandardTableaux([2,2]).random_element()
[[1, 2], [3, 4]]
Returns the tableau object corresponding to t.
Note that Sage uses the English convention for partitions and tableaux.
EXAMPLES:
sage: t = Tableau([[1,2,3],[4,5]]); t
[[1, 2, 3], [4, 5]]
sage: t.shape()
[3, 2]
sage: t.is_standard()
True
Bases: sage.combinat.combinat.CombinatorialObject
Returns the skew tableau formed by removing all of the cells from self that are filled with a number less than
EXAMPLES:
sage: t = Tableau([[1,2,3],[4,5]]); t
[[1, 2, 3], [4, 5]]
sage: t.anti_restrict(1)
[[None, 2, 3], [4, 5]]
sage: t.anti_restrict(2)
[[None, None, 3], [4, 5]]
sage: t.anti_restrict(3)
[[None, None, None], [4, 5]]
sage: t.anti_restrict(4)
[[None, None, None], [None, 5]]
EXAMPLES:
sage: Tableau([[1,2],[3,4]]).atom()
[2, 2]
sage: Tableau([[1,2,3],[4,5],[6]]).atom()
[3, 2, 1]
Returns a list of the attacking pairs of self. An pair of cells (c, d) is said to be attacking if one of the following conditions hold:
EXAMPLES:
sage: t = Tableau([[1,2,3],[2,5]])
sage: t.attacking_pairs()
[((0, 0), (0, 1)),
((0, 0), (0, 2)),
((0, 1), (0, 2)),
((1, 0), (1, 1)),
((1, 1), (0, 0))]
Schensted’s row-bumping (or row-insertion) algorithm.
EXAMPLES:
sage: t = Tableau([[1,2],[3]])
sage: t.bump(1)
[[1, 1], [2], [3]]
sage: t
[[1, 2], [3]]
sage: t.bump(2)
[[1, 2, 2], [3]]
sage: t.bump(3)
[[1, 2, 3], [3]]
sage: t
[[1, 2], [3]]
sage: t = Tableau([[1,2,2,3],[2,3,5,5],[4,4,6],[5,6]])
sage: t.bump(2)
[[1, 2, 2, 2], [2, 3, 3, 5], [4, 4, 5], [5, 6, 6]]
Multiply two tableaux using Schensted’s bump.
This product makes the set of tableaux into an associative monoid. The empty tableaux is the unit in this monoid.
Fulton, William. ‘Young Tableaux’ p11-12
EXAMPLES:
sage: t = Tableau([[1,2,2,3],[2,3,5,5],[4,4,6],[5,6]])
sage: t2 = Tableau([[1,2],[3]])
sage: t.bump_multiply(t2)
[[1, 1, 2, 2, 3], [2, 2, 3, 5], [3, 4, 5], [4, 6, 6], [5]]
Returns a list of the coordinates of the cells of self.
EXAMPLES:
sage: Tableau([[1,2],[3,4]]).cells()
[(0, 0), (0, 1), (1, 0), (1, 1)]
EXAPMLES:
sage: Tableau([[1,1],[2,2],[3]]).charge()
0
sage: Tableau([[1,1,3],[2,2]]).charge()
1
sage: Tableau([[1,1,2],[2],[3]]).charge()
1
sage: Tableau([[1,1,2],[2,3]]).charge()
2
sage: Tableau([[1,1,2,3],[2]]).charge()
2
sage: Tableau([[1,1,2,2],[3]]).charge()
3
sage: Tableau([[1,1,2,2,3]]).charge()
4
EXAPMLES:
sage: Tableau([[1,1],[2,2],[3]]).cocharge()
4
sage: Tableau([[1,1,3],[2,2]]).cocharge()
3
sage: Tableau([[1,1,2],[2],[3]]).cocharge()
2
sage: Tableau([[1,1,2],[2,3]]).cocharge()
2
sage: Tableau([[1,1,2,3],[2]]).cocharge()
1
sage: Tableau([[1,1,2,2],[3]]).cocharge()
1
sage: Tableau([[1,1,2,2,3]]).cocharge()
0
Return the PermutationGroup corresponding to the column stabilizer of self.
EXAMPLES:
sage: cs = Tableau([[1,2,3],[4,5]]).column_stabilizer()
sage: cs.order() == factorial(2)*factorial(2)
True
sage: PermutationGroupElement([(1,3,2),(4,5)]) in cs
False
sage: PermutationGroupElement([(1,4)]) in cs
True
Returns the conjugate of the tableau t.
EXAMPLES:
sage: Tableau([[1,2],[3,4]]).conjugate()
[[1, 3], [2, 4]]
Returns the corners of the tableau t.
EXAMPLES:
sage: Tableau([[1, 4, 6], [2, 5], [3]]).corners()
[(0, 2), (1, 1), (2, 0)]
sage: Tableau([[1, 3], [2, 4]]).corners()
[(1, 1)]
Returns a list of the cells (i,j) such that self[i][j] > self[i-1][j].
EXAMPLES:
sage: Tableau( [[1,4],[2,3]] ).descents()
[(1, 0)]
sage: Tableau( [[1,2],[3,4]] ).descents()
[(1, 0), (1, 1)]
An iterator for all the tableaux that can be obtained from self by removing a cell. Note that this iterates just over a single tableaux. EXAMPLES:
sage: t = Tableau([[1,2],[3]])
sage: [x for x in t.down()]
[[[1, 2]]]
Returns a list of all the tableaux that can be obtained from self by removing a cell. Note that this is just a single tableaux.
EXAMPLES:
sage: t = Tableau([[1,2],[3]])
sage: t.down_list()
[[[1, 2]]]
Returns the entry of cell in self. Cell is a tuple (i,j) of coordinates.
EXAMPLES:
sage: t = Tableau([[1,2],[3,4]])
sage: t.entry( (0,0) )
1
sage: t.entry( (1,1) )
4
Returns the evaluation of the word from tableau t.
EXAMPLES:
sage: Tableau([[1,2],[3,4]]).evaluation()
[1, 1, 1, 1]
Returns the height of the tableau.
EXAMPLES:
sage: Tableau([[1,2,3],[4,5]]).height()
2
sage: Tableau([[1,2,3]]).height()
1
sage: Tableau([]).height()
0
EXAMPLES:
sage: t0 = Tableau([])
sage: w = [1,1,2,3,3,3,3]
sage: t0.insert_word(w)
[[1, 1, 2, 3, 3, 3, 3]]
sage: t0.insert_word(w,left=True)
[[1, 1, 2, 3, 3, 3, 3]]
sage: w.reverse()
sage: t0.insert_word(w)
[[1, 1, 3, 3], [2, 3], [3]]
sage: t0.insert_word(w,left=True)
[[1, 1, 3, 3], [2, 3], [3]]
Returns the inversion number of self.
The inversion number is defined to be the number of inversion of self minus the sum of the arm lengths of the descents of self.
EXAMPLES:
sage: t = Tableau([[1,2,3],[2,5]])
sage: t.inversion_number()
0
Returns a list of the inversions of self. An inversion is an attacking pair (c,d) such that the entry of c in self is greater than the entry of d.
EXAMPLES:
sage: t = Tableau([[1,2,3],[2,5]])
sage: t.inversions()
[((1, 1), (0, 0))]
Returns True if the tableau t is rectangular and False otherwise.
EXAMPLES:
sage: Tableau([[1,2],[3,4]]).is_rectangular()
True
sage: Tableau([[1,2,3],[4,5],[6]]).is_rectangular()
False
Returns True if t is a standard tableau and False otherwise.
EXAMPLES:
sage: Tableau([[1, 3], [2, 4]]).is_standard()
True
sage: Tableau([[1, 2], [2, 4]]).is_standard()
False
sage: Tableau([[2, 3], [2, 4]]).is_standard()
False
sage: Tableau([[5, 3], [2, 4]]).is_standard()
False
Returns the k-weight of self.
EXAMPLES:
sage: Tableau([[1,2],[2,3]]).k_weight(1)
[1, 1, 1]
sage: Tableau([[1,2],[2,3]]).k_weight(2)
[1, 2, 1]
sage: t = Tableau([[1,1,1,2,5],[2,3,6],[3],[4]])
sage: t.k_weight(1)
[2, 1, 1, 1, 1, 1]
sage: t.k_weight(2)
[3, 2, 2, 1, 1, 1]
sage: t.k_weight(3)
[3, 1, 2, 1, 1, 1]
sage: t.k_weight(4)
[3, 2, 2, 1, 1, 1]
sage: t.k_weight(5)
[3, 2, 2, 1, 1, 1]
EXAMPLES:
sage: Tableau([]).katabolism()
[]
sage: Tableau([[1,2,3,4,5]]).katabolism()
[[1, 2, 3, 4, 5]]
sage: Tableau([[1,1,3,3],[2,3],[3]]).katabolism()
[[1, 1, 2, 3, 3, 3], [3]]
sage: Tableau([[1, 1, 2, 3, 3, 3], [3]]).katabolism()
[[1, 1, 2, 3, 3, 3, 3]]
EXAMPLES:
sage: t = Tableau([[1,1,3,3],[2,3],[3]])
sage: t.katabolism_projector([[4,2,1]])
[[1, 1, 3, 3], [2, 3], [3]]
sage: t.katabolism_projector([[1]])
[]
sage: t.katabolism_projector([[2,1],[1]])
[]
sage: t.katabolism_projector([[1,1],[4,1]])
[[1, 1, 3, 3], [2, 3], [3]]
EXAMPLES:
sage: t = Tableau([[1,2,3,4,5,6,8],[7,9]])
sage: t.katabolism_sequence()
[[[1, 2, 3, 4, 5, 6, 8], [7, 9]],
[[1, 2, 3, 4, 5, 6, 7, 9], [8]],
[[1, 2, 3, 4, 5, 6, 7, 8], [9]],
[[1, 2, 3, 4, 5, 6, 7, 8, 9]]]
EXAMPLES:
sage: t = Tableau([[1,1,3,3],[2,3],[3]])
sage: t.lambda_katabolism([])
[[1, 1, 3, 3], [2, 3], [3]]
sage: t.lambda_katabolism([1])
[[1, 2, 3, 3, 3], [3]]
sage: t.lambda_katabolism([1,1])
[[1, 3, 3, 3], [3]]
sage: t.lambda_katabolism([2,1])
[[3, 3, 3, 3]]
sage: t.lambda_katabolism([4,2,1])
[]
sage: t.lambda_katabolism([5,1])
[[3, 3]]
sage: t.lambda_katabolism([4,1])
[[3, 3]]
Returns True if self is less than or equal to tab2 in the last letter ordering.
EXAMPLES:
sage: st = StandardTableaux([3,2])
sage: f = lambda b: 1 if b else 0
sage: matrix( [ [ f(t1.last_letter_lequal(t2)) for t2 in st] for t1 in st] )
[1 1 1 1 1]
[0 1 1 1 1]
[0 0 1 1 1]
[0 0 0 1 1]
[0 0 0 0 1]
Returns the major index of self. The major index is defined to be the sum of the number of descents of self and the sum of their legs length.
EXAMPLES
sage: Tableau( [[1,4],[2,3]] ).major_index()
1
sage: Tableau( [[1,2],[3,4]] ).major_index()
2
Returns a pretty print string of the tableau.
EXAMPLES:
sage: Tableau([[1,2,3],[3,4],[5]]).pp()
1 2 3
3 4
5
Promotion operator defined on rectangular tableaux using jeu de taquin
EXAMPLES:
sage: t = Tableau([[1,2],[3,3]])
sage: t.promotion(2)
[[1, 1], [2, 3]]
sage: t = Tableau([[1,1,1],[2,2,3],[3,4,4]])
sage: t.promotion(3)
[[1, 1, 2], [2, 2, 3], [3, 4, 4]]
sage: t = Tableau([[1,2],[2]])
sage: t.promotion(3)
...
ValueError: Tableau is not rectangular
Inverse promotion operator defined on rectangular tableaux using jeu de taquin
EXAMPLES:
sage: t = Tableau([[1,2],[3,3]])
sage: t.promotion_inverse(2)
[[1, 2], [2, 3]]
sage: t = Tableau([[1,2],[2,3]])
sage: t.promotion_inverse(2)
[[1, 1], [2, 3]]
EXAMPLES:
sage: t = Tableau([[1,2],[3]])
sage: t.promotion_operator(1)
[[[1, 2], [3], [4]], [[1, 2], [3, 4]], [[1, 2, 4], [3]]]
sage: t.promotion_operator(2)
[[[1, 1], [2, 3], [4]],
[[1, 1, 2], [3], [4]],
[[1, 1, 4], [2, 3]],
[[1, 1, 2, 4], [3]]]
sage: Tableau([[1]]).promotion_operator(2)
[[[1, 1], [2]], [[1, 1, 2]]]
sage: Tableau([[1,1],[2]]).promotion_operator(3)
[[[1, 1, 1], [2, 2], [3]],
[[1, 1, 1, 2], [2], [3]],
[[1, 1, 1, 3], [2, 2]],
[[1, 1, 1, 2, 3], [2]]]
TESTS:
sage: Tableau([]).promotion_operator(2)
[[[1, 1]]]
sage: Tableau([]).promotion_operator(1)
[[[1]]]
EXAMPLES:
sage: from sage.combinat.tableau import symmetric_group_action_on_values
sage: import functools
sage: t = Tableau([[1,1,3,3],[2,3],[3]])
sage: f = functools.partial(t.raise_action_from_words, symmetric_group_action_on_values)
sage: f([1,2,3])
[[1, 1, 3, 3], [2, 3], [3]]
sage: f([3,2,1])
[[1, 1, 1, 1], [2, 3], [3]]
sage: f([1,3,2])
[[1, 1, 2, 2], [2, 2], [3]]
EXAMPLES:
sage: t = Tableau([[1,1,3,3],[2,3],[3]])
sage: t.reduced_lambda_katabolism([])
[[1, 1, 3, 3], [2, 3], [3]]
sage: t.reduced_lambda_katabolism([1])
[[1, 2, 3, 3, 3], [3]]
sage: t.reduced_lambda_katabolism([1,1])
[[1, 3, 3, 3], [3]]
sage: t.reduced_lambda_katabolism([2,1])
[[3, 3, 3, 3]]
sage: t.reduced_lambda_katabolism([4,2,1])
[]
sage: t.reduced_lambda_katabolism([5,1])
0
sage: t.reduced_lambda_katabolism([4,1])
0
Returns the restriction of the standard tableau to n.
EXAMPLES:
sage: Tableau([[1,2],[3],[4]]).restrict(3)
[[1, 2], [3]]
sage: Tableau([[1,2],[3],[4]]).restrict(2)
[[1, 2]]
sage: Tableau([[1,1],[2]]).restrict(1)
[[1, 1]]
Returns the tableau obtained by rotating t by 180 degrees.
EXAMPLES:
sage: Tableau([[1,2],[3,4]]).rotate_180()
[[4, 3], [2, 1]]
Return the PermutationGroup corresponding to the row stabilizer of self.
EXAMPLES:
sage: rs = Tableau([[1,2,3],[4,5]]).row_stabilizer()
sage: rs.order() == factorial(3)*factorial(2)
True
sage: PermutationGroupElement([(1,3,2),(4,5)]) in rs
True
sage: PermutationGroupElement([(1,4)]) in rs
False
sage: rs = Tableau([[1],[2],[3]]).row_stabilizer()
sage: rs.order()
1
EXAMPLES:
sage: t = Tableau([[3,5],[7]])
sage: t.schensted_insert(8)
[[3, 5, 8], [7]]
sage: t.schensted_insert(8, left=True)
[[3, 5], [7], [8]]
Returns the shape of a tableau t.
EXAMPLES:
sage: Tableau([[1,2,3],[4,5],[6]]).shape()
[3, 2, 1]
Returns the size of the shape of the tableau t.
EXAMPLES:
sage: Tableau([[1, 4, 6], [2, 5], [3]]).size()
6
sage: Tableau([[1, 3], [2, 4]]).size()
4
Multiply two tableaux using jeu de taquin.
This product makes the set of tableaux into an associative monoid. The empty tableaux is the unit in this monoid.
Fulton, William. ‘Young Tableaux’ p15
EXAMPLES:
sage: t = Tableau([[1,2,2,3],[2,3,5,5],[4,4,6],[5,6]])
sage: t2 = Tableau([[1,2],[3]])
sage: t.slide_multiply(t2)
[[1, 1, 2, 2, 3], [2, 2, 3, 5], [3, 4, 5], [4, 6, 6], [5]]
EXAMPLES:
sage: Tableau([[1,2],[3,4]]).socle()
2
sage: Tableau([[1,2,3,4]]).socle()
4
EXAMPLES:
sage: t = Tableau([[1,1,3,3],[2,3],[3]])
sage: t.symmetric_group_action_on_values([1,2,3])
[[1, 1, 3, 3], [2, 3], [3]]
sage: t.symmetric_group_action_on_values([3,2,1])
[[1, 1, 1, 1], [2, 3], [3]]
sage: t.symmetric_group_action_on_values([1,3,2])
[[1, 1, 2, 2], [2, 2], [3]]
Returns the chain of partitions corresponding to the (semi)standard tableau.
EXAMPLES:
sage: Tableau([[1,2],[3],[4]]).to_chain()
[[], [1], [2], [2, 1], [2, 1, 1]]
sage: Tableau([[1,1],[2]]).to_chain()
[[], [2], [2, 1]]
sage: Tableau([[1,1],[3]]).to_chain()
[[], [2], [2], [2, 1]]
sage: Tableau([]).to_chain()
[[]]
EXAMPLES:
sage: t = Tableau([[1,2],[3,4]])
sage: l = t.to_list(); l
[[1, 2], [3, 4]]
sage: l[0][0] = 2
sage: t
[[1, 2], [3, 4]]
Returns a permutation with the entries of self obtained by reading self in the reading order.
EXAMPLES:
sage: Tableau([[1,2],[3,4]]).to_permutation()
[3, 4, 1, 2]
An alias for to_word_by_row.
EXAMPLES:
sage: Tableau([[1,2],[3,4]]).to_word()
word: 3412
sage: Tableau([[1, 4, 6], [2, 5], [3]]).to_word()
word: 325146
Returns the word obtained from a column reading of the tableau t.
EXAMPLES:
sage: Tableau([[1,2],[3,4]]).to_word_by_column()
word: 3142
sage: Tableau([[1, 4, 6], [2, 5], [3]]).to_word_by_column()
word: 321546
Returns a word obtained from a row reading of the tableau t.
EXAMPLES:
sage: Tableau([[1,2],[3,4]]).to_word_by_row()
word: 3412
sage: Tableau([[1, 4, 6], [2, 5], [3]]).to_word_by_row()
word: 325146
An iterator for all the tableaux that can be obtained from self by adding a cell. EXAMPLES:
sage: t = Tableau([[1,2]])
sage: [x for x in t.up()]
[[[1, 2, 3]], [[1, 2], [3]]]
Returns a list of all the tableaux that can be obtained from self by adding a cell.
EXAMPLES:
sage: t = Tableau([[1,2]])
sage: t.up_list()
[[[1, 2, 3]], [[1, 2], [3]]]
Returns the tableau obtained by vertically flipping the tableau t. This only works for rectangular tableau.
EXAMPLES:
sage: Tableau([[1,2],[3,4]]).vertical_flip()
[[3, 4], [1, 2]]
Returns the evaluation of the word from tableau t.
EXAMPLES:
sage: Tableau([[1,2],[3,4]]).evaluation()
[1, 1, 1, 1]
Returns the combinatorial class of tableaux. If n is specified, then it returns the combinatorial class of all tableaux of size n.
EXAMPLES:
sage: T = Tableaux(); T
Tableaux
sage: [[1,2],[3,4]] in T
True
sage: [[1,2],[3]] in T
True
sage: [1,2,3] in T
False
sage: T = Tableaux(4); T
Tableaux of size 4
sage: [[1,2],[3,4]] in T
True
sage: [[1,2],[3]] in T
False
sage: [1,2,3] in T
False
Bases: sage.combinat.combinat.CombinatorialClass
TESTS:
sage: Tableaux().list()
...
NotImplementedError
Bases: sage.combinat.combinat.CombinatorialClass
TESTS:
sage: Tableaux(3).list()
...
NotImplementedError
Returns a semistandard tableau from a chain of partitions.
EXAMPLES:
sage: from sage.combinat.tableau import from_chain
sage: from_chain([[], [2], [2, 1], [3, 2, 1]])
[[1, 1, 3], [2, 3], [3]]
Returns a tableau from a shape and word.
EXAMPLES:
sage: from sage.combinat.tableau import from_shape_and_word
sage: t = Tableau([[1, 3], [2], [4]])
sage: shape = t.shape(); shape
[2, 1, 1]
sage: word = t.to_word(); word
word: 4213
sage: from_shape_and_word(shape, word)
[[1, 3], [2], [4]]
EXAMPLES:
sage: from sage.combinat.tableau import symmetric_group_action_on_values
sage: symmetric_group_action_on_values([1,1,1],[1,3,2])
[1, 1, 1]
sage: symmetric_group_action_on_values([1,1,1],[2,1,3])
[2, 2, 2]
sage: symmetric_group_action_on_values([1,2,1],[2,1,3])
[2, 2, 1]
sage: symmetric_group_action_on_values([2,2,2],[2,1,3])
[1, 1, 1]
sage: symmetric_group_action_on_values([2,1,2],[2,1,3])
[2, 1, 1]
sage: symmetric_group_action_on_values([2,2,3,1,1,2,2,3],[1,3,2])
[2, 3, 3, 1, 1, 2, 3, 3]
sage: symmetric_group_action_on_values([2,1,1],[2,1])
[2, 1, 2]
sage: symmetric_group_action_on_values([2,2,1],[2,1])
[1, 2, 1]
sage: symmetric_group_action_on_values([1,2,1],[2,1])
[2, 2, 1]
EXAMPLES:
sage: from sage.combinat.tableau import unmatched_places
sage: unmatched_places([2,2,2,1,1,1],2,1)
([], [])
sage: unmatched_places([1,1,1,2,2,2],2,1)
([0, 1, 2], [3, 4, 5])
sage: unmatched_places([], 2, 1)
([], [])
sage: unmatched_places([1,2,4,6,2,1,5,3],2,1)
([0], [1])
sage: unmatched_places([2,2,1,2,4,6,2,1,5,3], 2, 1)
([], [0, 3])
sage: unmatched_places([3,1,1,1,2,1,2], 2, 1)
([1, 2, 3], [6])