Let $G=SL\_n$ and let $P\_i$ be a maximal parabolic corresponding to a simple root say $\alpha\_i$. Let $W\_{P\_i}$ be the Weyl group of $P\_i$. Is there an efficient way to compute the longest coset representative $w^{max}$ for $wP\_i$ ? How can we go from $w^{min}$ to $w^{max}$ ? It seems there is a command to find the minimal representative in Macaulay-2 but not for the maximal one.



Maximal Coset representative for the Weyl group of a Parabolic
The Weyl group is the symmetric group $S\_n$. The Weyl group of $P\_i$ is $S\_i\times S\_{n-i}$ acting on the right. Let
$$
w=(a\_1,\ldots,a\_i,a\_{i+1},\ldots,a\_n)\in S\_n
$$
Then $w^{min}$ (or $w^{max}$) is obtained by bringing the first $i$ and the last $n-i$ entries into an increasing (or decreasing, respectively) order.
So if $i=2$ and $w=(3,1,2,4)$ then $w^{min}=(1,3,2,4)$ and $w^{max}=(3,1,4,2)$.


