How to handle PERMUTATIONobjects |

A routine which builds a quadratic MATRIXobject, the so-called *diagram*
that corresponds to the permutation in question:

- NAME:
*diagramm_permutation* - SYNOPSIS:
*INT diagramm_permutation(OP perm,mat)* - BUG:
*perm*and*mat*must be different.

- NAME:
*divideddifference* - SYNOPSIS:
*INT divideddifference(OP perm,poly,res)*

- NAME:
*elementarp_permutation* - SYNOPSIS:
*INT elementarp_permutation(OP a,b)* - RETURN: TRUE or FALSE
- BUG:
*a*and*b*must be of kind VECTOR

- NAME:
*fprint_permutation* - SYNOPSIS:
*INT fprint_permutation(FILE *fp, OP a)* - BUG: There is no test whether
*a*and*fp*are valid values, it is recommended to use the general routines*fprint*or*print.*

- NAME:
*lehmercode* - SYNOPSIS:
*INT lehmercode(OP a,b)*

- NAME:
*m_part_perm* - SYNOPSIS:
*INT m_part_perm(OP a,b)*

Here is a routine that allows you to compute the number of inversions of the PERMUTATIONobjectExample:#include "def.h" #include "macro.h" main() { OP a; anfang(); a=callocobject(); scan(PARTITION,a); println(a); m_part_perm(a,a); println(a); freeall(a); ende(); }

- NAME:
*numberof_inversionen* - SYNOPSIS:
*INT numberof_inversionen(OP a,b)* - BUG:
*a*and*b*must be different.

- NAME:
*operate_perm_polynom* - SYNOPSIS:
*INT operate_perm_polynom(OP a,b,c)* - BUG:
*c*must be different from*a*and*b,*the kind of the PERMUTATIONobject*a*must be a VECTORobject.

- NAME:
*operate_perm_vector* - SYNOPSIS:
*INT operate_perm_vector(OP a,b,c)* - BUG:
*c*must be different from*a*and*b,*the kind of the PERMUTATION*a*must be VECTOR.

- NAME:
*perm_matrix* - SYNOPSIS:
*INT perm_matrix(OP a,b)*

Now we are going to describe a routine that allows to generate at random permutations of prescribed degree: IfExample:#include "def.h" #include "macro.h" main() { OP a; anfang(); a=callocobject(); scan(PERMUTATION,a); println(a); perm_matrix(a,a); println(a); freeall(a); ende(); }

- NAME:
*random_permutation* - SYNOPSIS:
*INT random_permutation(OP a,b)* - BUG:
*a*and*b*must be different.

- NAME:
*rz_perm* - SYNOPSIS:
*INT rz_perm(OP perm,erg)* - An EXAMPLE:
*perm = [3,4,6,5,1,2]*will give the VECTOR*[2,1,3,2,5,4,3,5,4],*which is to read from right to left as a product of elementary transpositions.*[3,4,6,5,1,2]=s*_{2}s_{1}s_{3}s_{2}s_{5}s_{4}s_{3}s_{5}s_{4}*=(2,3)(1,2)(3,4)(2,3)(5,6)(4,5)(3,4)(5,6)(4,5).* - BUG:
*perm*and*erg*must be different.

- NAME:
*signum_permutation* - SYNOPSIS:
*INT signum_permutation(OP a,b)* - BUG:
*a*and*b*must be different.

- NAME:
*test_perm* - SYNOPSIS:
*INT test_perm()*

- NAMES:
*t_vperm_zperm, t_VECTOR_ZYKEL**t_zperm_vperm, t_ZYKEL_VECTOR* - SYNOPSES:
*INT t_vperm_zperm(OP a,b)**INT t_zperm_vperm(OP a,b)* - DESCRIPTION:
*a*is a PERMUATION object of the first kind, i.e. VECTOR in t_vperm_zperm, b becomes a PERMUTATION object of the second kind. a and b may be equal. The second names are synonyms.

- NAME:
*vexillaryp* - SYNOPSIS:
*INT vexillaryp(OP perm,part)* - BUG:
*perm*must be of kind VECTOR.*perm*and*part*must be different.

- NAME:
*zykeltyp* - SYNOPSIS:
*INT zykeltyp(OP perm,part)* - BUG:
*perm*must be of kind VECTOR.

The following routine computes the up-down-sequence of a PERMUTATIONExample:#include "def.h" #include "macro.h" main() { OP a; anfang(); a=callocobject(); scan(INTEGER,a); println(a); random_permutation(a,a); println(a); zykeltyp(a,a); println(a); freeall(a); ende(); }

- NAME:
*UD_permutation* - SYNOPSIS:
*INT UD_permutation(OP perm, vector)* - BUG: This routine works only for the VECTOR representation, and
*perm*and*vector*must be different.

comp() copy() dec() even() einsp() fprint() fprintln() inc() invers() last() lehmercode() length() mult() next() objectread() objectwrite() odd() print() println() scan() tex()

harald.fripertinger@kfunigraz.ac.at,

last changed: November 19, 2001

How to handle PERMUTATIONobjects |