Bases: sage.combinat.skew_tableau.SkewTableau
A ribbon.
A ribbon is a skew tableau that does not contain a box. A
ribbon is given by a list of the rows from top to bottom.
EXAMPLES:
sage: x = RibbonShapedTableau([[None, None, None, 2, 3], [None, 1, 4, 5], [3, 2]]); x
[[None, None, None, 2, 3], [None, 1, 4, 5], [3, 2]]
sage: x.pp()
. . . 2 3
. 1 4 5
3 2
sage: x.shape()
[5, 4, 2] / [3, 1]
The entries labeled by None correspond to the inner partition. Using None is optional, the entries will be shifted accordingly.
sage: x = RibbonShapedTableau([[2,3],[1,4,5],[3,2]]); x.pp()
. . . 2 3
. 1 4 5
3 2
Return the evaluation of the word from ribbon.
EXAMPLES:
sage: RibbonShapedTableau([[1,2],[3,4]]).evaluation()
[1, 1, 1, 1]
Return the height of self.
The height is given by the number of rows in the outer partition.
EXAMPLES:
sage: RibbonShapedTableau([[2,3],[1,4,5]]).height()
2
Return the spin of self.
EXAMPLES:
sage: RibbonShapedTableau([[2,3],[1,4,5]]).spin()
1/2
Returns the permutation corresponding to the ribbon tableau.
EXAMPLES:
sage: r = RibbonShapedTableau([[1], [2,3], [4, 5, 6]])
sage: r.to_permutation()
[4, 5, 6, 2, 3, 1]
This is deprecated in trac ticket #14101 since RibbonShapedTableau inherits from SkewTableau.
EXAMPLES:
sage: RibbonShapedTableau([[2,3],[1,4,5]]).to_skew_tableau()
doctest:...: DeprecationWarning: this method is deprecated since ribbon shaped tableaux are skew partitions
See http://trac.sagemath.org/14101 for details.
[[None, None, 2, 3], [1, 4, 5]]
Return the width of the ribbon.
This is given by the length of the longest row in the outer partition.
EXAMPLES:
sage: RibbonShapedTableau([[2,3],[1,4,5]]).width()
4
sage: RibbonShapedTableau([]).width()
0
Bases: sage.combinat.skew_tableau.StandardSkewTableaux
The set of all standard ribbon shaped tableaux.
INPUT:
alias of RibbonShapedTableau
Return a standard ribbon of size len(p) from a permutation p. The lengths of each row are given by the distance between the descents of the permutation p.
EXAMPLES:
sage: import sage.combinat.ribbon_shaped_tableau as rst
sage: [StandardRibbonShapedTableaux().from_permutation(p) for p in Permutations(3)]
[[[1, 2, 3]],
[[None, 2], [1, 3]],
[[1, 3], [2]],
[[None, 1], [2, 3]],
[[1, 2], [3]],
[[1], [2], [3]]]
Return the ribbon corresponding to the given ribbon shape and word.
EXAMPLES:
sage: StandardRibbonShapedTableaux().from_shape_and_word([2,3],[1,2,3,4,5])
[[None, None, 1, 2], [3, 4, 5]]
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.ribbon_shaped_tableau.StandardRibbonShapedTableaux
Class of standard ribbon tableaux of ribbon shape shape.
EXAMPLES:
sage: StandardRibbonShapedTableaux([2,2])
Standard ribbon tableaux of shape [2, 2]
sage: StandardRibbonShapedTableaux([2,2]).first()
[[None, 2, 4], [1, 3]]
sage: StandardRibbonShapedTableaux([2,2]).last()
[[None, 1, 2], [3, 4]]
sage: StandardRibbonShapedTableaux([2,2]).cardinality()
5
sage: StandardRibbonShapedTableaux([2,2]).list()
[[[None, 2, 4], [1, 3]],
[[None, 2, 3], [1, 4]],
[[None, 1, 4], [2, 3]],
[[None, 1, 3], [2, 4]],
[[None, 1, 2], [3, 4]]]
sage: StandardRibbonShapedTableaux([3,2,2]).cardinality()
155
Return the first standard ribbon of self.
EXAMPLES:
sage: StandardRibbonShapedTableaux([2,2]).first()
[[None, 2, 4], [1, 3]]
Return the last standard ribbon of self.
EXAMPLES:
sage: StandardRibbonShapedTableaux([2,2]).last()
[[None, 1, 2], [3, 4]]