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
% This file was created automatically from autom.msk.
2
% DO NOT EDIT!
3
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4
\Chapter{Noninitial automata}
5
6
In this chapter we present the functionality applicable to noninitial automata.
7
8
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9
\Section{Definition}
10
11
\>MealyAutomaton( <table>[, <names>[, <alphabet>]] ) O
12
\>MealyAutomaton( <string> ) O
13
\>MealyAutomaton( <autom> ) O
14
\>MealyAutomaton( <tree_hom_list> ) O
15
\>MealyAutomaton( <list>, <name_func> ) O
16
\>MealyAutomaton( <list>, <true> ) O
17
18
Creates the Mealy automaton (see "Short math background") defined by the argument <table>, <string>
19
or <autom>. Format of the argument <table> is
20
the following: it is a list of states, where each state is a list of
21
positive integers which represent transition function at the given state and a
22
permutation or transformation which represent the output function at this
23
state. Format of the string <string> is the same as in `AutomatonGroup' (see~"AutomatonGroup").
24
The third form of this operation takes a tree homomorphism <autom> as its argument.
25
It returns noninitial automaton constructed from the sections of <autom>, whose first state
26
corresponds to <autom> itself. The fourth form creates a noninitial automaton constructed
27
of the states of all tree homomorphisms from the <tree_hom_list>.
28
29
\beginexample
30
gap> A := MealyAutomaton([[1,2,(1,2)],[3,1,()],[3,3,(1,2)]], ["a","b","c"]);
31
<automaton>
32
gap> Display(A);
33
a = (a, b)(1,2), b = (c, a), c = (c, c)(1,2)
34
gap> B:=MealyAutomaton([[1,2,Transformation([1,1])],[3,1,()],[3,3,(1,2)]],["a","b","c"]);
35
<automaton>
36
gap> Display(B);
37
a = (a, b)[ 1, 1 ], b = (c, a), c = (c, c)[ 2, 1 ]
38
gap> D := MealyAutomaton("a=(a,b)(1,2), b=(b,a)");
39
<automaton>
40
gap> Display(D);
41
a = (a, b)(1,2), b = (b, a)
42
gap> Basilica := AutomatonGroup( "u=(v,1)(1,2), v=(u,1)" );
43
< u, v >
44
gap> M := MealyAutomaton(u*v*u^-3);
45
<automaton>
46
gap> Display(M);
47
a1 = (a2, a5), a2 = (a3, a4), a3 = (a4, a2)(1,2), a4 = (a4, a4), a5 = (a6, a3)
48
(1,2), a6 = (a7, a4), a7 = (a6, a4)(1,2)
49
\endexample
50
51
If <list> consists of tree homomorphisms, it creates a noninitial automaton
52
constructed of their states. If <name_func> is a function then it is used
53
to name the states of the newly constructed automaton. If it is <true>
54
then states of automata from the <list> are used. If it <false> then new
55
states are named a_1, a_2, etc.
56
57
\beginexample
58
gap> G := AutomatonGroup("a=(b,a),b=(b,a)(1,2)");
59
< a, b >
60
gap> MealyAutomaton([a*b]);; Display(last);
61
a1 = (a2, a4)(1,2), a2 = (a3, a1), a3 = (a3, a1)(1,2), a4 = (a2, a4)
62
gap> MealyAutomaton([a*b], true);; Display(last);
63
<a*b> = (<b^2>, <a^2>)(1,2), <b^2> = (<b*a>, <a*b>), <b*a> = (<b*a>, <a*b>)(1,2), <a^2> = (<b^2>, <a^2>)
64
gap> MealyAutomaton([a*b], String);; Display(last);
65
a*b = (b^2, a^2)(1,2), b^2 = (b*a, a*b), b*a = (b*a, a*b)(1,2), a^2 = (b^2, a^2)
66
\endexample
67
68
\>IsMealyAutomaton( <A> ) C
69
70
A category of non-initial finite Mealy automata with the same input and
71
output alphabet.
72
73
74
\>NumberOfStates( <A> ) A
75
76
Returns the number of states of the automaton <A>.
77
78
79
80
\>SizeOfAlphabet( <A> ) A
81
82
Returns the number of letters in the alphabet the automaton <A> acts on.
83
84
85
86
\>`AutomatonList( <A> )'{AutomatonList}!{[automaton]} A
87
88
Returns the list of <A> acceptable by `MealyAutomaton' (see "MealyAutomaton")
89
90
91
92
93
94
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
95
\Section{Tools}
96
97
\>IsTrivial( <A> ) P
98
99
Computes whether the automaton <A> is equivalent to the trivial automaton.
100
\beginexample
101
gap> A := MealyAutomaton("a=(c,c), b=(a,b), c=(b,a)");
102
<automaton>
103
gap> IsTrivial(A);
104
true
105
\endexample
106
107
108
\>IsInvertible( <A> ) P
109
110
Is `true' if <A> is invertible and `false' otherwise.
111
112
113
\>MinimizationOfAutomaton( <A> ) F
114
115
Returns the automaton obtained from automaton <A> by minimization. The
116
implementation of this function was significantly optimized by Andrey Russev
117
starting from Version 1.3.
118
\beginexample
119
gap> B := MealyAutomaton("a=(1,a)(1,2), b=(1,a)(1,2), c=(a,b), d=(a,b)");
120
<automaton>
121
gap> C := MinimizationOfAutomaton(B);
122
<automaton>
123
gap> Display(C);
124
a = (1, a)(1,2), c = (a, a), 1 = (1, 1)
125
\endexample
126
127
128
\>MinimizationOfAutomatonTrack( <A> ) F
129
130
Returns the list `[A_new, new_via_old, old_via_new]', where `A_new' is an
131
automaton obtained from automaton <A> by minimization,
132
`new_via_old' describes how new states are expressed in terms of the old ones, and
133
`old_via_new' describes how old states are expressed in terms of the new ones.
134
The implementation of this function was significantly optimized by Andrey Russev
135
starting from Version 1.3.
136
\beginexample
137
gap> B := MealyAutomaton("a=(1,a)(1,2), b=(1,a)(1,2), c=(a,b), d=(a,b)");
138
<automaton>
139
gap> B_min := MinimizationOfAutomatonTrack(B);
140
[ <automaton>, [ 1, 3, 5 ], [ 1, 1, 2, 2, 3 ] ]
141
gap> Display(B_min[1]);
142
a = (1, a)(1,2), c = (a, a), 1 = (1, 1)
143
\endexample
144
145
146
\>IsOfPolynomialGrowth( <A> ) P
147
148
Determines whether the automaton <A> has polynomial growth in terms of Sidki~\cite{Sid00}.
149
150
See also `IsBounded' ("IsBounded") and
151
`PolynomialDegreeOfGrowth' ("PolynomialDegreeOfGrowth").
152
\beginexample
153
gap> B := MealyAutomaton("a=(b,1)(1,2), b=(a,1)");
154
<automaton>
155
gap> IsOfPolynomialGrowth(B);
156
true
157
gap> D := MealyAutomaton("a=(a,b)(1,2), b=(b,a)");
158
<automaton>
159
gap> IsOfPolynomialGrowth(D);
160
false
161
\endexample
162
163
164
\>IsBounded( <A> ) P
165
166
Determines whether the automaton <A> is bounded in terms of Sidki~\cite{Sid00}.
167
168
See also `IsOfPolynomialGrowth' ("IsOfPolynomialGrowth")
169
and `PolynomialDegreeOfGrowth' ("PolynomialDegreeOfGrowth").
170
\beginexample
171
gap> B := MealyAutomaton("a=(b,1)(1,2), b=(a,1)");
172
<automaton>
173
gap> IsBounded(B);
174
true
175
gap> C := MealyAutomaton("a=(a,b)(1,2), b=(b,c), c=(c,1)(1,2)");
176
<automaton>
177
gap> IsBounded(C);
178
false
179
\endexample
180
181
182
\>PolynomialDegreeOfGrowth( <A> ) A
183
184
For an automaton <A> of polynomial growth in terms of Sidki~\cite{Sid00}
185
determines its degree of
186
polynomial growth. This degree is 0 if and only if automaton is bounded.
187
If the growth of automaton is exponential returns `fail'.
188
189
See also `IsOfPolynomialGrowth' ("IsOfPolynomialGrowth")
190
and `IsBounded' ("IsBounded").
191
\beginexample
192
gap> B := MealyAutomaton("a=(b,1)(1,2), b=(a,1)");
193
<automaton>
194
gap> PolynomialDegreeOfGrowth(B);
195
0
196
gap> C := MealyAutomaton("a=(a,b)(1,2), b=(b,c), c=(c,1)(1,2)");
197
<automaton>
198
gap> PolynomialDegreeOfGrowth(C);
199
2
200
\endexample
201
202
203
\>AdjacencyMatrix( <A> ) A
204
205
Returns the adjacency matrix of a Mealy automaton <A>, in which the $ij$-th entry
206
contains the number of arrows in the Moore diagram of <A> from state $i$ to state $j$.
207
208
\beginexample
209
gap> A:=MealyAutomaton("a=(a,a,b)(1,2,3),b=(a,c,b)(1,2),c=(a,a,a)");
210
<automaton>
211
gap> AdjacencyMatrix(A);
212
[ [ 2, 1, 0 ], [ 1, 1, 1 ], [ 3, 0, 0 ] ]
213
\endexample
214
215
216
\>IsAcyclic( <A> ) P
217
218
Computes whether or not an automaton <A> is acyclic in the sense of Sidki~\cite{Sid00}.
219
I.e. returns `true' if the Moore diagram of <A> does not contain cycles with two or more
220
states and `false' otherwise.
221
\beginexample
222
gap> A := MealyAutomaton("a=(a,a,b)(1,2,3),b=(c,c,b)(1,2),c=(d,c,1),d=(d,1,d)");
223
<automaton>
224
gap> IsAcyclic(A);
225
true
226
gap> A := MealyAutomaton("a=(a,a,b)(1,2,3),b=(c,c,d)(1,2),c=(d,c,1),d=(b,1,d)");
227
<automaton>
228
gap> IsAcyclic(A);
229
false
230
\endexample
231
232
233
\>DualAutomaton( <A> ) O
234
235
Returns the automaton dual of <A>.
236
\beginexample
237
gap> A := MealyAutomaton("a=(b,a)(1,2), b=(b,a)");
238
<automaton>
239
gap> D := DualAutomaton(A);
240
<automaton>
241
gap> Display(D);
242
d1 = (d2, d1)[ 2, 2 ], d2 = (d1, d2)[ 1, 1 ]
243
\endexample
244
245
246
\>InverseAutomaton( <A> ) O
247
248
Returns the automaton inverse to <A> if <A> is invertible.
249
\beginexample
250
gap> A := MealyAutomaton("a=(b,a)(1,2), b=(b,a)");
251
<automaton>
252
gap> B := InverseAutomaton(A);
253
<automaton>
254
gap> Display(B);
255
a1 = (a1, a2)(1,2), a2 = (a2, a1)
256
\endexample
257
258
259
\>IsBireversible( <A> ) P
260
261
Computes whether or not the automaton <A> is bireversible, i.e. <A>, the dual of <A> and
262
the dual of the inverse of <A> are invertible. The example below shows that the
263
Bellaterra automaton is bireversible.
264
\beginexample
265
gap> Bellaterra := MealyAutomaton("a=(c,c)(1,2), b=(a,b), c=(b,a)");
266
<automaton>
267
gap> IsBireversible(Bellaterra);
268
true
269
\endexample
270
271
272
\>IsReversible( <A> ) P
273
274
Computes whether or not the automaton <A> is reversible, i.e. the dual of <A>
275
is invertible.
276
277
278
\>IsIRAutomaton( <A> ) P
279
280
Computes whether or not the automaton <A> is an IR-automaton, i.e. <A> and its dual are invertible.
281
The example below shows that the automaton generating lamplighter group is an IR-automaton.
282
\beginexample
283
gap> L := MealyAutomaton("a=(b,a)(1,2), b=(a,b)");
284
<automaton>
285
gap> IsIRAutomaton(L);
286
true
287
\endexample
288
289
290
The next three commands deal with the, so-called, MD-reduction procedure developed
291
in~\cite{AKL}. Particularly, according
292
to~\cite{KLI}, a 2-letter or 2-state invertible reversible automaton
293
generates a finite group if and only if the MD-reduction procedure terminates with the
294
trivial automaton. In this case an automaton is called MD-trivial.
295
296
\>MDReduction( <A> ) O
297
298
Performs the process of MD-reduction of automaton <A> (alternating
299
applications of minimization and dualization procedures) until a pair of
300
minimal automata dual to each other is reached. Returns this pair. The main
301
point of this procedure is in the fact that the (semi)group generated by the
302
original automaton is finite if and only each of the (semi)groups generated
303
by the output automata is finite.
304
\beginexample
305
gap> A:=MealyAutomaton("a=(d,d,d,d)(1,2)(3,4),b=(b,b,b,b)(1,4)(2,3),\\
306
> c=(a,c,a,c), d=(c,a,c,a)");
307
<automaton>
308
gap> NumberOfStates(MinimizationOfAutomaton(A));
309
4
310
gap> MDR:=MDReduction(A);
311
[ <automaton>, <automaton> ]
312
gap> Display(MDR[1]);
313
d1 = (d2, d2, d1, d1)(1,4,3), d2 = (d1, d1, d2, d2)(1,4)
314
gap> Display(MDR[2]);
315
d1 = (d4, d4)(1,2), d2 = (d2, d2)(1,2), d3 = (d1, d3), d4 = (d3, d1)
316
\endexample
317
318
\>IsMDTrivial( <A> ) P
319
320
Returns `true' if <A> is MD-trivial (i.e. if MD-reduction proedure returns the
321
trivial automaton) and `false' otherwise.
322
323
\>IsMDReduced( <A> ) P
324
325
Returns `true' if <A> is MD-reduced and `false' otherwise.
326
327
\>DisjointUnion( <A>, <B> ) O
328
329
Constructs the disjoint union of automata <A> and <B>
330
\beginexample
331
gap> A := MealyAutomaton("a=(a,b)(1,2), b=(a,b)");
332
<automaton>
333
gap> B := MealyAutomaton("c=(d,c), d=(c,e)(1,2), e=(e,d)");
334
<automaton>
335
gap> Display(DisjointUnion(A, B));
336
a1 = (a1, a2)(1,2), a2 = (a1, a2), a3 = (a4, a3), a4 = (a3, a5)
337
(1,2), a5 = (a5, a4)
338
\endexample
339
340
341
\>`<A> \* <B>'{product}!{for noninitial automata}
342
343
Constructs the product of 2 noninitial automata <A> and <B>.
344
\beginexample
345
gap> A := MealyAutomaton("a=(a,b)(1,2), b=(a,b)");
346
<automaton>
347
gap> B := MealyAutomaton("c=(d,c), d=(c,e)(1,2), e=(e,d)");
348
<automaton>
349
gap> Print(A*B);
350
a1 = (a1, a5)(1,2), a2 = (a3, a4), a3 = (a2, a6)
351
(1,2), a4 = (a2, a4), a5 = (a1, a6)(1,2), a6 = (a3, a5)
352
\endexample
353
354
\>SubautomatonWithStates( <A>, <states> ) O
355
356
Returns the minimal subautomaton of the automaton <A> containing states <states>.
357
\beginexample
358
gap> A := MealyAutomaton("a=(e,d)(1,2),b=(c,c),c=(b,c)(1,2),d=(a,e)(1,2),e=(e,d)");
359
<automaton>
360
gap> Display(SubautomatonWithStates(A, [1, 4]));
361
a = (e, d)(1,2), d = (a, e)(1,2), e = (e, d)
362
\endexample
363
364
365
\>AutomatonNucleus( <A> ) O
366
367
Returns the nucleus of the automaton <A>, i.e. the minimal subautomaton
368
containing all cycles in <A>.
369
\beginexample
370
gap> A := MealyAutomaton("a=(b,c)(1,2),b=(d,d),c=(d,b)(1,2),d=(d,b)(1,2),e=(a,d)");
371
<automaton>
372
gap> Display(AutomatonNucleus(A));
373
b = (d, d), d = (d, b)(1,2)
374
\endexample
375
376
377
\>AreEquivalentAutomata( <A>, <B> ) O
378
379
Returns `true' if for every state `s' of the automaton <A> there is a state of the automaton <B>
380
equivalent to `s' and vice versa.
381
\beginexample
382
gap> A := MealyAutomaton("a=(b,a)(1,2), b=(a,c), c=(b,c)(1,2)");
383
<automaton>
384
gap> B := MealyAutomaton("b=(a,c), c=(b,c)(1,2), a=(b,a)(1,2), d=(b,c)(1,2)");
385
<automaton>
386
gap> AreEquivalentAutomata(A, B);
387
true
388
\endexample
389
390
391
392
393
394
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
395
396