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
7. Computating the commutative image of a rational language
3
4
5
7.1 Semilinear Sets
6
7
The commutative image of a rational language is a semilinear set. One may
8
adapt the functions to compute a rational expression for the language
9
recognized by an automaton in order to compute directly the commutative
10
image of the language recognized by the automaton. Further improvement leads
11
to the direct computation of the closure in Bbb Z^n, for the profinite
12
topology, of that commutative image. (See [D01] for the correction of the
13
algorithms.) Recall that (see [D98]) if a semilinear set given by the
14
semilinear expression a+b_1Bbb N+ cdots +b_pBbb N, then a+b_1Bbb Z+ cdots
15
+b_pBbb Z is a Bbb Z-semilinear expression for the closure under the
16
profinite topology of the semilinear set given. We use the terminology
17
commutative language and Abelian language for subsets of Bbb N and Bbb Z
18
respectively. \index{commutative!language}\index{Abelian!language} The
19
commutative language recognized by an automaton (resp. GTG) is the
20
commutative image of the language recognized by the automaton (resp. GTG).
21
The Abelian language recognized by an automaton (resp. GTG) is the closure
22
under the profinite topology of the commutative image of the language
23
recognized by the automaton (resp. GTG).
24
25
7.1-1 RemoveStateCom
26
27
> RemoveStateCom( gtg ) ___________________________________________function
28
29
The first state of generalized transition graph gtg is removed. The GTG
30
obtained recognizes the same commutative language than the original.
31
32
7.1-2 DDAtoGTGCom
33
34
> DDAtoGTGCom( A ) ________________________________________________function
35
36
Transforms a dense deterministic finite automaton into a finite GTG
37
recognizing the same commutative language.
38
39
7.1-3 LangGTGCom
40
41
> LangGTGCom( gtg ) _______________________________________________function
42
43
Computes the commutative language recognized by a GTG.
44
45
7.1-4 LanguageCom
46
47
> LanguageCom( aut ) ______________________________________________function
48
49
Computes the commutative language recognized by a dense deterministic
50
automaton.
51
52
--------------------------- Example ----------------------------
53
 gap> aut := Automaton("det",5,2,[[1,2,4,2,1],[1,1,1,5,1]],[3],[2,3,4,5]);
54
 | 1 2 3 4 5 
55
 - - - - - - - 
56
 a | 1 2 4 2 1 
57
 b | 1 1 1 5 1 
58
Initial state: [ 3 ]
59
Accepting states: [ 2, 3, 4, 5 ]
60

61
gap> AutomatonToRatExp(aut);
62
1UabUa(1Uaa*)
63
gap> LanguageCom(aut);
64
[ [ 1, 1 ], [ 0, 0 ], [ 1, 0 ], [ 2, 0 ], [ 3, 0 ] + [ 1, 0 ] N ]
65
------------------------------------------------------------------
66
67
It is obvious that not all possible simplifications have been carried out.
68
The case of Bbb Z-semilinear sets is similar, but some more simplifications
69
are done.
70
71
7.1-5 RemoveStateAb
72
73
> RemoveStateAb( gtg ) ____________________________________________function
74
75
The first state of generalized transition graph gtg is removed. The Abelian
76
language recognized by the GTG is the same than the Abelian language
77
recognized by the original GTG. Several simplifications are done.
78
Computations of normal forms of matrices aiming to determine basis for
79
subgroups of Bbb Z^n are made. These computations of normal forms are
80
carried out using functions that are part of \GAP.
81
82
7.1-6 DDAtoGTGAb
83
84
> DDAtoGTGAb( aut ) _______________________________________________function
85
86
Transforms a dense deterministic finite automaton into a finite GTG
87
recognizing the same Abelian language than the Abelian language recognized
88
by the original automaton.
89
90
7.1-7 LangGTGAb
91
92
> LangGTGAb( gtg ) ________________________________________________function
93
94
Computes the Abelian language recognized by a GTG. It uses the fact that if
95
when removing a state we obtain an edge labeled by Bbb Z^n, then the
96
resulting language is Bbb Z^n.
97
98
7.1-8 LanguageAb
99
100
> LanguageAb( A ) _________________________________________________function
101
102
Computes the Abelian language recognized by a deterministic automaton. For
103
the automaton considered above, we obtain
104
105
--------------------------- Example ----------------------------
106
gap> LanguageAb(aut); 
107
[ [ 1, 1 ], [ 0, 0 ] + [ 1, 0 ] Z ]
108
------------------------------------------------------------------
109
110
111