% $Date: 2003/09/15 16:37:45 $ $Author: nthiery $ $Revision: 1.1.1.1 $

\begin{Mhelppage}{Perm2Rothe}%
  {V. Prosper}%
  \begin{MInfo}
    \eng{calculates the Rothe diagram of a permutation}
  \end{MInfo}
  

\begin{MCalls}
\Mcall{perm}
\end{MCalls}

\begin{MParameters}
  \param{perm}
  \eng{any list denoting a permutation} 
\end{MParameters}

\begin{MIntro}
  \eng{
The {\Mthis} function calculates  the Rothe diagram of  a  permutation.

The matrix of the \Mex{x}'s is the matrix representing the permutation.

Reading the entries from right to left and top to bottom, one obtains  a
canonical reduced decomposition  of  the  permutation
(\Mmath{i}{i} stands for the simple transposition exchanging \Mmath{i}{i} and
\Mmath{i+1}{i+1}).
}
\end{MIntro}

\begin{MExample}{ex1}
\begin{Mexin}
print( Unquoted, muEC::SG::Perm2Rothe([6,1,4,5,3,2]) );
\end{Mexin}
\begin{Mexout}
                    +-                  -+
                    |  1, 2, 3, 4, 5, x  |
                    |                    |
                    |  x, ., ., ., ., .  |
                    |                    |
                    |  ., 3, 4, x, ., .  |
                    |                    |
                    |  ., 4, 5, ., x, .  |
                    |                    |
                    |  ., 5, x, ., ., .  |
                    |                    |
                    |  ., x, ., ., ., .  |
                    +-                  -+
\end{Mexout}
% \begin{Mexout}[hide]
                           % null()
% \end{Mexout}
\begin{Mexin}
muEC::SG::Perm2Rd( [6,1,4,5,3,2] );
\end{Mexin}
\begin{Mexout}
                [5, 4, 3, 2, 1, 4, 3, 5, 4, 5]
\end{Mexout}
\end{MExample}

\MRelatedFunctions{Perm2Rd}
\end{Mhelppage}
