Module: sage.combinat.ribbon
Ribbons
Module-level Functions
r) |
Returns a ribbon tableau object.
A ribbon is a skew tableau that does not contain a 2x2 box. A ribbon is given by a list of the rows from top to bottom.
sage: Ribbon([[2,3],[1,4,5]]) [[2, 3], [1, 4, 5]] sage: Ribbon([[2,3],[1,4,5]]).to_skew_tableau() [[None, None, 2, 3], [1, 4, 5]]
shape) |
Returns the combinatorial class of standard ribbon tableaux of shape shape.
sage: StandardRibbons([2,2]) Standard ribbon tableaux of shape [2, 2] sage: StandardRibbons([2,2]).first() [[2, 4], [1, 3]] sage: StandardRibbons([2,2]).last() [[1, 2], [3, 4]] sage: StandardRibbons([2,2]).count() 5 sage: StandardRibbons([2,2]).list() [[[2, 4], [1, 3]], [[2, 3], [1, 4]], [[1, 4], [2, 3]], [[1, 3], [2, 4]], [[1, 2], [3, 4]]] sage: StandardRibbons([3,2,2]).count() 155
p) |
Returns 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.
sage: import sage.combinat.ribbon as ribbon sage: [ribbon.from_permutation(p) for p in Permutations(3)] [[[1, 2, 3]], [[2], [1, 3]], [[1, 3], [2]], [[1], [2, 3]], [[1, 2], [3]], [[1], [2], [3]]]
shape, word) |
Returns the ribbon corresponding to the given ribbon shape and word.
sage: import sage.combinat.ribbon as ribbon sage: ribbon.from_shape_and_word([2,3],[1,2,3,4,5]) [[1, 2], [3, 4, 5]]
Class: Ribbon_class
Functions: evaluation,
height,
is_standard,
ribbon_shape,
shape,
size,
spin,
to_permutation,
to_skew_tableau,
to_word,
to_word_by_column,
to_word_by_row,
width
self) |
Returns the evaluation of the word from ribbon.
sage: Ribbon([[1,2],[3,4]]).evaluation() [1, 1, 1, 1]
self) |
Returns the height of the ribbon.
sage: Ribbon([[2,3],[1,4,5]]).height() 2
self) |
Returns True is the ribbon is standard and False otherwise. ribbon are standard if they are filled with the numbers 1...size and they are increasing along both rows and columns.
sage: Ribbon([[2,3],[1,4,5]]).is_standard() True sage: Ribbon([[2,2],[1,4,5]]).is_standard() False sage: Ribbon([[4,5],[1,2,3]]).is_standard() False
self) |
Returns the ribbon shape. The ribbon shape is given just by the number of boxes in each row.
sage: Ribbon([[2,3],[1,4,5]]).ribbon_shape() [2, 3]
self) |
Returns the skew partition corresponding to the shape of the ribbon.
sage: Ribbon([[2,3],[1,4,5]]).shape() [[4, 3], [2]]
self) |
Returns the size ( number of boxes ) in the ribbon.
sage: Ribbon([[2,3],[1,4,5]]).size() 5
self) |
Returns the spin of self.
sage: Ribbon([[2,3],[1,4,5]]).spin() 1/2
self) |
Returns the permutation corresponding to the ribbon tableau.
sage: r = Ribbon([[1], [2,3], [4, 5, 6]]) sage: r.to_permutation() [4, 5, 6, 2, 3, 1]
self) |
Returns the skew tableau corresponding to the ribbon tableau.
sage: Ribbon([[2,3],[1,4,5]]).to_skew_tableau() [[None, None, 2, 3], [1, 4, 5]]
self) |
An alias for Ribbon.to_word_by_row().
sage: Ribbon([[1],[2,3]]).to_word_by_row() [2, 3, 1] sage: Ribbon([[2, 4], [3], [1]]).to_word_by_row() [1, 3, 2, 4]
self) |
Returns the word obtained from a column reading of the ribbon
sage: Ribbon([[1],[2,3]]).to_word_by_column() [1, 3, 2] sage: Ribbon([[2, 4], [3], [1]]).to_word_by_column() [4, 2, 3, 1]
self) |
Returns a word obtained from a row reading of the ribbon.
sage: Ribbon([[1],[2,3]]).to_word_by_row() [2, 3, 1] sage: Ribbon([[2, 4], [3], [1]]).to_word_by_row() [1, 3, 2, 4]
self) |
Returns the width of the ribbon.
sage: Ribbon([[2,3],[1,4,5]]).width() 4
Class: StandardRibbons_shape
self, shape) |
TESTS:
sage: S = StandardRibbons([2,2]) sage: S == loads(dumps(S)) True
Functions: first,
iterator,
last
self) |
Returns the first standard ribbon of ribbon shape shape.
sage: StandardRibbons([2,2]).first() [[2, 4], [1, 3]]
self) |
An iterator for the standard ribbon of ribbon shape shape.
sage: [t for t in StandardRibbons([2,2])] [[[2, 4], [1, 3]], [[2, 3], [1, 4]], [[1, 4], [2, 3]], [[1, 3], [2, 4]], [[1, 2], [3, 4]]]
self) |
Returns the first standard ribbon of ribbon shape shape.
sage: StandardRibbons([2,2]).last() [[1, 2], [3, 4]]
Special Functions: __init__,
__repr__
self) |
TESTS:
sage: repr(StandardRibbons([2,2])) 'Standard ribbon tableaux of shape [2, 2]'