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.Tue, 14 Apr 2020 03:11:37 -0500How to find the longest word in a subgroup of the symmetric group using Sage?https://ask.sagemath.org/question/50708/how-to-find-the-longest-word-in-a-subgroup-of-the-symmetric-group-using-sage/ Let $S_n$ be the symmetric group over $\\{1,2,\ldots,n\\}$. Let $J$ be a subset of $\\{1,\ldots, n-1\\}$ and let $W_J$ be the subgroup of $S_n$ generated by $s_j, j\in J \subset \\{1, \ldots, n-1\\}$, where $s_j$'s are simple reflections. How to find the longest word in $W_J$ in Sage? The following is some codes.
W = SymmetricGroup(8)
[s1,s2,s3,s4,s5,s6,s7] = W.simple_reflections()
Thank you very much.Sun, 12 Apr 2020 15:25:40 -0500https://ask.sagemath.org/question/50708/how-to-find-the-longest-word-in-a-subgroup-of-the-symmetric-group-using-sage/Comment by tmonteil for <p>Let $S_n$ be the symmetric group over $\{1,2,\ldots,n\}$. Let $J$ be a subset of $\{1,\ldots, n-1\}$ and let $W_J$ be the subgroup of $S_n$ generated by $s_j, j\in J \subset \{1, \ldots, n-1\}$, where $s_j$'s are simple reflections. How to find the longest word in $W_J$ in Sage? The following is some codes. </p>
<pre><code>W = SymmetricGroup(8)
[s1,s2,s3,s4,s5,s6,s7] = W.simple_reflections()
</code></pre>
<p>Thank you very much.</p>
https://ask.sagemath.org/question/50708/how-to-find-the-longest-word-in-a-subgroup-of-the-symmetric-group-using-sage/?comment=50733#post-id-50733@lijr07 could you please provide a definition of longest word ?Mon, 13 Apr 2020 14:17:20 -0500https://ask.sagemath.org/question/50708/how-to-find-the-longest-word-in-a-subgroup-of-the-symmetric-group-using-sage/?comment=50733#post-id-50733Comment by dan_fulea for <p>Let $S_n$ be the symmetric group over $\{1,2,\ldots,n\}$. Let $J$ be a subset of $\{1,\ldots, n-1\}$ and let $W_J$ be the subgroup of $S_n$ generated by $s_j, j\in J \subset \{1, \ldots, n-1\}$, where $s_j$'s are simple reflections. How to find the longest word in $W_J$ in Sage? The following is some codes. </p>
<pre><code>W = SymmetricGroup(8)
[s1,s2,s3,s4,s5,s6,s7] = W.simple_reflections()
</code></pre>
<p>Thank you very much.</p>
https://ask.sagemath.org/question/50708/how-to-find-the-longest-word-in-a-subgroup-of-the-symmetric-group-using-sage/?comment=50728#post-id-50728Something like the following...?!
sage: S8 = SymmetricGroup(8)
sage: S7 = SymmetricGroup(7)
sage: S8( S7.long_element() )
(1,7)(2,6)(3,5)Mon, 13 Apr 2020 11:52:10 -0500https://ask.sagemath.org/question/50708/how-to-find-the-longest-word-in-a-subgroup-of-the-symmetric-group-using-sage/?comment=50728#post-id-50728Answer by FrédéricC for <p>Let $S_n$ be the symmetric group over $\{1,2,\ldots,n\}$. Let $J$ be a subset of $\{1,\ldots, n-1\}$ and let $W_J$ be the subgroup of $S_n$ generated by $s_j, j\in J \subset \{1, \ldots, n-1\}$, where $s_j$'s are simple reflections. How to find the longest word in $W_J$ in Sage? The following is some codes. </p>
<pre><code>W = SymmetricGroup(8)
[s1,s2,s3,s4,s5,s6,s7] = W.simple_reflections()
</code></pre>
<p>Thank you very much.</p>
https://ask.sagemath.org/question/50708/how-to-find-the-longest-word-in-a-subgroup-of-the-symmetric-group-using-sage/?answer=50735#post-id-50735Here is a starting point. The rest is standard Coxeter theory.
sage: W = CoxeterGroup(['A',4])
sage: w = W.long_element()
sage: t = w.coset_representative([1,2])
Mon, 13 Apr 2020 14:56:07 -0500https://ask.sagemath.org/question/50708/how-to-find-the-longest-word-in-a-subgroup-of-the-symmetric-group-using-sage/?answer=50735#post-id-50735Comment by FrédéricC for <p>Here is a starting point. The rest is standard Coxeter theory.</p>
<pre><code>sage: W = CoxeterGroup(['A',4])
sage: w = W.long_element()
sage: t = w.coset_representative([1,2])
</code></pre>
https://ask.sagemath.org/question/50708/how-to-find-the-longest-word-in-a-subgroup-of-the-symmetric-group-using-sage/?comment=50747#post-id-50747You need to look at the other factor of the canonical factorisation
sage: (~t*w).reduced_word()
[1, 2, 1]Tue, 14 Apr 2020 03:11:37 -0500https://ask.sagemath.org/question/50708/how-to-find-the-longest-word-in-a-subgroup-of-the-symmetric-group-using-sage/?comment=50747#post-id-50747Comment by lijr07 for <p>Here is a starting point. The rest is standard Coxeter theory.</p>
<pre><code>sage: W = CoxeterGroup(['A',4])
sage: w = W.long_element()
sage: t = w.coset_representative([1,2])
</code></pre>
https://ask.sagemath.org/question/50708/how-to-find-the-longest-word-in-a-subgroup-of-the-symmetric-group-using-sage/?comment=50740#post-id-50740@FrédéricC, thank you very much. I tried to use the following commands to find the longest word in $W_{J}$, $J=\\{1,2\\}$. But it doesn't give the answer $s_1 s_2 s_1$.
W = CoxeterGroup(['A',4])
w = W.long_element()
t = w.coset_representative([1,2])
t.reduced_word()Mon, 13 Apr 2020 17:24:52 -0500https://ask.sagemath.org/question/50708/how-to-find-the-longest-word-in-a-subgroup-of-the-symmetric-group-using-sage/?comment=50740#post-id-50740