<?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 (SgpViz) - Chapter 2: Basics</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="chapBib.html">Bib</a> <a href="chapInd.html">Ind</a> </div> <div class="chlinkprevnexttop"> <a href="chap0.html">Top of Book</a> <a href="chap1.html">Previous Chapter</a> <a href="chap3.html">Next Chapter</a> </div> <p><a id="X868F7BAB7AC2EEBC" name="X868F7BAB7AC2EEBC"></a></p> <div class="ChapSects"><a href="chap2.html#X868F7BAB7AC2EEBC">2 <span class="Heading">Basics</span></a> <div class="ContSect"><span class="nocss"> </span><a href="chap2.html#X7A489A5D79DA9E5C">2.1 <span class="Heading">Examples </span></a> </div> <div class="ContSect"><span class="nocss"> </span><a href="chap2.html#X85134313846D1A8A">2.2 <span class="Heading">Some attributes</span></a> <span class="ContSS"><br /><span class="nocss"> </span><a href="chap2.html#X7F7FAED380682973">2.2-1 HasCommutingIdempotents</a></span> <span class="ContSS"><br /><span class="nocss"> </span><a href="chap2.html#X83F1529479D56665">2.2-2 IsInverseSemigroup</a></span> </div> <div class="ContSect"><span class="nocss"> </span><a href="chap2.html#X78CA2A0D869C51DC">2.3 <span class="Heading">Some basic functions</span></a> <span class="ContSS"><br /><span class="nocss"> </span><a href="chap2.html#X7A65787A83C0F8EF">2.3-1 PartialTransformation</a></span> <span class="ContSS"><br /><span class="nocss"> </span><a href="chap2.html#X7EEED52C7D38E1CA">2.3-2 ReduceNumberOfGenerators</a></span> <span class="ContSS"><br /><span class="nocss"> </span><a href="chap2.html#X7BBEBEE885D05208">2.3-3 SemigroupFactorization</a></span> <span class="ContSS"><br /><span class="nocss"> </span><a href="chap2.html#X7FB7633483A45209">2.3-4 GrahamBlocks</a></span> </div> <div class="ContSect"><span class="nocss"> </span><a href="chap2.html#X789D5E5A8558AA07">2.4 <span class="Heading">Cayley graphs</span></a> <span class="ContSS"><br /><span class="nocss"> </span><a href="chap2.html#X822983CD7F01B5EA">2.4-1 RightCayleyGraphAsAutomaton</a></span> <span class="ContSS"><br /><span class="nocss"> </span><a href="chap2.html#X82F7D3E485D615D8">2.4-2 RightCayleyGraphMonoidAsAutomaton</a></span> </div> </div> <h3>2 <span class="Heading">Basics</span></h3> <p>We give some examples of semigroups to be used later. We also describe some basic functions that are not directly available from <strong class="pkg">GAP</strong>, but are useful for the purposes of this package.</p> <p><a id="X7A489A5D79DA9E5C" name="X7A489A5D79DA9E5C"></a></p> <h4>2.1 <span class="Heading">Examples </span></h4> <p>These are some examples of semigroups that will be used through this manual</p> <table class="example"> <tr><td><pre> gap> f := FreeMonoid("a","b"); <free monoid on the generators [ a, b ]> gap> a := GeneratorsOfMonoid( f )[ 1 ];; gap> b := GeneratorsOfMonoid( f )[ 2 ];; gap> r:=[[a^3,a^2], > [a^2*b,a^2], > [b*a^2,a^2], > [b^2,a^2], > [a*b*a,a], > [b*a*b,b] ]; [ [ a^3, a^2 ], [ a^2*b, a^2 ], [ b*a^2, a^2 ], [ b^2, a^2 ], [ a*b*a, a ], [ b*a*b, b ] ] gap> b21:= f/r; <fp semigroup on the generators [<identity ... >, a, b ]> </pre></td></tr></table> <table class="example"> <tr><td><pre> gap> f := FreeSemigroup("a","b"); <free semigroup on the generators [ a, b ]> gap> a := GeneratorsOfSemigroup( f )[ 1 ];; gap> b := GeneratorsOfSemigroup( f )[ 2 ];; gap> r:=[[a^3,a^2], > [a^2*b,a^2], > [b*a^2,a^2], > [b^2,a^2], > [a*b*a,a], > [b*a*b,b] ]; [ [ a^3, a^2 ], [ a^2*b, a^2 ], [ b*a^2, a^2 ], [ b^2, a^2 ], [ a*b*a, a ], [ b*a*b, b ] ] gap> b2:= f/r; <fp semigroup on the generators [ a, b ]> </pre></td></tr></table> <table class="example"> <tr><td><pre> gap> g0:=Transformation([4,1,2,4]);; gap> g1:=Transformation([1,3,4,4]);; gap> g2:=Transformation([2,4,3,4]);; gap> poi3:= Monoid(g0,g1,g2); <monoid with 3 generators> </pre></td></tr></table> <p><a id="X85134313846D1A8A" name="X85134313846D1A8A"></a></p> <h4>2.2 <span class="Heading">Some attributes</span></h4> <p>These functions are semigroup attributes that get stored once computed.</p> <p><a id="X7F7FAED380682973" name="X7F7FAED380682973"></a></p> <h5>2.2-1 HasCommutingIdempotents</h5> <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">> HasCommutingIdempotents</code>( <var class="Arg">M</var> )</td><td class="tdright">( attribute )</td></tr></table></div> <p>Tests whether the idempotents of the semigroup <var class="Arg">M </var>commute.</p> <p><a id="X83F1529479D56665" name="X83F1529479D56665"></a></p> <h5>2.2-2 IsInverseSemigroup</h5> <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">> IsInverseSemigroup</code>( <var class="Arg">S</var> )</td><td class="tdright">( attribute )</td></tr></table></div> <p>Tests whether a finite semigroup <var class="Arg">S </var>is inverse. It is well-known that it suffices to test whether the idempotents of <var class="Arg">S </var>commute and <var class="Arg">S </var>is regular. The function <code class="code">IsRegularSemigroup </code>is part of <strong class="pkg">GAP</strong>.</p> <p><a id="X78CA2A0D869C51DC" name="X78CA2A0D869C51DC"></a></p> <h4>2.3 <span class="Heading">Some basic functions</span></h4> <p><a id="X7A65787A83C0F8EF" name="X7A65787A83C0F8EF"></a></p> <h5>2.3-1 PartialTransformation</h5> <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">> PartialTransformation</code>( <var class="Arg">L</var> )</td><td class="tdright">( function )</td></tr></table></div> <p>A partial transformation is a partial function of a set of integers of the form {1, ..., n}. It is given by means of the list of images <var class="Arg">L</var>. When an element has no image, we write 0. Returns a full transformation on a set with one more element that acts like a zero.</p> <table class="example"> <tr><td><pre> gap> PartialTransformation([2,0,4,0]); Transformation( [ 2, 5, 4, 5, 5 ] ) </pre></td></tr></table> <p><a id="X7EEED52C7D38E1CA" name="X7EEED52C7D38E1CA"></a></p> <h5>2.3-2 ReduceNumberOfGenerators</h5> <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">> ReduceNumberOfGenerators</code>( <var class="Arg">L</var> )</td><td class="tdright">( function )</td></tr></table></div> <p>Given a subset <var class="Arg">L</var> of the generators of a semigroup, returns a list of generators of the same semigroup but possibly with less elements than <var class="Arg">L</var>.</p> <p><a id="X7BBEBEE885D05208" name="X7BBEBEE885D05208"></a></p> <h5>2.3-3 SemigroupFactorization</h5> <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">> SemigroupFactorization</code>( <var class="Arg">SL</var> )</td><td class="tdright">( function )</td></tr></table></div> <p><var class="Arg">L</var> is an element (or list of elements) of the semigroup <var class="Arg">S</var>. Returns a minimal factorization on the generators of <var class="Arg">S</var> of the element(s) of <var class="Arg">L</var>. Works only for transformation semigroups.</p> <table class="example"> <tr><td><pre> gap> el1 := Transformation( [ 2, 3, 4, 4 ] );; gap> el2 := Transformation( [ 2, 4, 3, 4 ] );; gap> f1 := SemigroupFactorization(poi3,el1); [ [ Transformation( [ 1, 3, 4, 4 ] ), Transformation( [ 2, 4, 3, 4 ] ) ] ] gap> f1[1][1] * f1[1][2] = el1; true gap> SemigroupFactorization(poi3,[el1,el2]); [ [ Transformation( [ 1, 3, 4, 4 ] ), Transformation( [ 2, 4, 3, 4 ] ) ], [ Transformation( [ 2, 4, 3, 4 ] ) ] ] </pre></td></tr></table> <p><a id="X7FB7633483A45209" name="X7FB7633483A45209"></a></p> <h5>2.3-4 GrahamBlocks</h5> <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">> GrahamBlocks</code>( <var class="Arg">mat</var> )</td><td class="tdright">( function )</td></tr></table></div> <p><var class="Arg">mat</var> is a matrix as displayed by <code class="code">DisplayEggBoxOfDClass(D);</code> of a regular D-class <code class="code">D</code>. This function outputs a list <code class="code">[gmat, phi]</code> where <code class="code">gmat</code> is <var class="Arg">mat</var> in Graham's blocks form and <code class="code">phi</code> maps H-classes of <code class="code">gmat</code> to the corresponding ones of <var class="Arg">mat</var>, i.e., <code class="code">phi[i][j] = [i',j']</code> where <code class="code">mat[i'][j'] = gmat[i][j]</code>. If the argument to this function is not a matrix corresponding to a regular D-class, the function may abort in error.</p> <table class="example"> <tr><td><pre> gap> p1 := PartialTransformation([6,2,0,0,2,6,0,0,10,10,0,0]);; gap> p2 := PartialTransformation([0,0,1,5,0,0,5,9,0,0,9,1]);; gap> p3 := PartialTransformation([0,0,3,3,0,0,7,7,0,0,11,11]);; gap> p4 := PartialTransformation([4,4,0,0,8,8,0,0,12,12,0,0]);; gap> css3:=Semigroup(p1,p2,p3,p4); <semigroup with 4 generators> gap> el := Elements(css3)[8];; gap> D := GreensDClassOfElement(css3, el);; gap> IsRegularDClass(D); true gap> DisplayEggBoxOfDClass(D); [ [ 1, 0, 1, 0 ], [ 0, 1, 0, 1 ], [ 0, 1, 0, 1 ], [ 1, 0, 1, 0 ] ] gap> mat := [ [ 1, 0, 1, 0 ], > [ 0, 1, 0, 1 ], > [ 0, 1, 0, 1 ], > [ 1, 0, 1, 0 ] ];; gap> res := GrahamBlocks(mat);; gap> PrintArray(res[1]); [ [ 1, 1, 0, 0 ], [ 1, 1, 0, 0 ], [ 0, 0, 1, 1 ], [ 0, 0, 1, 1 ] ] gap> PrintArray(res[2]); [ [ [ 1, 1 ], [ 1, 3 ], [ 1, 2 ], [ 1, 4 ] ], [ [ 4, 1 ], [ 4, 3 ], [ 4, 2 ], [ 4, 4 ] ], [ [ 2, 1 ], [ 2, 3 ], [ 2, 2 ], [ 2, 4 ] ], [ [ 3, 1 ], [ 3, 3 ], [ 3, 2 ], [ 3, 4 ] ] ] </pre></td></tr></table> <p><a id="X789D5E5A8558AA07" name="X789D5E5A8558AA07"></a></p> <h4>2.4 <span class="Heading">Cayley graphs</span></h4> <p><a id="X822983CD7F01B5EA" name="X822983CD7F01B5EA"></a></p> <h5>2.4-1 RightCayleyGraphAsAutomaton</h5> <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">> RightCayleyGraphAsAutomaton</code>( <var class="Arg">S</var> )</td><td class="tdright">( function )</td></tr></table></div> <p>Computes the right Cayley graph of a finite monoid or semigroup <var class="Arg">S</var>. It uses the <strong class="pkg">GAP</strong> buit-in function <code class="code">CayleyGraphSemigroup</code> to compute the Cayley Graph and returns it as an automaton without initial nor final states. (In this automaton state <code class="code">i</code> represents the element <code class="code">Elements(S)[i]</code>.) The <strong class="pkg">Automata</strong> package is used to this effect.</p> <table class="example"> <tr><td><pre> gap> rcg := RightCayleyGraphAsAutomaton(b21); < deterministic automaton on 2 letters with 6 states > gap> Display(rcg); | 1 2 3 4 5 6 ----------------------- a | 2 4 6 4 2 4 b | 3 5 4 4 4 3 Initial state: [ ] Accepting state: [ ] </pre></td></tr></table> <p><a id="X82F7D3E485D615D8" name="X82F7D3E485D615D8"></a></p> <h5>2.4-2 RightCayleyGraphMonoidAsAutomaton</h5> <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">> RightCayleyGraphMonoidAsAutomaton</code>( <var class="Arg">S</var> )</td><td class="tdright">( function )</td></tr></table></div> <p>This function is a synonym of <code class="func">RightCayleyGraphAsAutomaton</code> (<a href="chap2.html#X822983CD7F01B5EA"><b>2.4-1</b></a>).</p> <div class="chlinkprevnextbot"> <a href="chap0.html">Top of Book</a> <a href="chap1.html">Previous Chapter</a> <a href="chap3.html">Next Chapter</a> </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="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>