Returns a multi skew tableau object which is a tuple of skew tableau.
EXAMPLES:
sage: s = MultiSkewTableau([ [[None,1],[2,3]], [[1,2],[2]] ])
sage: s.size()
6
sage: s.weight()
[2, 3, 1]
sage: s.shape()
[[[2, 2], [1]], [[2, 1], []]]
Bases: sage.combinat.combinat.CombinatorialObject
Returns a list of the inversion pairs of self.
EXAMPLES:
sage: s = MultiSkewTableau([ [[2,3],[5,5]], [[1,1],[3,3]], [[2],[6]] ])
sage: s.inversion_pairs()
[((0, (0, 0)), (1, (0, 0))),
((0, (1, 0)), (1, (0, 1))),
((0, (1, 1)), (1, (0, 0))),
((0, (1, 1)), (1, (1, 1))),
((0, (1, 1)), (2, (0, 0))),
((1, (0, 1)), (2, (0, 0))),
((1, (1, 1)), (2, (0, 0)))]
Returns the number of inversion pairs of self.
EXAMPLES:
sage: t1 = SkewTableau([[1]])
sage: t2 = SkewTableau([[2]])
sage: MultiSkewTableau([t1,t1]).inversions()
0
sage: MultiSkewTableau([t1,t2]).inversions()
0
sage: MultiSkewTableau([t2,t2]).inversions()
0
sage: MultiSkewTableau([t2,t1]).inversions()
1
sage: s = MultiSkewTableau([ [[2,3],[5,5]], [[1,1],[3,3]], [[2],[6]] ])
sage: s.inversions()
7
Returns the shape of self.
EXAMPLES:
sage: s = SemistandardSkewTableaux([[2,2],[1]]).list()
sage: a = MultiSkewTableau([s[0],s[1],s[2]])
sage: a.shape()
[[[2, 2], [1]], [[2, 2], [1]], [[2, 2], [1]]]
Returns the size of self, which is the sum of the sizes of the skew tableaux in self.
EXAMPLES:
sage: s = SemistandardSkewTableaux([[2,2],[1]]).list()
sage: a = MultiSkewTableau([s[0],s[1],s[2]])
sage: a.size()
9
Returns the weight of self.
EXAMPLES:
sage: s = SemistandardSkewTableaux([[2,2],[1]]).list()
sage: a = MultiSkewTableau([s[0],s[1],s[2]])
sage: a.weight()
[5, 3, 1]
Returns a ribbon tableau object.
EXAMPLES:
sage: rt = RibbonTableau([[None, 1],[2,3]]); rt
[[None, 1], [2, 3]]
sage: rt.inner_shape()
[1]
sage: rt.outer_shape()
[2, 2]
sage: RibbonTableau(expr=[[1,1],[[5],[3,4],[1,2]]])
[[None, 1, 2], [None, 3, 4], [5]]
Bases: sage.combinat.skew_tableau.SkewTableau_class
Returns the evaluation of the ribbon tableau
EXAMPLES:
sage: RibbonTableau([[0, 0, 3, 0], [1, 1, 0], [2, 0, 4]]).evaluation()
[2, 1, 1, 1]
Returns the length of the ribbons into a ribbon tableau.
EXAMPLES:
sage: RibbonTableau([[None, 1],[2,3]]).length()
1
sage: RibbonTableau([[1,0],[2,0]]).length()
2
Returns a word obtained from a row reading of self.
EXAMPLES:
sage: R = RibbonTableau([[0, 0, 3, 0], [1, 1, 0], [2, 0, 4]])
sage: R.to_word()
word: 2041100030
Returns the combinatorial class of ribbon tableaux of skew shape shape and weight weight tiled by ribbons of length length.
EXAMPLES:
sage: RibbonTableaux([[2,1],[]],[1,1,1],1)
Ribbon tableaux of shape [[2, 1], []] and weight [1, 1, 1] with 1-ribbons
Bases: sage.combinat.combinat.CombinatorialClass
EXAMPLES:
sage: RibbonTableaux([[2,1],[]],[1,1,1],1).cardinality()
2
sage: RibbonTableaux([[2,2],[]],[1,1],2).cardinality()
2
sage: RibbonTableaux([[4,3,3],[]],[2,1,1,1],2).cardinality()
5
TESTS:
sage: RibbonTableaux([6,6,6], [4,2], 3).cardinality()
6
sage: RibbonTableaux([3,3,3,2,1], [3,1], 3).cardinality()
1
sage: RibbonTableaux([3,3,3,2,1], [2,2], 3).cardinality()
2
sage: RibbonTableaux([3,3,3,2,1], [2,1,1], 3).cardinality()
5
sage: RibbonTableaux([3,3,3,2,1], [1,1,1,1], 3).cardinality()
12
sage: RibbonTableaux([5,4,3,2,1],[2,2,1],3).cardinality()
10
sage: RibbonTableaux([8,7,6,5,1,1],[3,2,2,1],3).cardinality()
85
sage: RibbonTableaux([5,4,3,2,1,1,1],[2,2,1],3).cardinality()
10
sage: RibbonTableaux([7,7,7,2,1,1],[3,2,0,1,1],3).cardinality()
25
Weights with some zeros in the middle and end
sage: RibbonTableaux([3,3,3], [0,1,0,2,0], 3).cardinality()
3
sage: RibbonTableaux([3,3,3],[1,0,1,0,1,0,0,0],3).cardinality()
6
EXAMPLES:
sage: RibbonTableaux([[2,1],[]],[1,1,1],1).list()
[[[1, 3], [2]], [[1, 2], [3]]]
sage: RibbonTableaux([[2,2],[]],[1,1],2).list()
[[[0, 0], [1, 2]], [[1, 0], [2, 0]]]
Returns the combinatorial class of semistandard multi skew tableaux. A multi skew tableau is a k-tuple of skew tableaux of givens shape with a specified total weight.
EXAMPLES:
sage: s = SemistandardMultiSkewTableaux([ [[2,1],[]], [[2,2],[1]] ], [2,2,2]); s
Semistandard multi skew tableaux of shape [[[2, 1], []], [[2, 2], [1]]] and weight [2, 2, 2]
sage: s.list()
[[[[1, 1], [2]], [[None, 2], [3, 3]]],
[[[1, 2], [2]], [[None, 1], [3, 3]]],
[[[1, 3], [2]], [[None, 2], [1, 3]]],
[[[1, 3], [2]], [[None, 1], [2, 3]]],
[[[1, 1], [3]], [[None, 2], [2, 3]]],
[[[1, 2], [3]], [[None, 2], [1, 3]]],
[[[1, 2], [3]], [[None, 1], [2, 3]]],
[[[2, 2], [3]], [[None, 1], [1, 3]]],
[[[1, 3], [3]], [[None, 1], [2, 2]]],
[[[2, 3], [3]], [[None, 1], [1, 2]]]]
Bases: sage.combinat.combinat.CombinatorialClass
EXAMPLES:
sage: sp = SkewPartitions(3).list()
sage: SemistandardMultiSkewTableaux([SkewPartition([[1, 1, 1], []]), SkewPartition([[3], []])],[2,2,2]).list()
[[[[1], [2], [3]], [[1, 2, 3]]]]
sage: a = SkewPartition([[8,7,6,5,1,1],[2,1,1]])
sage: weight = [3,3,2]
sage: k = 3
sage: s = SemistandardMultiSkewTableaux(a.quotient(k),weight)
sage: len(s.list())
34
sage: RibbonTableaux(a,weight,k).cardinality()
34
Returns the cospin polynomial associated to part, weight, and length.
EXAMPLES:
sage: from sage.combinat.ribbon_tableau import cospin_polynomial
sage: cospin_polynomial([6,6,6],[4,2],3)
t^4 + t^3 + 2*t^2 + t + 1
sage: cospin_polynomial([3,3,3,2,1], [3,1], 3)
1
sage: cospin_polynomial([3,3,3,2,1], [2,2], 3)
t + 1
sage: cospin_polynomial([3,3,3,2,1], [2,1,1], 3)
t^2 + 2*t + 2
sage: cospin_polynomial([3,3,3,2,1], [1,1,1,1], 3)
t^3 + 3*t^2 + 5*t + 3
sage: cospin_polynomial([5,4,3,2,1,1,1], [2,2,1], 3)
2*t^2 + 6*t + 2
sage: cospin_polynomial([[6]*6, [3,3]], [4,4,2], 3)
3*t^4 + 6*t^3 + 9*t^2 + 5*t + 3
INPUT:
TESTS:
sage: from sage.combinat.ribbon_tableau import count_rec
sage: count_rec([], [], [[2, 1, 1], []], [2], 2)
[0]
sage: count_rec([[0], [1]], [[[2, 1, 1], [0, 0, 2, 0]], [[4], [2, 0, 0, 0]]], [[4, 1, 1], []], [2, 1], 2)
[1]
sage: count_rec([], [[[], [2, 2]]], [[2, 2], []], [2], 2)
[1]
sage: count_rec([], [[[], [2, 0, 2, 0]]], [[4], []], [2], 2)
[1]
sage: count_rec([[1], [1]], [[[2, 2], [0, 0, 2, 0]], [[4], [2, 0, 0, 0]]], [[4, 2], []], [2, 1], 2)
[2]
sage: count_rec([[1], [1], [2]], [[[2, 2, 2], [0, 0, 2, 0]], [[4, 1, 1], [0, 2, 0, 0]], [[4, 2], [2, 0, 0, 0]]], [[4, 2, 2], []], [2, 1, 1], 2)
[4]
sage: count_rec([[4], [1]], [[[4, 2, 2], [0, 0, 2, 0]], [[4, 3, 1], [0, 2, 0, 0]]], [[4, 3, 3], []], [2, 1, 1, 1], 2)
[5]
Returns a RibbonTableau from a MuPAD-Combinat expr for a skew tableau. The first list in expr is the inner shape of the skew tableau. The second list are the entries in the rows of the skew tableau from bottom to top.
Provided primarily for compatibility with MuPAD-Combinat.
EXAMPLES:
sage: import sage.combinat.ribbon_tableau as ribbon_tableau
sage: sage.combinat.ribbon_tableau.from_expr([[1,1],[[5],[3,4],[1,2]]])
[[None, 1, 2], [None, 3, 4], [5]]
sage: type(_)
<class 'sage.combinat.ribbon_tableau.RibbonTableau_class'>
TESTS:
sage: from sage.combinat.ribbon_tableau import graph_implementation_rec, list_rec
sage: graph_implementation_rec(SkewPartition([[1], []]), [1], 1, list_rec)
[[[], [[1]]]]
sage: graph_implementation_rec(SkewPartition([[2, 1], []]), [1, 2], 1, list_rec)
[[[], [[2], [1, 2]]]]
sage: graph_implementation_rec(SkewPartition([[], []]), [0], 1, list_rec)
[[[], []]]
INPUT:
TESTS:
sage: from sage.combinat.ribbon_tableau import insertion_tableau
sage: insertion_tableau([[1], []], [1], 1, [[], []], 1)
[[], [[1]]]
sage: insertion_tableau([[2, 1], []], [1, 1], 2, [[], [[1]]], 1)
[[], [[2], [1, 2]]]
sage: insertion_tableau([[2, 1], []], [0, 0], 3, [[], [[2], [1, 2]]], 1)
[[], [[2], [1, 2]]]
sage: insertion_tableau([[1, 1], []], [1], 2, [[], [[1]]], 1)
[[], [[2], [1]]]
sage: insertion_tableau([[2], []], [0, 1], 2, [[], [[1]]], 1)
[[], [[1, 2]]]
sage: insertion_tableau([[2, 1], []], [0, 1], 3, [[], [[2], [1]]], 1)
[[], [[2], [1, 3]]]
sage: insertion_tableau([[1, 1], []], [2], 1, [[], []], 2)
[[], [[1], [0]]]
sage: insertion_tableau([[2], []], [2, 0], 1, [[], []], 2)
[[], [[1, 0]]]
sage: insertion_tableau([[2, 2], []], [0, 2], 2, [[], [[1], [0]]], 2)
[[], [[1, 2], [0, 0]]]
sage: insertion_tableau([[2, 2], []], [2, 0], 2, [[], [[1, 0]]], 2)
[[], [[2, 0], [1, 0]]]
sage: insertion_tableau([[2, 2], [1]], [3, 0], 1, [[], []], 3)
[[1], [[1, 0], [0]]]
INPUT:
TESTS:
sage: from sage.combinat.ribbon_tableau import list_rec
sage: list_rec([], [[[], [1]]], [[1], []], [1], 1)
[[[], [[1]]]]
sage: list_rec([[[[], [[1]]]]], [[[1], [1, 1]]], [[2, 1], []], [1, 2], 1)
[[[], [[2], [1, 2]]]]
sage: list_rec([], [[[1], [3, 0]]], [[2, 2], [1]], [1], 3)
[[[1], [[1, 0], [0]]]]
sage: list_rec([[[[], [[2]]]]], [[[1], [1, 1]]], [[2, 1], []], [0, 1, 2], 1)
[[[], [[3], [2, 3]]]]
sage: list_rec([], [[[], [2]]], [[1, 1], []], [1], 2)
[[[], [[1], [0]]]]
sage: list_rec([], [[[], [2, 0]]], [[2], []], [1], 2)
[[[], [[1, 0]]]]
sage: list_rec([[[[], [[1], [0]]]], [[[], [[1, 0]]]]], [[[1, 1], [0, 2]], [[2], [2, 0]]], [[2, 2], []], [1, 1], 2)
[[[], [[1, 2], [0, 0]]], [[], [[2, 0], [1, 0]]]]
sage: list_rec([], [[[], [2, 2]]], [[2, 2], []], [2], 2)
[[[], [[1, 1], [0, 0]]]]
sage: list_rec([], [[[], [1, 1]]], [[2], []], [2], 1)
[[[], [[1, 1]]]]
sage: list_rec([[[[], [[1, 1]]]]], [[[2], [1, 1]]], [[2, 2], []], [2, 2], 1)
[[[], [[2, 2], [1, 1]]]]
Returns the spin polynomial associated to part, weight, and length.
EXAMPLES:
sage: from sage.combinat.ribbon_tableau import spin_polynomial
sage: spin_polynomial([6,6,6],[4,2],3)
t^6 + t^5 + 2*t^4 + t^3 + t^2
sage: spin_polynomial([6,6,6],[4,1,1],3)
t^6 + 2*t^5 + 3*t^4 + 2*t^3 + t^2
sage: spin_polynomial([3,3,3,2,1], [2,2], 3)
t^(7/2) + t^(5/2)
sage: spin_polynomial([3,3,3,2,1], [2,1,1], 3)
2*t^(7/2) + 2*t^(5/2) + t^(3/2)
sage: spin_polynomial([3,3,3,2,1], [1,1,1,1], 3)
3*t^(7/2) + 5*t^(5/2) + 3*t^(3/2) + sqrt(t)
sage: spin_polynomial([5,4,3,2,1,1,1], [2,2,1], 3)
2*t^(9/2) + 6*t^(7/2) + 2*t^(5/2)
sage: spin_polynomial([[6]*6, [3,3]], [4,4,2], 3)
3*t^9 + 5*t^8 + 9*t^7 + 6*t^6 + 3*t^5
Returns the spin polynomial associated with part, weight, and length, with the substitution t -> t^2 made.
EXAMPLES:
sage: from sage.combinat.ribbon_tableau import spin_polynomial_square
sage: spin_polynomial_square([6,6,6],[4,2],3)
t^12 + t^10 + 2*t^8 + t^6 + t^4
sage: spin_polynomial_square([6,6,6],[4,1,1],3)
t^12 + 2*t^10 + 3*t^8 + 2*t^6 + t^4
sage: spin_polynomial_square([3,3,3,2,1], [2,2], 3)
t^7 + t^5
sage: spin_polynomial_square([3,3,3,2,1], [2,1,1], 3)
2*t^7 + 2*t^5 + t^3
sage: spin_polynomial_square([3,3,3,2,1], [1,1,1,1], 3)
3*t^7 + 5*t^5 + 3*t^3 + t
sage: spin_polynomial_square([5,4,3,2,1,1,1], [2,2,1], 3)
2*t^9 + 6*t^7 + 2*t^5
sage: spin_polynomial_square([[6]*6, [3,3]], [4,4,2], 3)
3*t^18 + 5*t^16 + 9*t^14 + 6*t^12 + 3*t^10
Routine used for constructing the spin polynomial.
INPUT:
EXAMPLES:
sage: from sage.combinat.ribbon_tableau import spin_rec
sage: sp = SkewPartition
sage: t = ZZ['t'].gen()
sage: spin_rec(t, [], [[[], [3, 3]]], sp([[2, 2, 2], []]), [2], 3)
[t^4]
sage: spin_rec(t, [[0], [t^4]], [[[2, 1, 1, 1, 1], [0, 3]], [[2, 2, 2], [3, 0]]], sp([[2, 2, 2, 2, 1], []]), [2, 1], 3)
[t^5]
sage: spin_rec(t, [], [[[], [3, 3, 0]]], sp([[3, 3], []]), [2], 3)
[t^2]
sage: spin_rec(t, [[t^4], [t^3], [t^2]], [[[2, 2, 2], [0, 0, 3]], [[3, 2, 1], [0, 3, 0]], [[3, 3], [3, 0, 0]]], sp([[3, 3, 3], []]), [2, 1], 3)
[t^6 + t^4 + t^2]
sage: spin_rec(t, [[t^5], [t^4], [t^6 + t^4 + t^2]], [[[2, 2, 2, 2, 1], [0, 0, 3]], [[3, 3, 1, 1, 1], [0, 3, 0]], [[3, 3, 3], [3, 0, 0]]], sp([[3, 3, 3, 2, 1], []]), [2, 1, 1], 3)
[2*t^7 + 2*t^5 + t^3]