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

\begin{Mhelppage}{Rd2Perm}{V. Prosper}

  \begin{MInfo}
    \eng{calculates a permutation from a decomposition}
  \end{MInfo}
  
  \begin{MCalls}
    \Mcall{rd\Mopt{,n}}
  \end{MCalls}

  \begin{MParameters}
    \param{rd}
    \eng{any list denoting a decomposition}
    \param{n}
    \eng{degree of a symmetric group (positive integer)} 
  \end{MParameters}

  \begin{MIntro}
    \eng{The {\Mthis} function calculates the permutation
      corresponding to the list \Mex{rd}, the entries of \Mpar{rd}
      being interpreted as simple transpositions.  Let
      \Mmath{\Mex{rd}=[i,j,k,...]}{\mathtt{rd}=[i,j,k,\ldots]}, then
      \Mex{\Mthis(rd)}=
      \Mmath{\Mex{MultPerm}(si, sj, sk, ...)}%
      {\mathtt{MultPerm}(s_i,s_j,s_k,\ldots)}  where
      \Mmath{si}{s_i} stands for
      \Mmath{\Mex{SgTranspo}(i, n)}{\mathtt{SgTranspo(i,n)}}.
 
      When the second argument is not present, \Mex{n} is the smallest
      possible degree.
      
      The decomposition needs not to be reduced.  }
  \end{MIntro}

\begin{MExample}{ex1}
\begin{Mexin}
muEC::SG::Rd2Perm( [1,2,1], 5 );
\end{Mexin}
\begin{Mexout}
                        [3, 2, 1, 4, 5]
\end{Mexout}
\begin{Mexin}
muEC::SG::Rd2Perm( [1,2,1] );
\end{Mexin}
\begin{Mexout}
                           [3, 2, 1]
\end{Mexout}
\end{MExample}

\MRelatedFunctions{Perm2Rd}
\end{Mhelppage}
