Ribbon Shaped Tableaux¶
- class sage.combinat.ribbon_shaped_tableau.RibbonShapedTableau(parent, t)¶
Bases:
sage.combinat.skew_tableau.SkewTableau
A ribbon shaped tableau.
For the purposes of this class, a ribbon shaped tableau is a skew tableau whose shape is a skew partition which:
has at least one cell in row \(1\);
has at least one cell in column \(1\);
has exactly one cell in each of \(q\) consecutive diagonals, for some nonnegative integer \(q\).
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. UsingNone
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
- height()¶
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
- spin()¶
Return the spin of
self
.EXAMPLES:
sage: RibbonShapedTableau([[2,3],[1,4,5]]).spin() 1/2
- width()¶
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
- class sage.combinat.ribbon_shaped_tableau.RibbonShapedTableaux(category=None)¶
Bases:
sage.combinat.skew_tableau.SkewTableaux
The set of all ribbon shaped tableaux.
- Element¶
alias of
RibbonShapedTableau
- from_shape_and_word(shape, word)¶
Return the ribbon corresponding to the given ribbon shape and word.
EXAMPLES:
sage: RibbonShapedTableaux().from_shape_and_word([1,3],[1,3,3,7]) [[None, None, 1], [3, 3, 7]]
- options(*get_value, **set_value)¶
Sets the global options for elements of the tableau, skew_tableau, and tableau tuple classes. The defaults are for tableau to be displayed as a list, latexed as a Young diagram using the English convention.
OPTIONS:
ascii_art
– (default:repr
) Controls the ascii art output for tableauxcompact
– minimal length ascii artrepr
– display using the diagram string representationtable
– display as a table
convention
– (default:English
) Sets the convention used for displaying tableaux and partitionsEnglish
– use the English conventionFrench
– use the French convention
display
– (default:list
) Controls the way in which tableaux are printedarray
– alias fordiagram
compact
– minimal length string representationdiagram
– display as Young diagram (similar topp()
ferrers_diagram
– alias fordiagram
list
– print tableaux as listsyoung_diagram
– alias fordiagram
latex
– (default:diagram
) Controls the way in which tableaux are latexedarray
– alias fordiagram
diagram
– as a Young diagramferrers_diagram
– alias fordiagram
list
– as a listyoung_diagram
– alias fordiagram
notation
– alternative name forconvention
Note
Changing the
convention
for tableaux also changes theconvention
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.options.display="array" sage: T 1 2 3 4 5 sage: Tableaux.options.convention="french" sage: T 4 5 1 2 3
Changing the
convention
for tableaux also changes theconvention
for partitions and vice versa:sage: P = Partition([3,3,1]) sage: print(P.ferrers_diagram()) * *** *** sage: Partitions.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.options.ascii_art = "table" sage: ascii_art(t) +---+---+---+ | 1 | 2 | 3 | +---+---+---+ | 4 | 5 | +---+---+ sage: Tableaux.options.ascii_art = "compact" sage: ascii_art(t) |1|2|3| |4|5| sage: Tableaux.options._reset()
See
GlobalOptions
for more features of these options.
- class sage.combinat.ribbon_shaped_tableau.Ribbon_class(parent, t)¶
Bases:
sage.combinat.ribbon_shaped_tableau.RibbonShapedTableau
This exists solely for unpickling
Ribbon_class
objects.
- class sage.combinat.ribbon_shaped_tableau.StandardRibbonShapedTableaux(category=None)¶
Bases:
sage.combinat.skew_tableau.StandardSkewTableaux
The set of all standard ribbon shaped tableaux.
INPUT:
shape
– (optional) the composition shape of the rows
- Element¶
alias of
RibbonShapedTableau
- from_permutation(p)¶
Return a standard ribbon of size
len(p)
from a permutationp
. The lengths of each row are given by the distance between the descents of the permutationp
.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]]]
- from_shape_and_word(shape, word)¶
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]]
- options(*get_value, **set_value)¶
Sets the global options for elements of the tableau, skew_tableau, and tableau tuple classes. The defaults are for tableau to be displayed as a list, latexed as a Young diagram using the English convention.
OPTIONS:
ascii_art
– (default:repr
) Controls the ascii art output for tableauxcompact
– minimal length ascii artrepr
– display using the diagram string representationtable
– display as a table
convention
– (default:English
) Sets the convention used for displaying tableaux and partitionsEnglish
– use the English conventionFrench
– use the French convention
display
– (default:list
) Controls the way in which tableaux are printedarray
– alias fordiagram
compact
– minimal length string representationdiagram
– display as Young diagram (similar topp()
ferrers_diagram
– alias fordiagram
list
– print tableaux as listsyoung_diagram
– alias fordiagram
latex
– (default:diagram
) Controls the way in which tableaux are latexedarray
– alias fordiagram
diagram
– as a Young diagramferrers_diagram
– alias fordiagram
list
– as a listyoung_diagram
– alias fordiagram
notation
– alternative name forconvention
Note
Changing the
convention
for tableaux also changes theconvention
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.options.display="array" sage: T 1 2 3 4 5 sage: Tableaux.options.convention="french" sage: T 4 5 1 2 3
Changing the
convention
for tableaux also changes theconvention
for partitions and vice versa:sage: P = Partition([3,3,1]) sage: print(P.ferrers_diagram()) * *** *** sage: Partitions.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.options.ascii_art = "table" sage: ascii_art(t) +---+---+---+ | 1 | 2 | 3 | +---+---+---+ | 4 | 5 | +---+---+ sage: Tableaux.options.ascii_art = "compact" sage: ascii_art(t) |1|2|3| |4|5| sage: Tableaux.options._reset()
See
GlobalOptions
for more features of these options.
- class sage.combinat.ribbon_shaped_tableau.StandardRibbonShapedTableaux_shape(shape)¶
Bases:
sage.combinat.ribbon_shaped_tableau.StandardRibbonShapedTableaux
Class of standard ribbon shaped tableaux of ribbon shape
shape
.EXAMPLES:
sage: StandardRibbonShapedTableaux([2,2]) Standard ribbon shaped 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, 1, 3], [2, 4]], [[None, 1, 2], [3, 4]], [[None, 2, 3], [1, 4]], [[None, 2, 4], [1, 3]], [[None, 1, 4], [2, 3]]] sage: StandardRibbonShapedTableaux([3,2,2]).cardinality() 155
- first()¶
Return the first standard ribbon of
self
.EXAMPLES:
sage: StandardRibbonShapedTableaux([2,2]).first() [[None, 2, 4], [1, 3]]
- last()¶
Return the last standard ribbon of
self
.EXAMPLES:
sage: StandardRibbonShapedTableaux([2,2]).last() [[None, 1, 2], [3, 4]]