AUTHORS:
Bases: sage.combinat.combinat.CombinatorialObject, sage.structure.element.Element
A composition tableau.
A composition tableau of shape
is an
array of boxes in rows,
boxes in row
, filled with positive
integers such that:
INPUT:
EXAMPLES:
sage: CompositionTableau([[1],[2,2]])
[[1], [2, 2]]
sage: CompositionTableau([[1],[3,2],[4,4]])
[[1], [3, 2], [4, 4]]
sage: CompositionTableau([])
[]
Return the composition corresponding to the set of all that do
not have
appearing strictly to the left of
in self.
EXAMPLES:
sage: CompositionTableau([[1],[3,2],[4,4]]).descent_composition()
[1, 2, 2]
Return the set of all that do not have
appearing strictly
to the left of
in self.
EXAMPLES:
sage: CompositionTableau([[1],[3,2],[4,4]]).descent_set()
[1, 3]
Return True if self is a standard composition tableau and False otherwise.
EXAMPLES:
sage: CompositionTableau([[1,1],[3,2],[4,4,3]]).is_standard()
False
sage: CompositionTableau([[2,1],[3],[4]]).is_standard()
True
Return a pretty print string of self.
EXAMPLES:
sage: CompositionTableau([[1],[3,2],[4,4]]).pp()
1
3 2
4 4
Return a Composition object which is the shape of self.
EXAMPLES:
sage: CompositionTableau([[1,1],[3,2],[4,4,3]]).shape_composition()
[2, 2, 3]
sage: CompositionTableau([[2,1],[3],[4]]).shape_composition()
[2, 1, 1]
Return a partition which is the shape of self sorted into weakly decreasing order.
EXAMPLES:
sage: CompositionTableau([[1,1],[3,2],[4,4,3]]).shape_partition()
[3, 2, 2]
sage: CompositionTableau([[2,1],[3],[4]]).shape_partition()
[2, 1, 1]
Return the number of boxes in self.
EXAMPLES:
sage: CompositionTableau([[1],[3,2],[4,4]]).size()
5
Return a composition where entry is the number of times that
appears in
self.
EXAMPLES:
sage: CompositionTableau([[1],[3,2],[4,4]]).weight()
[1, 1, 1, 2, 0]
Bases: sage.structure.unique_representation.UniqueRepresentation, sage.structure.parent.Parent
Composition tableaux.
INPUT:
Keyword arguments:
Positional arguments:
EXAMPLES:
sage: CT = CompositionTableaux(3); CT
Composition Tableaux of size 3 and maximum entry 3
sage: list(CT)
[[[1], [2], [3]],
[[1], [2, 2]],
[[1], [3, 2]],
[[1], [3, 3]],
[[2], [3, 3]],
[[1, 1], [2]],
[[1, 1], [3]],
[[2, 1], [3]],
[[2, 2], [3]],
[[1, 1, 1]],
[[2, 1, 1]],
[[2, 2, 1]],
[[2, 2, 2]],
[[3, 1, 1]],
[[3, 2, 1]],
[[3, 2, 2]],
[[3, 3, 1]],
[[3, 3, 2]],
[[3, 3, 3]]]
sage: CT = CompositionTableaux([1,2,1]); CT
Composition tableaux of shape [1, 2, 1] and maximun entry 4
sage: list(CT)
[[[1], [2, 2], [3]],
[[1], [2, 2], [4]],
[[1], [3, 2], [4]],
[[1], [3, 3], [4]],
[[2], [3, 3], [4]]]
sage: CT = CompositionTableaux(shape=[1,2,1],max_entry=3); CT
Composition tableaux of shape [1, 2, 1] and maximun entry 3
sage: list(CT)
[[[1], [2, 2], [3]]]
sage: CT = CompositionTableaux(2,max_entry=3); CT
Composition Tableaux of size 2 and maximum entry 3
sage: list(CT)
[[[1], [2]],
[[1], [3]],
[[2], [3]],
[[1, 1]],
[[2, 1]],
[[2, 2]],
[[3, 1]],
[[3, 2]],
[[3, 3]]]
sage: CT = CompositionTableaux(0); CT
Composition Tableaux of size 0 and maximum entry 0
sage: list(CT)
[[]]
alias of CompositionTableau
Bases: sage.combinat.backtrack.GenericBacktracker
A backtracker class for generating sets of composition tableaux.
EXAMPLES:
sage: from sage.combinat.composition_tableau import CompositionTableauxBacktracker
sage: T = CompositionTableau([[2,1],[5,4,3,2],[6],[7,7,6]])
sage: n = CompositionTableauxBacktracker(T.shape_composition())
sage: n.get_next_pos(1,1)
(1, 2)
Bases: sage.combinat.composition_tableau.CompositionTableaux, sage.sets.disjoint_union_enumerated_sets.DisjointUnionEnumeratedSets
All composition tableaux.
Return a particular element of self.
EXAMPLES:
sage: CT = CompositionTableaux()
sage: CT.an_element()
[[1, 1], [2]]
Bases: sage.combinat.composition_tableau.CompositionTableaux
Composition tableaux of a fixed shape comp with a given max entry.
INPUT:
Return a particular element of CompositionTableaux_shape.
EXAMPLES:
sage: CT = CompositionTableaux([1,2,1])
sage: CT.an_element()
[[1], [2, 2], [3]]
Bases: sage.combinat.composition_tableau.CompositionTableaux
Composition tableaux of a fixed size .
INPUT:
OUTUT: