2

For example: for the permutation $[6,3,2,4,1,5]$, we know that $[6,3,2,4,1,5]=(56)(45)(34)(23)(12)(23)(34)(45)(23)$ For Weyl Group of A5, that is $s_5*s_4*s_3*s_2*s_1*s_2*s_3*s_4*s_2$, My question is: are there any existed codes to convert any permutation to this form?

  • 1
    There is probably code somewhere. But it would also not be hard to code yourself. Look for the first $i$ with $a_i > a_{i+1}$, swap $a_i$ and $a_{i+1}$, write down $s_i$, and repeat. This terminates after at most $\binom{n-1}{2}$ swaps. – Jair Taylor Apr 19 '18 at 01:49

1 Answers1

1

Simply like that

sage: x = Permutation([6,3,2,4,1,5])
sage: x.reduced_word()
[5, 4, 3, 2, 1, 3, 2, 3, 4]

The method "reduced_word" also works with other constructions of finite Coxeter groups.

F. C.
  • 512