Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 91213ddcfbe7f54821d42c2d9e091326 > files > 2146

gap-system-packages-4.4.12-5mdv2010.0.i586.rpm

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>GAP (orb) - Chapter 7: Searching in groups and orbits</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="generator" content="GAPDoc2HTML" />
<link rel="stylesheet" type="text/css" href="manual.css" />
</head>
<body>


<div class="chlinktop"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a>  <a href="chap1.html">1</a>  <a href="chap2.html">2</a>  <a href="chap3.html">3</a>  <a href="chap4.html">4</a>  <a href="chap5.html">5</a>  <a href="chap6.html">6</a>  <a href="chap7.html">7</a>  <a href="chap8.html">8</a>  <a href="chap9.html">9</a>  <a href="chap10.html">10</a>  <a href="chapBib.html">Bib</a>  <a href="chapInd.html">Ind</a>  </div>

<div class="chlinkprevnexttop">&nbsp;<a href="chap0.html">Top of Book</a>&nbsp;  &nbsp;<a href="chap6.html">Previous Chapter</a>&nbsp;  &nbsp;<a href="chap8.html">Next Chapter</a>&nbsp;  </div>

<p><a id="X7DF379C283FE23EF" name="X7DF379C283FE23EF"></a></p>
<div class="ChapSects"><a href="chap7.html#X7DF379C283FE23EF">7 <span class="Heading">Searching in groups and orbits</span></a>
<div class="ContSect"><span class="nocss">&nbsp;</span><a href="chap7.html#X85BB0EBC7F0D8329">7.1 <span class="Heading">Searching using orbit enumeration</span></a>
</div>
<div class="ContSect"><span class="nocss">&nbsp;</span><a href="chap7.html#X7F6A0E447E369404">7.2 <span class="Heading">Random searches in groups</span></a>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap7.html#X7971BF5D8099E557">7.2-1 RandomSearcher</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap7.html#X835FBD72853595BE">7.2-2 Search</a></span>
</div>
<div class="ContSect"><span class="nocss">&nbsp;</span><a href="chap7.html#X833CDEF4843DF5C5">7.3 <span class="Heading">The dihedral trick and applications</span></a>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap7.html#X84659F6786852150">7.3-1 FindInvolution</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap7.html#X7FBBCD5C82211934">7.3-2 FindCentralisingElementOfInvolution</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap7.html#X80CEAEAB7EDB57FE">7.3-3 FindInvolutionCentralizer</a></span>
</div>
<div class="ContSect"><span class="nocss">&nbsp;</span><a href="chap7.html#X7DE53BFB7A82324D">7.4 <span class="Heading">Orbit statistics on vector spaces</span></a>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap7.html#X80E95A9D82ADB62D">7.4-1 OrbitStatisticOnVectorSpace</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap7.html#X8124E7F17C95BECB">7.4-2 OrbitStatisticOnVectorSpaceLines</a></span>
</div>
<div class="ContSect"><span class="nocss">&nbsp;</span><a href="chap7.html#X7F051A447E2E8573">7.5 <span class="Heading">Finding generating sets of subgroups</span></a>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap7.html#X80BB35D380A972BB">7.5-1 FindShortGeneratorsOfSubgroup</a></span>
</div>
</div>

<h3>7 <span class="Heading">Searching in groups and orbits</span></h3>

<p><a id="X85BB0EBC7F0D8329" name="X85BB0EBC7F0D8329"></a></p>

<h4>7.1 <span class="Heading">Searching using orbit enumeration</span></h4>

<p>As described in Subsection <a href="chap3.html#X81BF5A087B9E1353"><b>3.1-4</b></a> the standard orbit enumeration routines can perform search operations during orbit enumeration. If one is looking for a shortest word in the generators of a group to express a group element with a certain property, then this natural breadth-first search can be used, for example by letting the group act on its own elements, either by multiplication or by conjugation.</p>

<p>All technical instructions to do this are already given in Subsection <a href="chap3.html#X81BF5A087B9E1353"><b>3.1-4</b></a>, so we are content to provide an example here. Assume you want to find the shortest way to express some 7-cycle in the symmetric group S_{10} as a product of generators a :=<code class="code">(1,2,3,4,5,6,7,8,9,10)</code> and b :=<code class="code">(1,2)</code>. Then you could do this in the following way:</p>


<table class="example">
<tr><td><pre>gap&gt; gens := [(1,2,3,4,5,6,7,8,9,10),(1,2)];
[ (1,2,3,4,5,6,7,8,9,10), (1,2) ]
gap&gt; o := Orb(gens,(),OnRight,rec( report := 2000,
&gt; lookingfor := 
&gt; function(o,x) return NrMovedPoints(x) = 7 and Order(x)=7; end,
&gt; schreier := true ));
&lt;open orbit, 1 points with Schreier tree looking for sth.&gt;
gap&gt; Enumerate(o);
&lt;open orbit, 614 points with Schreier tree looking for sth.&gt;
gap&gt; w := TraceSchreierTreeForward(o,PositionOfFound(o));
[ 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2 ]
gap&gt; ActWithWord(o!.gens,w,o!.op,o[1]);                  
(1,10,9,8,7,6,5)
gap&gt; o[PositionOfFound(o)] = ActWithWord(o!.gens,w,o!.op,o[1]);
true
gap&gt; EvaluateWord(o!.gens,w);
(1,10,9,8,7,6,5)</pre></td></tr></table>

<p>The result shows that a^6 * (a* b)^3 is a 7-cycle and that there is no word in a and b with fewer than 12 letters expressing a 7-cycle.</p>

<p>Note that we can go on with the above orbit enumeration to find further words to express 7-cycles.</p>

<p><a id="X7F6A0E447E369404" name="X7F6A0E447E369404"></a></p>

<h4>7.2 <span class="Heading">Random searches in groups</span></h4>

<p>Another possibility to look for elements in a group satisfying certain properties is to look at random elements, usually obtained by doing product replacement (see Section <a href="chap6.html#X7B46C06479401BED"><b>6.2</b></a>). Although this can lead to very long expressions as words in the generators, one can cope with this problem by using the <code class="code">maxdepth</code> option of the product replacer objects, which just reinitialises the product replacement table after a certain number of product replacements has been performed. To organise all this conveniently, there is the concept of "random searcher objects" described here.</p>

<p><a id="X7971BF5D8099E557" name="X7971BF5D8099E557"></a></p>

<h5>7.2-1 RandomSearcher</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; RandomSearcher</code>( <var class="Arg">gens, testfunc[, opt]</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p><b>Returns: </b>a random searcher object</p>

<p><var class="Arg">gens</var> must be a list of group generators, <var class="Arg">testfunc</var> a function taking as argument one group element and returning <code class="keyw">true</code> or <code class="keyw">false</code>. <var class="Arg">opt</var> is an optional options record. For possible options see below.</p>

<p>At first, the random searcher object is just initialised but no random searching is performed. The actual search is triggered by the <code class="func">Search</code> (<a href="chap7.html#X835FBD72853595BE"><b>7.2-2</b></a>) operation (see below). The idea of random searcher objects is that a product replacer object is created and during a search random elements are produced using this product replacer object, and for each group element produced the function <var class="Arg">testfunc</var> is called. If this function returns <code class="keyw">true</code>, the search stops and the group element found is returned.</p>

<p>The following options can be bound in the options record <var class="Arg">opt</var>:</p>


<dl>
<dt><strong class="Mark"><code class="code">exceptions</code></strong></dt>
<dd><p>This component can be a list to initialise the exception list in the random searcher object. Group elements in this list are not considered as successful searches. This list is also used to continue search operations to found more suitable group elements as every group element considered "found" is added to that list before returning it. Thus every element will only be found once.</p>

</dd>
<dt><strong class="Mark"><code class="code">maxdepth</code></strong></dt>
<dd><p>Sets the <code class="code">maxdepth</code> option of the created product replacer object. This limits the length of the expression as product of the generators of the found group elements.</p>

</dd>
<dt><strong class="Mark"><code class="code">addslots</code></strong></dt>
<dd><p>Sets the <code class="code">addslots</code> option of the created product replacer object.</p>

</dd>
<dt><strong class="Mark"><code class="code">scramble</code></strong></dt>
<dd><p>If this component is bound at all, then the created product replacer object is created with options <code class="code">scramble=100</code> and <code class="code">scramblefactor=10</code> (the default values), otherwise the options <code class="code">scramble=0</code> and <code class="code">scramblefactor=0</code> are used, leading to no scrambling at all. See <code class="func">ProductReplacer</code> (<a href="chap6.html#X8290E4C57DE25CD4"><b>6.2-1</b></a>) for details on the product replacement algorithm.</p>

</dd>
</dl>
<p>Note that of course the generators in <var class="Arg">gens</var> may have memory. However, the function <var class="Arg">testfunc</var> is called with the group element with memory stripped off.</p>

<p><a id="X835FBD72853595BE" name="X835FBD72853595BE"></a></p>

<h5>7.2-2 Search</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; Search</code>( <var class="Arg">rs</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p><b>Returns: </b>a group element</p>

<p>Runs the search with the random searcher object <var class="Arg">rs</var> and returns with the first group element found.</p>

<p><a id="X833CDEF4843DF5C5" name="X833CDEF4843DF5C5"></a></p>

<h4>7.3 <span class="Heading">The dihedral trick and applications</span></h4>

<p>With the "dihedral" trick we mean the following: Two involutions a and b in a group always generate a dihedral group. Thus, to find a pseudo-random element in the centraliser of an involution a, we can proceed as follows: Create a pseudo-random element c, then b := a^c is another involution. If then ab has order 2o, we can use (ab)^o. Otherwise, if the order of ab is 2o-1, then (ab)^o * c^{-1} centralises a.</p>

<p>This trick allows to efficiently produce elements in the centraliser of an involution and thus, with high probability, generators for the full centraliser.</p>

<p>There are the following functions:</p>

<p><a id="X84659F6786852150" name="X84659F6786852150"></a></p>

<h5>7.3-1 FindInvolution</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; FindInvolution</code>( <var class="Arg">pr</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><b>Returns: </b>an involution</p>

<p><var class="Arg">pr</var> must be a product replacer object (see Section <a href="chap6.html#X7B46C06479401BED"><b>6.2</b></a>). Searches an involution by finding a random element of even order and powering up. Returns the involution.</p>

<p><a id="X7FBBCD5C82211934" name="X7FBBCD5C82211934"></a></p>

<h5>7.3-2 FindCentralisingElementOfInvolution</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; FindCentralisingElementOfInvolution</code>( <var class="Arg">pr, a</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><b>Returns: </b>a group element</p>

<p><var class="Arg">pr</var> must be a product replacer object (see Section <a href="chap6.html#X7B46C06479401BED"><b>6.2</b></a>). Produces one random element and builds an element the centralises the involution <var class="Arg">a</var> using the dihedral trick described above.</p>

<p><a id="X80CEAEAB7EDB57FE" name="X80CEAEAB7EDB57FE"></a></p>

<h5>7.3-3 FindInvolutionCentralizer</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; FindInvolutionCentralizer</code>( <var class="Arg">pr, a, nr</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><b>Returns: </b>a list of <var class="Arg">nr</var> group elements</p>

<p><var class="Arg">pr</var> must be a product replacer object (see Section <a href="chap6.html#X7B46C06479401BED"><b>6.2</b></a>) and <var class="Arg">a</var> and involution. This function uses <code class="func">FindCentralisingElementOfInvolution</code> (<a href="chap7.html#X7FBBCD5C82211934"><b>7.3-2</b></a>) <var class="Arg">nr</var> times to produce an element centralising the involution <var class="Arg">a</var> and returns the list of results.</p>

<p><a id="X7DE53BFB7A82324D" name="X7DE53BFB7A82324D"></a></p>

<h4>7.4 <span class="Heading">Orbit statistics on vector spaces</span></h4>

<p>The following two functions are tools to get a rough and quick estimate about the average orbit length of a group acting on a vector space.</p>

<p><a id="X80E95A9D82ADB62D" name="X80E95A9D82ADB62D"></a></p>

<h5>7.4-1 OrbitStatisticOnVectorSpace</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; OrbitStatisticOnVectorSpace</code>( <var class="Arg">gens, size, ti</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><b>Returns: </b>nothing</p>

<p><var class="Arg">gens</var> must be a list of matrix group generators and <var class="Arg">size</var> an integer giving the order of the group generated by <var class="Arg">gens</var>. <var class="Arg">ti</var> is an integer specifying the number of seconds to run. This function enumerates orbits of random vectors in the natural space the group is acting on. The average length and some other information is printed on the screen.</p>

<p><a id="X8124E7F17C95BECB" name="X8124E7F17C95BECB"></a></p>

<h5>7.4-2 OrbitStatisticOnVectorSpaceLines</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; OrbitStatisticOnVectorSpaceLines</code>( <var class="Arg">gens, size, ti</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><b>Returns: </b>nothing</p>

<p><var class="Arg">gens</var> must be a list of matrix group generators and <var class="Arg">size</var> an integer giving the order of the group generated by <var class="Arg">gens</var>. <var class="Arg">ti</var> is an integer specifying the number of seconds to run. This function enumerates orbits of random one-dimensional subspaces in the natural space the group is acting on. The average length and some other information is printed on the screen.</p>

<p><a id="X7F051A447E2E8573" name="X7F051A447E2E8573"></a></p>

<h4>7.5 <span class="Heading">Finding generating sets of subgroups</span></h4>

<p>The following function can be used to find generators of a subgroup of a group G, expressed as a straight line program in the generators of G.</p>

<p><a id="X80BB35D380A972BB" name="X80BB35D380A972BB"></a></p>

<h5>7.5-1 FindShortGeneratorsOfSubgroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; FindShortGeneratorsOfSubgroup</code>( <var class="Arg">G, U, membershiptest</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><b>Returns: </b>a record described below</p>

<p>The arguments <var class="Arg">U</var> and <var class="Arg">G</var> must be <strong class="pkg">GAP</strong> group objects with <var class="Arg">U</var> being a subgroup of <var class="Arg">G</var>. The argument <var class="Arg">membershiptest</var> must be a function taking two arguments, namely a group element and a group, that checks, whether the group element lies in the group or not, returning <code class="keyw">true</code> or <code class="keyw">false</code> accordingly. You can usually just use the function <code class="code">\in</code> as third argument.</p>

<p>This function does a breadth-first search to find elements in <var class="Arg">U</var> using the generators of <var class="Arg">G</var>. It then uses calculates the size of the group generated and proceeds in this way, until a generating system for <var class="Arg">U</var> is found in terms of the generators of <var class="Arg">G</var>. Those generators are guaranteed to be shortest words in the generators of <var class="Arg">G</var> lying in <var class="Arg">U</var>.</p>

<p>The function returns a record with two components bound: <code class="code">gens</code> is a list of generators for <var class="Arg">U</var> and <code class="code">slp</code> is a <strong class="pkg">GAP</strong> straight line program expressing exactly those generators in the generators of <var class="Arg">G</var>.</p>

<p>Note that this function only performs satisfactorily when the index of <var class="Arg">U</var> in <var class="Arg">G</var> is not to huge. It also helps if the groups come in a representation in which <strong class="pkg">GAP</strong> can compute efficiently for example as permutation groups.</p>


<div class="chlinkprevnextbot">&nbsp;<a href="chap0.html">Top of Book</a>&nbsp;  &nbsp;<a href="chap6.html">Previous Chapter</a>&nbsp;  &nbsp;<a href="chap8.html">Next Chapter</a>&nbsp;  </div>


<div class="chlinkbot"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a>  <a href="chap1.html">1</a>  <a href="chap2.html">2</a>  <a href="chap3.html">3</a>  <a href="chap4.html">4</a>  <a href="chap5.html">5</a>  <a href="chap6.html">6</a>  <a href="chap7.html">7</a>  <a href="chap8.html">8</a>  <a href="chap9.html">9</a>  <a href="chap10.html">10</a>  <a href="chapBib.html">Bib</a>  <a href="chapInd.html">Ind</a>  </div>

<hr />
<p class="foot">generated by <a href="http://www.math.rwth-aachen.de/~Frank.Luebeck/GAPDoc">GAPDoc2HTML</a></p>
</body>
</html>