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
4 User friendly ways to give semigroups and automata
3
4
This chapter describes two Tcl/Tk graphical interfaces that can be used to
5
define and edit semigroups and automata.
6
7
8
4.1 Finite automata
9
10
4.1-1 XAutomaton
11
12
XAutomaton( [A] )  function
13
14
The function  Xautomaton  without arguments opens a new window where an
15
automaton may be specified. A finite automaton (which may then be edited)
16
may be given as argument.
17
18
 Example 
19
gap> XAutomaton();
20
 
21

22
23
It opens a window like the following:
24
25
 Var  is the GAP name of the automaton,  States  is the number of states, 
26
Alphabet  represents the alphabet and may be given through a positive
27
integer (in this case the alphabet is understood to be  a,b,c,... ) or
28
through a string whose symbols, in order, being the letters of the alphabet.
29
The numbers corresponding to the initial and accepting states are placed in
30
the respective boxes. The automaton may be specified to be deterministic,
31
non deterministic or with epsilon transitions. After pressing the 
32
transition matrix  button the window gets larger and the transition matrix
33
of the automaton may be given. The ith row of the matrix describes the
34
action of the ith letter on the states. A non deterministic automaton may be
35
given as follows:
36
37
By pressing the button  Ok  the GAP shell aquires the aspect shown in the
38
following picture and the automaton  ndAUT  may be used to do computations.
39
Some computations such as getting a rational expression representing the
40
language of the automaton, the (complete) minimal automaton representing the
41
same language or the transition semigroup of the automaton, may be done
42
directly after pressing the  Functions button.
43
44
By pressing the button  View  an image representing the automaton is
45
displayed in a new window. An automaton with epsilon transitions may be
46
given as follows shown in the following picture. The last letter of the
47
alphabet is always considered to be the ϵ. In the images it is represented
48
by @.
49
50
A new window with an image representing the automaton may be obtained by
51
pressing the button  View .
52
53
In the next example it is given an argument to the function XAutomaton.
54
55
 Example 
56
gap> A := RandomAutomaton("det",2,2);
57
< deterministic automaton on 2 letters with 2 states >
58
gap> XAutomaton(A);
59
 
60

61
62
It opens a window like the following:
63
64
65
4.2 Finite semigroups
66
67
The most common ways to give a semigroup to are through generators and
68
relations, a set of (partial) transformations as generating set and as
69
syntactic semigroups of automata or rational languages.
70
71
4.2-1 XSemigroup
72
73
XSemigroup( [S] )  function
74
75
The function  XSemigroup  without arguments opens a new window where a
76
semigroup (or monoid) may be specified. A finite semigroup (which may then
77
be edited) may be given as argument.
78
79
 Example 
80
gap> XSemigroup();
81
 
82

83
84
It opens a window like the following: where one may choose how to give the
85
semigroup.
86
87
88
4.2-2 Semigroups given through generators and relations
89
90
In the window opened by XSemigroup, by pressing the button Proceed the
91
window should enlarge and have the following aspect. (If the window does not
92
enlarge automatically, use the mouse to do it.)
93
94
 GAP variable  is the GAP name of the semigroup. One has then to specify the
95
number of generators, the number of relations (which does not to be exact)
96
and whether one wants to produce a monoid or a semigroup. Pressing the
97
Proceed button one gets:
98
99
100
4.2-3 Semigroups given by partial transformations
101
102
XSemigroup(poi3); would pop up the following window, where everything should
103
be clear:
104
105
106
4.2-4 Syntatic semigroups
107
108
XSemigroup(); would pop up the following window, where we would select
109
"Syntatic semigroup", press the Proceed button and then choose either to
110
give a "Rational expression" or an "Automaton" by pressing one of those
111
buttons: If "Rational expression" is chosen, a new window pops up where the
112
expression can be specified: After pressing the Ok button, notice that the
113
menu button Functions appears on the main window (lower right corner)
114
meaning that GAP already recognizes the given semigroup:
115
116
117