I wanted to apply the Robinson-Schensted correspondence to words. This
is a method for Permutation but the documentation says I can apply
this to words (aka permutations with repeated entries). However when I
tried this I got an AssertionError. The problem seems to be that the
first tableau, p, is
> This can be fixed by replacing StandardTableau(p) by Tableau(p) in
> line 2602 of permutation.py. However this does not seem very
> satisfactory.
At some point, we looked at the code for permutations, and many things
there are actually defined for words on a totally ordered alphabet:
- size
- i
On 4/19/12 8:02 AM, Christian Stump wrote:
>> This can be fixed by replacing StandardTableau(p) by Tableau(p) in
>> line 2602 of permutation.py. However this does not seem very
>> satisfactory.
>
> At some point, we looked at the code for permutations, and many things
> there are actually defined
robinson_schensted_inverse returns wrong output:
from sage.combinat.permutation import robinson_schensted_inverse
sage: u
[[1, 1, 1], [2, 2], [3]]
sage: t
[[1, 3, 4], [2, 6], [5]]
sage: w = robinson_schensted_inverse(u,t)
sage: w
[3, 1, 1, 2, 2, 1]
sage: w.robinson_schensted()
[[[1, 1, 1, 2], [2]