Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
| Download
GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
Project: cocalc-sagemath-dev-slelievre
Views: 418346<?xml version="1.0" encoding="UTF-8"?>12<!-- $Id: basics.xml,v 0.998 Exp $ -->3<Chapter>4<Heading>Basics</Heading>5We give some examples of semigroups to be used later. We also describe some basic functions6that are not directly available from <Package>GAP</Package>, but are useful7for the purposes of this package.8<Section>9<Heading>Examples </Heading>These are some examples of semigroups that will be used through this manual10<Example><![CDATA[11gap> f := FreeMonoid("a","b");12<free monoid on the generators [ a, b ]>13gap> a := GeneratorsOfMonoid( f )[ 1 ];;14gap> b := GeneratorsOfMonoid( f )[ 2 ];;15gap> r:=[[a^3,a^2],16> [a^2*b,a^2],17> [b*a^2,a^2],18> [b^2,a^2],19> [a*b*a,a],20> [b*a*b,b] ];21[ [ a^3, a^2 ], [ a^2*b, a^2 ], [ b*a^2, a^2 ], [ b^2, a^2 ], [ a*b*a, a ],22[ b*a*b, b ] ]23gap> b21:= f/r;24<fp monoid on the generators [ a, b ]>25]]></Example>2627<Example><![CDATA[28gap> g0:=Transformation([4,1,2,4]);;29gap> g1:=Transformation([1,3,4,4]);;30gap> g2:=Transformation([2,4,3,4]);;31gap> poi3:= Monoid(g0,g1,g2);32<monoid with 3 generators>33]]></Example>3435</Section>3637<Section>38<Heading>Some attributes</Heading>39These functions are semigroup attributes that get stored once computed.40<ManSection>41<Attr Arg="M" Name="HasCommutingIdempotents" />42<Description>Tests whether the idempotents of the semigroup43<Arg>M </Arg>commute. </Description>44</ManSection>45<ManSection>46<Attr Arg="S" Name="IsInverseSemigroup" />47<Description>Tests whether a finite semigroup48<Arg>S </Arg>is inverse. It is well-known that it suffices to test whether the idempotents of49<Arg>S </Arg>commute and50<Arg>S </Arg>is regular. The function51<Code>IsRegularSemigroup </Code>is part of52<Package>GAP</Package>. </Description>53</ManSection>54</Section>5556<Section>57<Heading>Some basic functions</Heading>58<ManSection>59<Func Arg="L" Name="PartialTransformation" />60<Description>A partial transformation is a partial function of a set of integers of61the form <M>\{1,\dots, n\}</M>. It is given by means of the list of images <Arg>L</Arg>. When62an element has no image, we write 0.63Returns a full transformation on a set with one more element that acts like64a zero.</Description>65</ManSection>6667<Example><![CDATA[68gap> PartialTransformation([2,0,4,0]);69Transformation( [ 2, 5, 4, 5, 5 ] )70]]></Example>7172<ManSection>73<Func Arg="L" Name="ReduceNumberOfGenerators" />74<Description>Given a subset <Arg>L</Arg> of the generators75of a semigroup, returns a list of generators of the same semigroup but76possibly with less elements than <Arg>L</Arg>.</Description>77</ManSection>787980<ManSection>81<Func Arg="S,L" Name="SemigroupFactorization" />82<Description><Arg>L</Arg> is an element (or list of elements) of the semigroup <Arg>S</Arg>.83Returns a minimal factorization on the generators of <Arg>S</Arg> of the84element(s) of <Arg>L</Arg>. Works only for transformation semigroups.</Description>85</ManSection>86<Example><![CDATA[87gap> el1 := Transformation( [ 2, 3, 4, 4 ] );;88gap> el2 := Transformation( [ 2, 4, 3, 4 ] );;89gap> f1 := SemigroupFactorization(poi3,el1);90[ [ Transformation( [ 1, 3, 4, 4 ] ), Transformation( [ 2, 4, 3, 4 ] ) ] ]91gap> f1[1][1] * f1[1][2] = el1;92true93gap> SemigroupFactorization(poi3,[el1,el2]);94[ [ Transformation( [ 1, 3, 4, 4 ] ), Transformation( [ 2, 4, 3, 4 ] ) ],95[ Transformation( [ 2, 4, 3, 4 ] ) ] ]96]]></Example>979899100<ManSection>101<Func Arg="mat" Name="GrahamBlocks" />102<Description><Arg>mat</Arg> is a matrix as displayed by103<C>DisplayEggBoxOfDClass(D);</C> of a regular D-class <C>D</C>.104This function outputs a list <C>[gmat, phi]</C> where <C>gmat</C> is105<Arg>mat</Arg> in Graham's blocks form and <C>phi</C> maps H-classes106of <C>gmat</C> to the corresponding ones of <Arg>mat</Arg>, i.e.,107<C>phi[i][j] = [i',j']</C> where <C>mat[i'][j'] = gmat[i][j]</C>.108If the argument to this function is not a matrix corresponding to109a regular D-class, the function may abort in error.110</Description>111</ManSection>112<Example><![CDATA[113gap> p1 := PartialTransformation([6,2,0,0,2,6,0,0,10,10,0,0]);;114gap> p2 := PartialTransformation([0,0,1,5,0,0,5,9,0,0,9,1]);;115gap> p3 := PartialTransformation([0,0,3,3,0,0,7,7,0,0,11,11]);;116gap> p4 := PartialTransformation([4,4,0,0,8,8,0,0,12,12,0,0]);;117gap> css3:=Semigroup(p1,p2,p3,p4);118<transformation semigroup of degree 13 with 4 generators>119gap> el := Elements(css3)[8];;120gap> D := GreensDClassOfElement(css3, el);;121gap> IsRegularDClass(D);122true123gap> DisplayEggBoxOfDClass(D);124[ [ 1, 1, 0, 0 ],125[ 1, 1, 0, 0 ],126[ 0, 0, 1, 1 ],127[ 0, 0, 1, 1 ] ]128gap> mat := [ [ 1, 0, 1, 0 ],129> [ 0, 1, 0, 1 ],130> [ 0, 1, 0, 1 ],131> [ 1, 0, 1, 0 ] ];;132gap> res := GrahamBlocks(mat);;133gap> PrintArray(res[1]);134[ [ 1, 1, 0, 0 ],135[ 1, 1, 0, 0 ],136[ 0, 0, 1, 1 ],137[ 0, 0, 1, 1 ] ]138gap> PrintArray(res[2]);139[ [ [ 1, 1 ], [ 1, 3 ], [ 1, 2 ], [ 1, 4 ] ],140[ [ 4, 1 ], [ 4, 3 ], [ 4, 2 ], [ 4, 4 ] ],141[ [ 2, 1 ], [ 2, 3 ], [ 2, 2 ], [ 2, 4 ] ],142[ [ 3, 1 ], [ 3, 3 ], [ 3, 2 ], [ 3, 4 ] ] ]143]]></Example>144<!--145<Example><![CDATA[146]]</Example>147-->148</Section>149150<Section>151<Heading>Cayley graphs</Heading>152<ManSection>153<Func Arg="S" Name="RightCayleyGraphAsAutomaton"></Func>154<Description>Computes the right Cayley graph of a finite monoid or semigroup <Arg>S</Arg>. It uses the155<Package>GAP</Package>156buit-in function <Code>CayleyGraphSemigroup</Code> to compute the Cayley Graph157and returns it as an automaton without initial nor final states.158(In this automaton state <C>i</C> represents the element <C>Elements(S)[i]</C>.)159The <Package>Automata</Package> package is used to this effect.160</Description>161</ManSection>162163<Example><![CDATA[164gap> rcg := RightCayleyGraphAsAutomaton(b21);165< deterministic automaton on 2 letters with 6 states >166gap> Display(rcg);167| 1 2 3 4 5 6168-----------------------169a | 2 4 6 4 2 4170b | 3 5 4 4 4 3171Initial state: [ ]172Accepting state: [ ]173]]></Example>174175<ManSection>176<Func Arg="S" Name="RightCayleyGraphMonoidAsAutomaton" />177<Description>This function is a synonym of178<Ref Func="RightCayleyGraphAsAutomaton"/>.179</Description>180</ManSection>181182183184</Section>185186</Chapter>187188189