18.22 Ribbons

Module: sage.combinat.ribbon

Ribbons

Module-level Functions

Ribbon( 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]]

StandardRibbons( 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

from_permutation( 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]]]

from_shape_and_word( 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

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

evaluation( self)

Returns the evaluation of the word from ribbon.

sage: Ribbon([[1,2],[3,4]]).evaluation()
[1, 1, 1, 1]

height( self)

Returns the height of the ribbon.

sage: Ribbon([[2,3],[1,4,5]]).height()
2

is_standard( 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

ribbon_shape( 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]

shape( self)

Returns the skew partition corresponding to the shape of the ribbon.

sage: Ribbon([[2,3],[1,4,5]]).shape()
[[4, 3], [2]]

size( self)

Returns the size ( number of boxes ) in the ribbon.

sage: Ribbon([[2,3],[1,4,5]]).size()
5

spin( self)

Returns the spin of self.

sage: Ribbon([[2,3],[1,4,5]]).spin()
1/2

to_permutation( 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]

to_skew_tableau( 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]]

to_word( 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]

to_word_by_column( 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]

to_word_by_row( 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]

width( self)

Returns the width of the ribbon.

sage: Ribbon([[2,3],[1,4,5]]).width()
4

Class: StandardRibbons_shape

class StandardRibbons_shape
StandardRibbons_shape( self, shape)

TESTS:

sage: S = StandardRibbons([2,2])
sage: S == loads(dumps(S))
True

Functions: first,$ \,$ iterator,$ \,$ last

first( self)

Returns the first standard ribbon of ribbon shape shape.

sage: StandardRibbons([2,2]).first()
[[2, 4], [1, 3]]

iterator( 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]]]

last( self)

Returns the first standard ribbon of ribbon shape shape.

sage: StandardRibbons([2,2]).last()
[[1, 2], [3, 4]]

Special Functions: __init__,$ \,$ __repr__

__repr__( self)

TESTS:

sage: repr(StandardRibbons([2,2]))
'Standard ribbon tableaux of shape [2, 2]'

See About this document... for information on suggesting changes.