home *** CD-ROM | disk | FTP | other *** search
/ Math Solutions 1995 October / Math_Solutions_CD-ROM_Walnut_Creek_October_1995.iso / pc / mac / discrete / doc / permutat.tex < prev    next >
Encoding:
Text File  |  1993-05-05  |  11.7 KB  |  338 lines

  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. %%
  3. %A  permutat.tex                GAP documentation                   Udo Polis
  4. %%
  5. %A  @(#)$Id: permutat.tex,v 3.5 1993/02/09 16:29:11 felsch Exp $
  6. %%
  7. %Y  Copyright 1990-1992,  Lehrstuhl D fuer Mathematik,  RWTH Aachen,  Germany
  8. %%
  9. %%  This file describes those functions that deal with permutation groups
  10. %%
  11. %H  $Log: permutat.tex,v $
  12. %H  Revision 3.5  1993/02/09  16:29:11  felsch
  13. %H  another example adjusted
  14. %H
  15. %H  Revision 3.4  1993/02/01  16:28:08  felsch
  16. %H  example fixed
  17. %H
  18. %H  Revision 3.3  1992/04/07  13:07:55  martin
  19. %H  fixed some more typos
  20. %H
  21. %H  Revision 3.2  1992/03/13  10:44:47  martin
  22. %H  changed two section titles
  23. %H
  24. %H  Revision 3.1  1992/01/15  14:09:18  martin
  25. %H  initial revision under RCS
  26. %H
  27. %%
  28. \Chapter{Permutations}
  29.  
  30. {\GAP} is a system  especially  designed for the computations  in groups.
  31. Permutation groups are a very important class of groups and {\GAP} offers
  32. a data type *permutation* to describe the elements of permutation groups.
  33.  
  34. Permutations  in  {\GAP}  operate on *positive integers*.  Whenever group
  35. elements  operate  on  a domain  we  call  the elements  of  this  domain
  36. *points*.  Thus in this chapter we often  call  positive integers points,
  37. if we want to  emphasize that a permutation operates on them.  An integer
  38. $i$ is said to  be *moved* by a permutation $p$ if the image $i^p$ of $i$
  39. under $p$ is not  $i$.  The largest  integer moved by any permutation may
  40. not be larger  than  $2^{16}$.   This bound, however, is not a  permanent
  41. one.  We are going to remove this restriction as soon as possible.
  42.  
  43. Note that permutations  do  not belong to  a specific group.   That means
  44. that you can work  with permutations without defining a permutation group
  45. that contains them.  This is  just like  it is  with integers, with which
  46. you can compute without caring about the domain 'Integers' that  contains
  47. them.  It also means that you can multiply any two permutations.
  48.  
  49. Permutations are entered and displayed in cycle notation.
  50.  
  51. |    gap> (1,2,3);
  52.     (1,2,3)
  53.     gap> (1,2,3) * (2,3,4);
  54.     (1,3)(2,4) |
  55.  
  56. The  first  sections in  this chapter describe  the  operations that  are
  57. available  for  permutations  (see  "Comparisons  of  Permutations"   and
  58. "Operations for Permutations").  The next section  describes the function
  59. that  tests whether an object is a  permutation (see "IsPerm").  The next
  60. sections describe the functions that find  the largest and smallest point
  61. moved    by    a    permutation    (see    "LargestMovedPointPerm"    and
  62. "SmallestMovedPointPerm").  The next section describes  the function that
  63. computes the  sign of a permutation  (see  "SignPerm").  The next section
  64. describes  the  function that  computes  the  smallest  permutation  that
  65. generates  the  same   cyclic  subgrop   as  a   given  permutation  (see
  66. "SmallestGeneratorPerm").  The final sections describe the functions that
  67. convert  between  lists  and  permutations  (see  "ListPerm", "PermList",
  68. "RestrictedPerm", and "MappingPermListList").
  69.  
  70. Permutations are  elements  of groups operating on positive integers in a
  71. natural way, thus see chapter "Groups"  and chapter "Operations" for more
  72. functions.
  73.  
  74. The external functions are in the file 'LIBNAME/\"permutat.g\"'.
  75.  
  76. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  77. \Section{Comparisons of Permutations}%
  78.  
  79. '<p1> = <p2>' \\
  80. '<p1> \<> <p2>'
  81.  
  82. The  equality operator  '=' evaluates to  'true'  if the two permutations
  83. <p1> and  <p2> are equal,  and  to  'false'  otherwise.   The  inequality
  84. operator '\<>' evaluates to 'true' if the two permutations <p1>  and <p2>
  85. are  not  equal,  and  to  'false'   otherwise.   You  can  also  compare
  86. permutations with objects of other types, of course they are never equal.
  87.  
  88. Two permutations are considered equal  if and  only if they move the same
  89. points and if  the images  of the  moved  points are  the  same under the
  90. operation of both permutations.
  91.  
  92. |    gap> (1,2,3) = (2,3,1);
  93.     true
  94.     gap> (1,2,3) * (2,3,4) = (1,3)(2,4);
  95.     true |
  96.  
  97. '<p1> \<  <p2>' \\
  98. '<p1> \<= <p2>' \\
  99. '<p1>  >  <p2>' \\
  100. '<p1>  >= <p2>'
  101.  
  102. The operators '\<',  '\<=',  '>',  and  '>='  evaluate  to 'true'  if the
  103. permutation <p1> is less  than,  less than or  equal to, greater than, or
  104. greater than or equal to the permutation <p2>, and to 'false' otherwise.
  105.  
  106. Let $p_1$ and $p_2$ be two  permutations that are  not equal.  Then there
  107. exists  at least one point  $i$ such that $i^{p_1} \<> i^{p_2}$.  Let $k$
  108. be the  smallest such point.  Then $p_1$ is considered smaller than $p_2$
  109. if  and only  if $k^{p_1} \<\ k^{p_2}$.   Note that this implies that the
  110. identity permutation is the smallest permutation.
  111.  
  112. You can also compare permutations with objects of other types.  Integers,
  113. rationals, cyclotomics, unknowns, and  finite field  elements are smaller
  114. than permutations.  Everything else is larger.
  115.  
  116. |    gap> (1,2,3) < (1,3,2);
  117.     true    # $1^{(1,2,3)} = 2 \<\ 3 = 1^{(1,3,2)}$
  118.     gap> (1,3,2,4) < (1,3,4,2);
  119.     false    # $2^{(1,3,2,4)} = 4 > 1 = 2^{(1,3,4,2)}$ |
  120.  
  121. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  122. \Section{Operations for Permutations}%
  123.  
  124. '<p1> \*\ <p2>'
  125.  
  126. The operator '\*'  evaluates to the product of the two  permutations <p1>
  127. and <p2>.
  128.  
  129. '<p1> / <p2>'
  130.  
  131. The operator  '/'  evaluates to the quotient $p1 \*  p2^{-1}$  of the two
  132. permutations <p1> and <p2>.
  133.  
  134. 'LeftQuotient( <p1>, <p2> )'
  135.  
  136. 'LeftQuotient' returns  the left  quotient  $p1^{-1}  \* p2$ of  the  two
  137. permutations <p1> and <p2>.  (This can also be written '<p1> mod <p2>'.)
  138.  
  139. '<p> \^\ <i>'
  140.  
  141. The operator '\^' evaluates to the <i>-th power of the permutation <p>.
  142.  
  143. '<p1> \^\ <p2>'
  144.  
  145. The operator '\^' evaluates to the conjugate $p2^{-1} \* p1 \* p2$ of the
  146. permutation <p1> by the permutation <p2>.
  147.  
  148. 'Comm( <p1>, <p2> )'
  149.  
  150. 'Comm' returns the commutator $p1^{-1} \* p2^{-1} \* p1 \* p2$ of the two
  151. permutations <p1> and <p2>.
  152.  
  153. '<i> \^\ <p>'
  154.  
  155. The operator '\^' evaluates to  the image $i^p$  of the  positive integer
  156. <i> under the permutation <p>.
  157.  
  158. '<i> / <p>'
  159.  
  160. The operator  '/' evaluates to  the preimage  $i^{p^{-1}}$ of the integer
  161. <i> under the permutation <p>.
  162.  
  163.  
  164. '<list> \*\ <p>' \\
  165. '<p> \*\ <list>'
  166.  
  167. The operator '\*' evaluates  to the  list of products of the permutations
  168. in <list> with  the permutation <p>.  That  means that the value is a new
  169. list <new>  such that  '<new>[<i>] = <list>[<i>]  \*\  <p>'  respectively
  170. '<new>[<i>] = <p> \*\ <list>[<i>]'.
  171.  
  172. '<list> / <p>'
  173.  
  174. The operator '/' evaluates to the list  of  quotients of the permutations
  175. in <list> with  the permutation  <p>.  That means that the value is a new
  176. list <new> such that '<new>[<i>] = <list>[<i>] / <p>'.
  177.  
  178. For the precedence of the operators see "Operations".
  179.  
  180. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  181. \Section{IsPerm}
  182.  
  183. 'IsPerm( <obj> )'
  184.  
  185. 'IsPerm' returns 'true'  if  <obj>, which may be  an  object of arbitrary
  186. type, is a permutation and 'false' otherwise.  It will signal an error if
  187. <obj> is an unbound variable.
  188.  
  189. |    gap> IsPerm( (1,2) );
  190.     true
  191.     gap> IsPerm( 1 );
  192.     false |
  193.  
  194. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  195. \Section{LargestMovedPointPerm}
  196.  
  197. 'LargestMovedPointPerm( <perm> )'
  198.  
  199. 'LargestMoverPointPerm'   returns  the   largest  point   moved   by  the
  200. permutation  <perm>, i.e.,  the  largest  positive  integer <i> such that
  201. '<i>\^<perm>  \<>  <i>'.   It will  signal an error  if <perm> is trivial
  202. (see also "SmallestMovedPointPerm").
  203.  
  204. |    gap> LargestMovedPointPerm( (2,3,1) );
  205.     3
  206.     gap> LargestMovedPointPerm( (1,2)(1000,1001) );
  207.     1001 |
  208.  
  209. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  210. \Section{SmallestMovedPointPerm}
  211.  
  212. 'SmallestMovedPointPerm( <perm> )'
  213.  
  214. 'SmallestMovedPointPerm'  returns  the  smallest   point  moved  by   the
  215. permutation <perm>,  i.e., the  smallest  positive integer  <i> such that
  216. '<i>\^<perm> \<>  <i>'.   It will signal  an error if  <perm>  is trivial
  217. (see also "LargestMovedPointPerm").
  218.  
  219. |    gap> SmallestMovedPointPerm( (4,7,5) );
  220.     4 |
  221.  
  222. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  223. \Section{SignPerm}
  224.  
  225. 'SignPerm( <perm> )'
  226.  
  227. 'SignPerm' returns the *sign* of the permutation <perm>.
  228.  
  229. The sign $s$ of a permutation $p$ is defined by
  230. $s = \prod_{i \< j}{(i^p - j^p)} / \prod_{i \< j}{(i - j)}$,
  231. where $n$ is the largest point moved by $p$ and $i,j$ range over $1...n$.
  232.  
  233. One can easily show that *sign* is equivalent to the *determinant* of the
  234. *permutation  matrix* of <perm>.  Thus  it   is obvious that the function
  235. *sign* is a homomorphism.
  236.  
  237. |    gap> SignPerm( (1,2,3)(5,6) );
  238.     -1 |
  239.  
  240. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  241. \Section{SmallestGeneratorPerm}
  242.  
  243. 'SmallestGeneratorPerm( <perm> )'
  244.  
  245. 'SmallestGeneratorPerm' returns  the smallest permutation that  generates
  246. the same cyclic group as the permutation <perm>.
  247.  
  248. |    gap> SmallestGeneratorPerm( (1,4,3,2) );
  249.     (1,2,3,4) |
  250.  
  251. Note that 'SmallestGeneratorPerm' is very efficient, even when <perm> has
  252. huge order.
  253.  
  254. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  255. \Section{ListPerm}
  256.  
  257. 'ListPerm( <perm> )'
  258.  
  259. 'ListPerm' returns a list <list> that contains the images of the positive
  260. integers  under the permutation <perm>.   That means  that '<list>[<i>] =
  261. <i>\^<perm>',  where  <i> lies between 1 and  the largest  point moved by
  262. <perm> (see "LargestMovedPointPerm").
  263.  
  264. |    gap> ListPerm( (1,2,3,4) );
  265.     [ 2, 3, 4, 1 ]
  266.     gap> ListPerm( () );
  267.     [  ] |
  268.  
  269. 'PermList' (see "PermList") performs the inverse operation.
  270.  
  271. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  272. \Section{PermList}
  273.  
  274. 'PermList( <list> )'
  275.  
  276. 'PermList' returns the permutation <perm> that moves  points as describes
  277. by the list  <list>.  That  means that '<i>\^<perm> = <list>[<i>]' if <i>
  278. lies between 1 and the length of <list>, and  '<i>\^<perm> = <i>' if  <i>
  279. is larger than the length of the list <list>.  It will signal an error if
  280. <list> does not define a permutation,  i.e.,  if <list> is not a list  of
  281. integers without holes,  or if <list>  contains  an integer  twice, or if
  282. <list> contains an integer not in the range '[1..Length(<list>)]'.
  283.  
  284. |    gap> PermList( [6,2,4,1,5,3] );
  285.     (1,6,3,4)
  286.     gap> PermList( [] );
  287.     () |
  288.  
  289. 'ListPerm' (see "ListPerm") performs the inverse operation.
  290.  
  291. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  292. \Section{RestrictedPerm}
  293.  
  294. 'RestrictedPerm( <perm>, <list> )'
  295.  
  296. 'RestrictedPerm'  returns the new permutation <new> that  operates on the
  297. points  in the list <list> in the same way as the permutation <perm>, and
  298. that fixes those points that are not in <list>.  <list> must be a list of
  299. positive  integers  such  that  for  each   <i>  in  <list>   the   image
  300. '<i>\^<perm>' is also in <list>, i.e., it must be  the union of cycles of
  301. <perm>.
  302.  
  303. |    gap> RestrictedPerm( (1,2,3)(4,5), [4,5] );
  304.     (4,5) |
  305.  
  306. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  307. \Section{MappingPermListList}
  308.  
  309. 'MappingPermListList( <list1>, <list2> )'
  310.  
  311. 'MappingPermListList'   returns   a   permutation   <perm>    such   that
  312. '<list1>[<i>] \^\ <perm> = <list2>[<i>]'.  <perm> fixes all points larger
  313. then the  maximum  of the  entries in <list1> and <list2>.  If there  are
  314. several    such    permutations,    it    is    not    specified    which
  315. 'MappingPermListList' returns.  <list1>  and  <list2>  must  be lists  of
  316. positive integers  of the same length, and neither may contain an element
  317. twice.
  318.  
  319. |    gap> MappingPermListList( [3,4], [6,9] );
  320.     (3,6,4,9,8,7,5)
  321.     gap> MappingPermListList( [], [] );
  322.     () |
  323.  
  324. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  325. %%
  326. %E  Emacs . . . . . . . . . . . . . . . . . . . . . local Emacs variables
  327. %%
  328. %%  Local Variables:
  329. %%  mode:               outline
  330. %%  outline-regexp:     "\\\\Chapter\\|\\\\Section"
  331. %%  fill-column:        73
  332. %%  eval:               (hide-body)
  333. %%  End:
  334. %%
  335.  
  336.  
  337.  
  338.