ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 01 Jun 2020 03:39:34 -0500Convert between different ways of expressing permutationshttps://ask.sagemath.org/question/51663/convert-between-different-ways-of-expressing-permutations/ Suppose I have two permutations x and y, given in one line notation (e.g. x=[2,1,4,3] and y=[3,2,1,4]). How would I go about computing e.g. the Kazhdan-Lusztig polynomial P<sub>x,y</sub>(q) in sage? The KL polynomial requires as input representing symmetric group elements as products of simple reflections and I do not know how to (using a computer) convert between these different ways of expressing a permutation. How does one do this in sage?Sun, 31 May 2020 17:56:29 -0500https://ask.sagemath.org/question/51663/convert-between-different-ways-of-expressing-permutations/Answer by tmonteil for <p>Suppose I have two permutations x and y, given in one line notation (e.g. x=[2,1,4,3] and y=[3,2,1,4]). How would I go about computing e.g. the Kazhdan-Lusztig polynomial P<sub>x,y</sub>(q) in sage? The KL polynomial requires as input representing symmetric group elements as products of simple reflections and I do not know how to (using a computer) convert between these different ways of expressing a permutation. How does one do this in sage?</p>
https://ask.sagemath.org/question/51663/convert-between-different-ways-of-expressing-permutations/?answer=51666#post-id-51666I am not sure about your exact question, but you might start with:
sage: x = Permutation([2,1,4,3])
sage: y = Permutation([3,2,1,4])
sage: x.cycle_tuples()
[(1, 2), (3, 4)]
sage: y.cycle_tuples()
[(1, 3), (2,), (4,)]
Regarding Kazhdan-Lusztig polynomial for Weyl groups, you can have a look at :
- https://doc.sagemath.org/html/en/reference/combinat/sage/combinat/kazhdan_lusztig.html
- https://doc.sagemath.org/html/en/thematic_tutorials/lie/kazhdan_lusztig_polynomials.html
Sun, 31 May 2020 19:44:10 -0500https://ask.sagemath.org/question/51663/convert-between-different-ways-of-expressing-permutations/?answer=51666#post-id-51666Answer by FrédéricC for <p>Suppose I have two permutations x and y, given in one line notation (e.g. x=[2,1,4,3] and y=[3,2,1,4]). How would I go about computing e.g. the Kazhdan-Lusztig polynomial P<sub>x,y</sub>(q) in sage? The KL polynomial requires as input representing symmetric group elements as products of simple reflections and I do not know how to (using a computer) convert between these different ways of expressing a permutation. How does one do this in sage?</p>
https://ask.sagemath.org/question/51663/convert-between-different-ways-of-expressing-permutations/?answer=51667#post-id-51667Here is a sample session
sage: S4 = SymmetricGroup(4)
sage: R.<q> = LaurentPolynomialRing(QQ)
sage: KL = KazhdanLusztigPolynomial(S4,q)
sage: x = S4([1,2,3,4])
sage: y = S4([2,3,4,1])
sage: KL.P(x, y)
1
sage: y = S4([4,2,3,1])
sage: KL.P(x, y)
1 + qMon, 01 Jun 2020 03:39:34 -0500https://ask.sagemath.org/question/51663/convert-between-different-ways-of-expressing-permutations/?answer=51667#post-id-51667