How to find the longest word in a subgroup of the symmetric group using Sage?
Let Sn be the symmetric group over {1,2,…,n}. Let J be a subset of {1,…,n−1} and let WJ be the subgroup of Sn generated by sj,j∈J⊂{1,…,n−1}, where sj's are simple reflections. How to find the longest word in WJ in Sage? The following is some codes.
W = SymmetricGroup(8)
[s1,s2,s3,s4,s5,s6,s7] = W.simple_reflections()
Thank you very much.
Something like the following...?!
@lijr07 could you please provide a definition of longest word ?