AUTHORS:
This file consists of the following major classes:
Element classes:
Factory classes:
Parent classes:
For display options, see Tableaux.global_options().
Bases: sage.combinat.tableau.Tableau
A class to model a semistandard tableau.
INPUT:
OUTPUT:
A semistandard tableau is a tableau whose entries are positive integers, which are weakly increasing in rows and strictly increasing down columns.
EXAMPLES:
sage: t = SemistandardTableau([[1,2,3],[2,3]]); t
[[1, 2, 3], [2, 3]]
sage: t.shape()
[3, 2]
sage: t.pp() # pretty print
1 2 3
2 3
sage: t = Tableau([[1,2],[2]])
sage: s = SemistandardTableau(t); s
[[1, 2], [2]]
sage: SemistandardTableau([]) # The empty tableau
[]
When using code that will generate a lot of tableaux, it is slightly more efficient to construct a SemistandardTableau from the appropriate Parent object:
sage: SST = SemistandardTableaux()
sage: SST([[1, 2, 3], [4, 5]])
[[1, 2, 3], [4, 5]]
TESTS:
sage: SemistandardTableau([[1,2,3],[1]])
Traceback (most recent call last):
...
ValueError: Columns are not strictly increasing.
sage: SemistandardTableau([[1,2,1]])
Traceback (most recent call last):
...
ValueError: Rows are not weakly increasing.
sage: SemistandardTableau([[0,1]])
Traceback (most recent call last):
...
ValueError: Entries must be non-negative integers
Bases: sage.combinat.tableau.Tableaux
A factory class for the various classes of semistandard tableaux.
INPUT:
Keyword arguments:
Positional arguments:
OUTPUT:
A semistandard tableau is a tableau whose entries are positive integers, which are weakly increasing in rows and strictly increasing down columns. Note that Sage uses the English convention for partitions and tableaux; the longer rows are displayed on top.
Classes of semistandard tableaux can be iterated over if and only if there is some restriction.
EXAMPLES:
sage: SST = SemistandardTableaux([2,1]); SST
Semistandard tableaux of shape [2, 1] and maximum entry 3
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 and maximum entry 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]]]
sage: SST = SemistandardTableaux(3, max_entry=2); SST
Semistandard tableaux of size 3 and maximum entry 2
sage: SST.list()
[[[1, 1, 1]],
[[1, 1, 2]],
[[1, 2, 2]],
[[2, 2, 2]],
[[1, 1], [2]],
[[1, 2], [2]]]
sage: SST = SemistandardTableaux(3, max_entry=oo); SST
Semistandard tableaux of size 3
sage: SST[123]
[[3, 4], [6]]
sage: SemistandardTableaux(max_entry=2)[11]
[[1, 1], [2]]
sage: SemistandardTableaux()[0]
[]
alias of SemistandardTableau
Bases: sage.sets.disjoint_union_enumerated_sets.DisjointUnionEnumeratedSets, sage.combinat.tableau.SemistandardTableaux
All semistandard tableaux.
Warning
Input is not checked; please use SemistandardTableaux to ensure the options are properly parsed.
TESTS:
sage: SemistandardTableaux().list()
Traceback (most recent call last):
...
NotImplementedError
EXAMPLES:
sage: sage.combinat.tableau.SemistandardTableaux_n(3)
doctest:1: DeprecationWarning: this class is deprecated. Use SemistandardTableaux_size instead
See http://trac.sagemath.org/9265 for details.
Semistandard tableaux of size 3 and maximum entry 3
EXAMPLES:
sage: sage.combinat.tableau.SemistandardTableaux_nmu(3,[2,1])
doctest:1: DeprecationWarning: this class is deprecated. Use SemistandardTableaux_size_weight instead
See http://trac.sagemath.org/9265 for details.
Semistandard tableaux of size 3 and weight [2, 1]
EXAMPLES:
sage: sage.combinat.tableau.SemistandardTableaux_p([2,1])
doctest:1: DeprecationWarning: this class is deprecated. Use SemistandardTableaux_shape instead
See http://trac.sagemath.org/9265 for details.
Semistandard tableaux of shape [2, 1] and maximum entry 3
EXAMPLES:
sage: sage.combinat.tableau.SemistandardTableaux_pmu([2,1],[2,1])
doctest:1: DeprecationWarning: this class is deprecated. Use SemistandardTableaux_shape_weight instead
See http://trac.sagemath.org/9265 for details.
Semistandard tableaux of shape [2, 1] and weight [2, 1]
Bases: sage.combinat.tableau.SemistandardTableaux
Semistandard tableaux of fixed shape with a given max entry.
INPUT:
Warning
Input is not checked; please use SemistandardTableaux to ensure the options are properly parsed.
Returns the cardinality of self.
EXAMPLES:
sage: SemistandardTableaux([2,1]).cardinality()
8
sage: SemistandardTableaux([2,2,1]).cardinality()
75
sage: SymmetricFunctions(QQ).schur()([2,2,1]).expand(5)(1,1,1,1,1) # cross check
75
sage: SemistandardTableaux([5]).cardinality()
126
sage: SemistandardTableaux([3,2,1]).cardinality()
896
sage: SemistandardTableaux([3,2,1], max_entry=7).cardinality()
2352
Bases: sage.combinat.tableau.SemistandardTableaux
Semistandard tableaux of fixed shape and no maximum entry.
Warning
Input is not checked; please use SemistandardTableaux to ensure the options are properly parsed.
Bases: sage.combinat.tableau.SemistandardTableaux
Semistandard tableaux of fixed shape and weight
.
Warning
Input is not checked; please use SemistandardTableaux to ensure the options are properly parsed.
Returns the number of semistandard tableaux of the given shape and weight, as computed by kostka_number function of symmetrica.
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
Return a list of semistandard tableau in self generated by semmetrica.
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]]]
Bases: sage.combinat.tableau.SemistandardTableaux
Semistandard tableaux of fixed size .
Warning
Input is not checked; please use SemistandardTableaux to ensure the options are properly parsed.
Return the cardinality of self.
EXAMPLES:
sage: SemistandardTableaux(3).cardinality()
19
sage: SemistandardTableaux(4).cardinality()
116
sage: SemistandardTableaux(4, max_entry=2).cardinality()
9
sage: SemistandardTableaux(4, max_entry=10).cardinality()
4225
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.tableau.SemistandardTableaux
Semistandard tableaux of fixed size with no maximum entry.
Warning
Input is not checked; please use SemistandardTableaux to ensure the options are properly parsed.
TESTS:
sage: SemistandardTableaux(3, max_entry=oo).list()
Traceback (most recent call last):
...
NotImplementedError
Bases: sage.combinat.tableau.SemistandardTableaux
Semistandard tableaux of fixed size and weight
.
Warning
Input is not checked; please use SemistandardTableaux to ensure the options are properly parsed.
Return the cardinality of self.
EXAMPLES:
sage: SemistandardTableaux(3, [2,1]).cardinality()
2
sage: SemistandardTableaux(4, [2,2]).cardinality()
3
Bases: sage.combinat.tableau.SemistandardTableau
A class to model a standard tableau.
INPUT:
OUTPUT:
A standard tableau is a semistandard tableau whose entries are exactly the
positive integers from 1 to , where
is the size of the tableau.
EXAMPLES:
sage: t = StandardTableau([[1,2,3],[4,5]]); t
[[1, 2, 3], [4, 5]]
sage: t.shape()
[3, 2]
sage: t.pp() # pretty print
1 2 3
4 5
sage: t.is_standard()
True
sage: StandardTableau([]) # The empty tableau
[]
When using code that will generate a lot of tableaux, it is slightly more efficient to construct a StandardTableau from the appropriate Parent object:
sage: ST = StandardTableaux()
sage: ST([[1, 2, 3], [4, 5]])
[[1, 2, 3], [4, 5]]
Returns the content of k in a standard tableau. That is, if
k appears in row and column
of the tableau then we
return
.
The multicharge is a list of length 1 which gives an offset for all of the contents. It is included mainly for compatibility with TableauTuple.
EXAMPLES:
sage: StandardTableau([[1,2],[3,4]]).content(3)
-1
sage: StandardTableau([[1,2],[3,4]]).content(6)
Traceback (most recent call last):
...
ValueError: 6 does not appear in tableau
Return True if self dominates the tableau t. That is,
if the shape of the tableau restricted to dominates the shape of
t restrcted to
, for
.
When the two tableaux have the same shape, then this ordering coincides with the Bruhat ordering for the correspomding permutations.
INPUT:
EXAMPLES:
sage: s=StandardTableau([[1,2,3],[4,5]])
sage: t=StandardTableau([[1,2],[3,5],[4]])
sage: s.dominates(t)
True
sage: t.dominates(s)
False
sage: all(StandardTableau(s).dominates(t) for t in StandardTableaux([3,2]))
True
sage: s.dominates([[1,2,3,4,5]])
False
Bases: sage.combinat.tableau.SemistandardTableaux
A factory for the various classes of standard tableaux.
INPUT:
OUTPUT:
A standard tableau is a semistandard tableaux which contains each of the entries from 1 to n exactly once.
All classes of standard tableaux are iterable.
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]]]
TESTS:
sage: StandardTableaux()([])
[]
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]]]
alias of StandardTableau
Bases: sage.sets.disjoint_union_enumerated_sets.DisjointUnionEnumeratedSets, sage.combinat.tableau.StandardTableaux
All standard tableaux.
EXAMPLES:
sage: sage.combinat.tableau.StandardTableaux_n(2)
doctest:1: DeprecationWarning: this class is deprecated. Use StandardTableaux_size instead
See http://trac.sagemath.org/9265 for details.
Standard tableaux of size 2
EXAMPLES:
sage: sage.combinat.tableau.StandardTableaux_partition([2,1])
doctest:1: DeprecationWarning: this class is deprecated. Use StandardTableaux_shape instead
See http://trac.sagemath.org/9265 for details.
Standard tableaux of shape [2, 1]
Bases: sage.combinat.tableau.StandardTableaux
Semistandard tableaux of a fixed shape .
Warning
Input is not checked; please use SemistandardTableaux to ensure the options are properly parsed.
Returns the number of standard Young tableaux of this shape.
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
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 tableaux of the specified shape.
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 the given shape using the Green-Nijenhuis-Wilf Algorithm.
EXAMPLES:
sage: StandardTableaux([2,2]).random_element()
[[1, 2], [3, 4]]
Bases: sage.combinat.tableau.StandardTableaux
Semistandard tableaux of fixed size .
Warning
Input is not checked; please use StandardTableaux to ensure the options are properly parsed.
Return the cardinality of self.
EXAMPLES:
sage: StandardTableaux(3).cardinality()
4
sage: ns = [1,2,3,4,5,6]
sage: sts = [StandardTableaux(n) for n in ns] # indirect doctest
sage: all([st.cardinality() == len(st.list()) for st in sts])
True
Bases: sage.combinat.combinat.CombinatorialObject, sage.structure.element.Element
A class to model a tableau.
INPUT:
OUTPUT:
A tableau in Sage is a finite list of lists, whose lengths are weakly decreasing, or an empty list, representing the empty tableau. The entries of a tableau can be any sage object.
Note that Sage uses the English convention for partitions and tableaux; the longer rows are displayed on top.
EXAMPLES:
sage: t = Tableau([[1,2,3],[4,5]]); t
[[1, 2, 3], [4, 5]]
sage: t.shape()
[3, 2]
sage: t.pp() # pretty print
1 2 3
4 5
sage: t.is_standard()
True
sage: Tableau([['a','c','b'],[[],(2,1)]])
[['a', 'c', 'b'], [[], (2, 1)]]
sage: Tableau([]) # The empty tableau
[]
When using code that will generate a lot of tableaux, it is slightly more efficient to construct a Tableau from the appropriate Parent object:
sage: T = Tableaux()
sage: T([[1, 2, 3], [4, 5]])
[[1, 2, 3], [4, 5]]
TESTS:
sage: Tableau([[1],[2,3]])
Traceback (most recent call last):
...
ValueError: A tableau must be a list of lists of weakly decreasing length.
sage: Tableau([1,2,3])
Traceback (most recent call last):
...
ValueError: A tableau must be a list of lists.
Set the entry in equal to
. If the cell does not exist then
extend the tableau, otherwise just replace the entry.
EXAMPLES:
sage: s=StandardTableau([[1,2,5],[3,4]]); s.pp()
1 2 5
3 4
sage: t=s.add_entry( (1,2), 6); t.pp()
1 2 5
3 4 6
sage: t.category()
Category of elements of Standard tableaux
sage: s.add_entry( (2,0), 6).pp()
1 2 5
3 4
6
sage: u=s.add_entry( (1,2), 3); u.pp()
1 2 5
3 4 3
sage: u.category()
Category of elements of Tableaux
sage: s.add_entry( (2,2),3)
Traceback (most recent call last):
...
IndexError: (2, 2) is not an addable cell of the tableau
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]]
Removes the top row of self and inserts it back in.
EXAMPLES:
sage: Tableau([]).catabolism()
[]
sage: Tableau([[1,2,3,4,5]]).catabolism()
[[1, 2, 3, 4, 5]]
sage: Tableau([[1,1,3,3],[2,3],[3]]).catabolism()
[[1, 1, 2, 3, 3, 3], [3]]
sage: Tableau([[1, 1, 2, 3, 3, 3], [3]]).catabolism()
[[1, 1, 2, 3, 3, 3, 3]]
EXAMPLES:
sage: t = Tableau([[1,1,3,3],[2,3],[3]])
sage: t.catabolism_projector([[4,2,1]])
[[1, 1, 3, 3], [2, 3], [3]]
sage: t.catabolism_projector([[1]])
[]
sage: t.catabolism_projector([[2,1],[1]])
[]
sage: t.catabolism_projector([[1,1],[4,1]])
[[1, 1, 3, 3], [2, 3], [3]]
Perform catabolism() on self until returns a tableau consisting of a single row.
EXAMPLES:
sage: t = Tableau([[1,2,3,4,5,6,8],[7,9]])
sage: t.catabolism_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]]]
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)]
Returns the list of cells in which the letter appears in the tableau
.
The list is ordered with cells appearing from left to right.
EXAMPLES:
sage: t = Tableau([[1,1,3],[2,3,5],[4,5]])
sage: t.cells_containing(5)
[(2, 1), (1, 2)]
sage: t.cells_containing(4)
[(2, 0)]
sage: t.cells_containing(6)
[]
sage: t = Tableau([[1,1,2,4],[2,4,4],[4]])
sage: t.cells_containing(4)
[(2, 0), (1, 1), (1, 2), (0, 3)]
Returns the charge of the reading word of self. See sage.combinat.words.finite_word.FiniteWord_class.charge() for more information.
EXAMPLES:
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
Returns the cocharge of the reading word of self. See sage.combinat.words.finite_word.FiniteWord_class.cocharge() for more information.
EXAMPLES:
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()
3
sage: Tableau([[1,1,2],[2,3]]).cocharge()
2
sage: Tableau([[1,1,2,3],[2]]).cocharge()
2
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
This function returns a list containing itself. It exists mainly for compatibility with TableauTuple as it allows constructions like the example below.
EXAMPLES:
sage: t = Tableau([[1,2,3],[4,5]]);
sage: for s in t.components(): print s.to_list()
[[1, 2, 3], [4, 5]]
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)]
Create an aliased version of a function or a method which raise a deprecation warning message.
If f is a function or a method, write g = deprecated_function_alias(trac_number, f) to make a deprecated aliased version of f.
INPUT:
EXAMPLES:
sage: from sage.misc.superseded import deprecated_function_alias
sage: g = deprecated_function_alias(13109, number_of_partitions)
sage: g(5)
doctest:...: DeprecationWarning: g is deprecated. Please use sage.combinat.partition.number_of_partitions instead.
See http://trac.sagemath.org/13109 for details.
7
This also works for methods:
sage: class cls(object):
... def new_meth(self): return 42
... old_meth = deprecated_function_alias(13109, new_meth)
sage: cls().old_meth()
doctest:...: DeprecationWarning: old_meth is deprecated. Please use new_meth instead.
See http://trac.sagemath.org/13109 for details.
42
Trac #11585:
sage: def a(): pass
sage: b = deprecated_function_alias(13109, a)
sage: b()
doctest:...: DeprecationWarning: b is deprecated. Please use a instead.
See http://trac.sagemath.org/13109 for details.
AUTHORS:
- Florent Hivert (2009-11-23), with the help of Mike Hansen.
- Luca De Feo (2011-07-11), printing the full module path when different from old path
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 a list of all entries of self, in the order obtained by reading across the rows.
EXAMPLES:
sage: t = Tableau([[1,3], [2]])
sage: t.entries()
[1, 3, 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 weight of the word corresponding to the tableau self.
EXAMPLES:
sage: Tableau([[1,2],[3,4]]).weight()
[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 self is a column strict tableau and False otherwise.
A tableau is column strict if the entries in each row are in increasing order.
EXAMPLES:
sage: Tableau([[1, 3], [2, 4]]).is_column_strict()
True
sage: Tableau([[1, 2], [2, 4]]).is_column_strict()
True
sage: Tableau([[2, 3], [2, 4]]).is_column_strict()
False
sage: Tableau([[5, 3], [2, 4]]).is_column_strict()
False
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 self is a row strict tableau and False otherwise.
A tableau is row strict if the entries in each row are in increasing order.
EXAMPLES:
sage: Tableau([[1, 3], [2, 4]]).is_row_strict()
True
sage: Tableau([[1, 2], [2, 4]]).is_row_strict()
True
sage: Tableau([[2, 3], [2, 4]]).is_row_strict()
True
sage: Tableau([[5, 3], [2, 4]]).is_row_strict()
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]
Deprecated: Use catabolism() instead. See trac ticket #13605 for details.
Deprecated: Use catabolism_projector() instead. See trac ticket #13605 for details.
Deprecated: Use catabolism_sequence() instead. See trac ticket #13605 for details.
For a partition and a tableau
, the
-catabolism of
is defined by performing the following
steps.
EXAMPLES:
sage: Tableau([[1,1,3],[2,4,5]]).lambda_catabolism([2,1])
[[3, 5], [4]]
sage: t = Tableau([[1,1,3,3],[2,3],[3]])
sage: t.lambda_catabolism([])
[[1, 1, 3, 3], [2, 3], [3]]
sage: t.lambda_catabolism([1])
[[1, 2, 3, 3, 3], [3]]
sage: t.lambda_catabolism([1,1])
[[1, 3, 3, 3], [3]]
sage: t.lambda_catabolism([2,1])
[[3, 3, 3, 3]]
sage: t.lambda_catabolism([4,2,1])
[]
sage: t.lambda_catabolism([5,1])
[[3, 3]]
sage: t.lambda_catabolism([4,1])
[[3, 3]]
Deprecated: Use lambda_catabolism() instead. See trac ticket #13605 for details.
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 level of self, which is always 1.
This function exists mainly for compatibility with TableauTuple.
EXAMPLE:
sage: Tableau([[1,2,3],[4,5]]).level()
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: T = Tableau([[1,2,3],[3,4],[5]])
sage: T.pp()
1 2 3
3 4
5
sage: Tableaux.global_options(convention="french")
sage: T.pp()
5
3 4
1 2 3
sage: Tableaux.global_options.reset()
Returns the promotion operator acting on by removing all letters
from tableau
(one by one from left to right), applying jeu de taquin to move
boxes into the empty box, filling 0 into the empty boxes in the first row, and
finally adding one to each letter.
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)
[[2, 3], [3]]
sage: t = Tableau([[1,1,3],[2,2]])
sage: t.promotion(2)
[[1, 2, 2], [3, 3]]
sage: t = Tableau([[1,1,3],[2,3]])
sage: t.promotion(2)
[[1, 1, 2], [2, 3]]
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]]
TESTS:
A test for trac ticket #13203:
sage: T = Tableau([[1]])
sage: type(T.promotion_inverse(2)[0][0])
<type 'sage.rings.integer.Integer'>
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]]
Returns a permutation with the entries of self obtained by reading self in the given reading order.
EXAMPLES:
sage: StandardTableau([[1,2],[3,4]]).reading_word_permutation()
[3, 4, 1, 2]
EXAMPLES:
sage: t = Tableau([[1,1,3,3],[2,3],[3]])
sage: t.reduced_lambda_catabolism([])
[[1, 1, 3, 3], [2, 3], [3]]
sage: t.reduced_lambda_catabolism([1])
[[1, 2, 3, 3, 3], [3]]
sage: t.reduced_lambda_catabolism([1,1])
[[1, 3, 3, 3], [3]]
sage: t.reduced_lambda_catabolism([2,1])
[[3, 3, 3, 3]]
sage: t.reduced_lambda_catabolism([4,2,1])
[]
sage: t.reduced_lambda_catabolism([5,1])
0
sage: t.reduced_lambda_catabolism([4,1])
0
Deprecated: Use reduced_lambda_catabolism() instead. See trac ticket #13605 for details.
Returns the restriction of the (standard) tableau to . If possible,
the restricted tableau will have the same parent as this tableau.
EXAMPLES:
sage: Tableau([[1,2],[3],[4]]).restrict(3)
[[1, 2], [3]]
sage: StandardTableau([[1,2],[3],[4]]).restrict(2)
[[1, 2]]
If possible the restricted tableau will belong to the same category as the original tableau:
sage: S=StandardTableau([[1,2,4,7],[3,5],[6]]); S.category()
Category of elements of Standard tableaux
sage: S.restrict(4).category()
Category of elements of Standard tableaux
sage: SS=StandardTableaux([4,2,1])([[1,2,4,7],[3,5],[6]]); SS.category()
Category of elements of Standard tableaux of shape [4, 2, 1]
sage: SS.restrict(4).category()
Category of elements of Standard tableaux
sage: Tableau([[1,2],[3],[4]]).restrict(3)
[[1, 2], [3]]
sage: Tableau([[1,2],[3],[4]]).restrict(2)
[[1, 2]]
sage: SemistandardTableau([[1,1],[2]]).restrict(1)
[[1, 1]]
sage: _.category()
Category of elements of Semistandard tableaux
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: PermutationGroupElement([(1,2),(3,)]) in rs
True
sage: rs.one().list()
[1, 2, 3]
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 Schuetzenberger involution of the tableau self.
This method relies on the analogous method on words, which reverts the word
and then complements all letters within the underlying ordered alphabet.
If is specified, the underlying alphabet is assumed to be
.
If no alphabet is specified,
is the maximal letter appearing in self.
INPUT:
OUTPUT:
EXAMPLES:
sage: t = Tableau([[1,1,1],[2,2]])
sage: t.schuetzenberger_involution(3)
[[2, 2, 3], [3, 3]]
sage: t = Tableau([[1,2,3],[4,5]])
sage: t.schuetzenberger_involution()
[[1, 2, 5], [3, 4]]
sage: t = Tableau([[1,3,5,7],[2,4,6],[8,9]])
sage: t.schuetzenberger_involution()
[[1, 2, 6, 8], [3, 4, 9], [5, 7]]
sage: t = Tableau([])
sage: t.schuetzenberger_involution()
[]
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
Returns the tableau obtained form this tableau by acting by the permutation w.
Let be a standard tableau of size
, then the action of
is defined by permuting the entries of
(recall they
are
). In particular, suppose the entry at cell
is
, then the entry becomes
. In general, the
resulting tableau
may not be standard.
Note
This is different than symmetric_group_action_on_values() which is defined on semistandard tableaux and is guaranteed to return a semistandard tableau.
INPUT:
EXAMPLES:
sage: StandardTableau([[1,2,4],[3,5]]).symmetric_group_action_on_entries( Permutation(((4,5))) )
[[1, 2, 5], [3, 4]]
sage: _.category()
Category of elements of Standard tableaux
sage: StandardTableau([[1,2,4],[3,5]]).symmetric_group_action_on_entries( Permutation(((1,2))) )
[[2, 1, 4], [3, 5]]
sage: _.category()
Category of elements of Tableaux
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 weight of the word corresponding to the tableau self.
EXAMPLES:
sage: Tableau([[1,2],[3,4]]).weight()
[1, 1, 1, 1]
EXAMPLES:
sage: sage.combinat.tableau.Tableau_class([[3,2]])
doctest:1: DeprecationWarning: this class is deprecated. Use Tableau_class instead
See http://trac.sagemath.org/9265 for details.
[[3, 2]]
Bases: sage.structure.unique_representation.UniqueRepresentation, sage.structure.parent.Parent
A factory class for the various classes of tableaux.
INPUT:
OUTPUT:
A tableau in Sage is a finite list of lists, whose lengths are weakly decreasing, or an empty list, representing the empty tableau. The entries of a tableau can be any sage object. Because of this, no enumeration through the set of Tableaux is possible.
EXAMPLES:
sage: T = Tableaux(); T
Tableaux
sage: T3 = Tableaux(3); T3
Tableaux of size 3
sage: [['a','b']] in T
True
sage: [['a','b']] in T3
False
sage: t = T3([[1,1,1]]); t
[[1, 1, 1]]
sage: t in T
True
sage: t.parent()
Tableaux of size 3
sage: T([]) # the empty tableau
[]
sage: T.category()
Category of sets
TESTS:
sage: t = Tableaux(3)([[1,2],[3]])
sage: t.parent()
Tableaux of size 3
sage: Tableaux(t)
Traceback (most recent call last):
...
ValueError: The argument to Tableaux() must be a non-negative integer.
sage: Tableaux(3)([[1, 1]])
Traceback (most recent call last):
...
ValueError: [[1, 1]] is not an element of Tableaux of size 3.
sage: t0 = Tableau([[1]])
sage: t1 = Tableaux()([[1]])
sage: t2 = Tableaux()(t1)
sage: t0 == t1 == t2
True
sage: t1 in Tableaux()
True
sage: t1 in Tableaux(1)
True
sage: t1 in Tableaux(2)
False
sage: [[1]] in Tableaux()
True
sage: [] in Tableaux(0)
True
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
sage: Tableaux.global_options.reset()
See GlobalOptions for more features of these options.
Bases: sage.combinat.tableau.Tableaux
Initializes the class of all tableaux
TESTS:
sage: T = sage.combinat.tableau.Tableaux_all()
sage: TestSuite(T).run()
Returns a particular element of the class.
TESTS:
sage: T = Tableaux()
sage: T.an_element()
[[1, 1], [1]]
EXAMPLES:
sage: sage.combinat.tableau.Tableaux_n(3)
doctest:1: DeprecationWarning: this class is deprecated. Use Tableaux_size instead
See http://trac.sagemath.org/9265 for details.
Tableaux of size 3
Bases: sage.combinat.tableau.Tableaux
Tableaux of a fixed size .
Returns a particular element of the class.
TESTS:
sage: T = sage.combinat.tableau.Tableaux_size(3)
sage: T.an_element()
[[1, 1], [1]]
sage: T = sage.combinat.tableau.Tableaux_size(0)
sage: T.an_element()
[]
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.
INPUT:
OUTPUT:
A tableau, whose shape is shape and whose reading word is w. If the convention is specified as "French", the reading word is to be read starting from the top row in French convention (= the bottom row in English convention). If the convention is specified as "English", the reading word is to be read starting with the top row in English convention.
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]]
sage: word = Word(flatten(t))
sage: from_shape_and_word(shape, word, convention = "English")
[[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])