CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

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

Views: 418346
1
2
2 Basics
3
4
We give some examples of semigroups to be used later. We also describe some
5
basic functions that are not directly available from GAP, but are useful for
6
the purposes of this package.
7
8
9
2.1 Examples
10
11
These are some examples of semigroups that will be used through this manual
12
13
 Example 
14
gap> f := FreeMonoid("a","b");
15
<free monoid on the generators [ a, b ]>
16
gap> a := GeneratorsOfMonoid( f )[ 1 ];;
17
gap> b := GeneratorsOfMonoid( f )[ 2 ];;
18
gap> r:=[[a^3,a^2],
19
> [a^2*b,a^2],
20
> [b*a^2,a^2],
21
> [b^2,a^2],
22
> [a*b*a,a],
23
> [b*a*b,b] ];
24
[ [ a^3, a^2 ], [ a^2*b, a^2 ], [ b*a^2, a^2 ], [ b^2, a^2 ], [ a*b*a, a ], 
25
 [ b*a*b, b ] ]
26
gap> b21:= f/r;
27
<fp monoid on the generators [ a, b ]>
28
 
29

30
31
 Example 
32
gap> g0:=Transformation([4,1,2,4]);;
33
gap> g1:=Transformation([1,3,4,4]);;
34
gap> g2:=Transformation([2,4,3,4]);;
35
gap> poi3:= Monoid(g0,g1,g2);
36
<monoid with 3 generators>
37
 
38

39
40
41
2.2 Some attributes
42
43
These functions are semigroup attributes that get stored once computed.
44
45
2.2-1 HasCommutingIdempotents
46
47
HasCommutingIdempotents( M )  attribute
48
49
Tests whether the idempotents of the semigroup M commute.
50
51
2.2-2 IsInverseSemigroup
52
53
IsInverseSemigroup( S )  attribute
54
55
Tests whether a finite semigroup S is inverse. It is well-known that it
56
suffices to test whether the idempotents of S commute and S is regular. The
57
function IsRegularSemigroup is part of GAP.
58
59
60
2.3 Some basic functions
61
62
2.3-1 PartialTransformation
63
64
PartialTransformation( L )  function
65
66
A partial transformation is a partial function of a set of integers of the
67
form {1,dots, n}. It is given by means of the list of images L. When an
68
element has no image, we write 0. Returns a full transformation on a set
69
with one more element that acts like a zero.
70
71
 Example 
72
gap> PartialTransformation([2,0,4,0]);
73
Transformation( [ 2, 5, 4, 5, 5 ] )
74
 
75

76
77
2.3-2 ReduceNumberOfGenerators
78
79
ReduceNumberOfGenerators( L )  function
80
81
Given a subset L of the generators of a semigroup, returns a list of
82
generators of the same semigroup but possibly with less elements than L.
83
84
2.3-3 SemigroupFactorization
85
86
SemigroupFactorization( S, L )  function
87
88
L is an element (or list of elements) of the semigroup S. Returns a minimal
89
factorization on the generators of S of the element(s) of L. Works only for
90
transformation semigroups.
91
92
 Example 
93
gap> el1 := Transformation( [ 2, 3, 4, 4 ] );;
94
gap> el2 := Transformation( [ 2, 4, 3, 4 ] );;
95
gap> f1 := SemigroupFactorization(poi3,el1);
96
[ [ Transformation( [ 1, 3, 4, 4 ] ), Transformation( [ 2, 4, 3, 4 ] ) ] ]
97
gap> f1[1][1] * f1[1][2] = el1;
98
true
99
gap> SemigroupFactorization(poi3,[el1,el2]);
100
[ [ Transformation( [ 1, 3, 4, 4 ] ), Transformation( [ 2, 4, 3, 4 ] ) ],
101
 [ Transformation( [ 2, 4, 3, 4 ] ) ] ]
102

103
104
2.3-4 GrahamBlocks
105
106
GrahamBlocks( mat )  function
107
108
mat is a matrix as displayed by DisplayEggBoxOfDClass(D); of a regular
109
D-class D. This function outputs a list [gmat, phi] where gmat is mat in
110
Graham's blocks form and phi maps H-classes of gmat to the corresponding
111
ones of mat, i.e., phi[i][j] = [i',j'] where mat[i'][j'] = gmat[i][j]. If
112
the argument to this function is not a matrix corresponding to a regular
113
D-class, the function may abort in error.
114
115
 Example 
116
gap> p1 := PartialTransformation([6,2,0,0,2,6,0,0,10,10,0,0]);;
117
gap> p2 := PartialTransformation([0,0,1,5,0,0,5,9,0,0,9,1]);;
118
gap> p3 := PartialTransformation([0,0,3,3,0,0,7,7,0,0,11,11]);;
119
gap> p4 := PartialTransformation([4,4,0,0,8,8,0,0,12,12,0,0]);;
120
gap> css3:=Semigroup(p1,p2,p3,p4);
121
<transformation semigroup of degree 13 with 4 generators>
122
gap> el := Elements(css3)[8];;
123
gap> D := GreensDClassOfElement(css3, el);;
124
gap> IsRegularDClass(D);
125
true
126
gap> DisplayEggBoxOfDClass(D);
127
[ [ 1, 1, 0, 0 ],
128
 [ 1, 1, 0, 0 ],
129
 [ 0, 0, 1, 1 ],
130
 [ 0, 0, 1, 1 ] ]
131
gap> mat := [ [ 1, 0, 1, 0 ],
132
>  [ 0, 1, 0, 1 ],
133
>  [ 0, 1, 0, 1 ],
134
>  [ 1, 0, 1, 0 ] ];;
135
gap> res := GrahamBlocks(mat);;
136
gap> PrintArray(res[1]);
137
[ [ 1, 1, 0, 0 ],
138
 [ 1, 1, 0, 0 ],
139
 [ 0, 0, 1, 1 ],
140
 [ 0, 0, 1, 1 ] ]
141
gap> PrintArray(res[2]);
142
[ [ [ 1, 1 ], [ 1, 3 ], [ 1, 2 ], [ 1, 4 ] ],
143
 [ [ 4, 1 ], [ 4, 3 ], [ 4, 2 ], [ 4, 4 ] ],
144
 [ [ 2, 1 ], [ 2, 3 ], [ 2, 2 ], [ 2, 4 ] ],
145
 [ [ 3, 1 ], [ 3, 3 ], [ 3, 2 ], [ 3, 4 ] ] ]
146

147
148
149
2.4 Cayley graphs
150
151
2.4-1 RightCayleyGraphAsAutomaton
152
153
RightCayleyGraphAsAutomaton( S )  function
154
155
Computes the right Cayley graph of a finite monoid or semigroup S. It uses
156
the GAP buit-in function CayleyGraphSemigroup to compute the Cayley Graph
157
and returns it as an automaton without initial nor final states. (In this
158
automaton state i represents the element Elements(S)[i].) The Automata
159
package is used to this effect.
160
161
 Example 
162
gap> rcg := RightCayleyGraphAsAutomaton(b21);
163
< deterministic automaton on 2 letters with 6 states >
164
gap> Display(rcg);
165
 | 1 2 3 4 5 6
166
-----------------------
167
 a | 2 4 6 4 2 4
168
 b | 3 5 4 4 4 3
169
Initial state: [ ]
170
Accepting state: [ ]
171
 
172

173
174
2.4-2 RightCayleyGraphMonoidAsAutomaton
175
176
RightCayleyGraphMonoidAsAutomaton( S )  function
177
178
This function is a synonym of RightCayleyGraphAsAutomaton (2.4-1).
179
180
181