Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

563640 views
1
<Chapter><Heading>From Automata to Networks</Heading>
2
It is not only important to see how a TPN can be interpreted as a finite state automaton.
3
But also if an arbitrary automaton could represent the language of rank encoded permutations
4
of a TPN. Currently within <C>PatternClass</C> it is only possible to check whether
5
deterministic automata are possible representatives of a TPN.
6
<Section><Heading>Functions</Heading>
7
8
<ManSection>
9
<Func Name="IsStarClosed" Arg="aut"/>
10
<Returns> <K>true</K> if the start and accept states in <C>aut</C> are one and the same state. </Returns>
11
<Description>
12
This has the consequence that the whole rational expression accepted by <C>aut</C> is always enclosed by the
13
Kleene star.
14
<Example><![CDATA[
15
gap> x:=Automaton("det",4,2,[[3,4,2,4],[2,2,2,4]],[1],[2]);
16
< deterministic automaton on 2 letters with 4 states >
17
gap> IsStarClosed(x);
18
false
19
gap> AutToRatExp(x);
20
(a(aUb)Ub)b*
21
gap> y:=Automaton("det",3,2,[[3,2,1],[2,3,1]],[1],[1]);
22
< deterministic automaton on 2 letters with 3 states >
23
gap> IsStarClosed(y);
24
true
25
gap> AutToRatExp(y);
26
((ba*bUa)(aUb))*
27
gap> ]]></Example>
28
</Description>
29
</ManSection>
30
31
<ManSection>
32
<Func Name="Is2StarReplaceable" Arg="aut"/>
33
<Returns> <K>true</K> if none of the states in the automaton <C>aut</C>, which
34
are not the initial state, have a transition to the initial state labelled with
35
the first letter of the alphabet. It also returns <C>true</C> if there is at least one
36
state <M>i \in Q</M> with the first two transitions from <M>i</M> being
37
<M>f(i,1)=1</M> and <M>f(i,2)=x</M>, where <M>x \in Q\setminus\{1\}</M> and
38
<M>f(x,1)=1</M>.</Returns>
39
<Description>
40
<Example><![CDATA[
41
gap> x:=Automaton("det",3,2,[[1,2,3],[2,2,3]],[1],[2]);
42
< deterministic automaton on 2 letters with 3 states >
43
gap> Is2StarReplaceable(x);
44
true
45
gap> y:=Automaton("det",4,2,[[4,1,1,2],[1,3,3,2]],[1],[1]);
46
< deterministic automaton on 2 letters with 4 states >
47
gap> Is2StarReplaceable(y);
48
true
49
gap> z:=Automaton("det",4,2,[[4,1,1,2],[1,4,2,2]],[1],[4]);
50
< deterministic automaton on 2 letters with 4 states >
51
gap> Is2StarReplaceable(z);
52
false
53
gap> ]]></Example>
54
</Description>
55
</ManSection>
56
57
<ManSection>
58
<Func Name="IsStratified" Arg="aut"/>
59
<Returns><K>true</K> if <C>aut</C> has a specific "layered" form.</Returns>
60
<Description>
61
A formal description of the most basic stratified automaton is: <P/>
62
<M>(S,Q,f,q_{0},A)</M> with
63
<M>S:=\{1,...,n\},\,\, Q:=\{1,...,m\},\,\, n&lt;m,\,\, q_{0}:=1,\,\,
64
A:=Q\setminus \{n+1\},\,\, f: Q \times S \rightarrow Q </M> and
65
<M>n+1</M> is a sink state. <P/>
66
If <M>i,j \in Q \setminus \{ n+1 \}</M>,with <M>i &lt; j</M>, and <M>i',j' \in S</M>,
67
<M>i=i',\,\, j=j'</M> then
68
<Display Mode="M">f(i,i')=i,\,\, f(i,j')=j,\,\, f(j,j')=j,\,\, f(j,i')=j-1 \,\, or \,\, n+1.</Display>
69
<Example><![CDATA[
70
gap> x:=Automaton("det",4,2,[[1,3,1,4],[2,2,4,4]],[1],[2]);
71
< deterministic automaton on 2 letters with 4 states >
72
gap> IsStratified(x);
73
true
74
gap> y:=Automaton("det",4,2,[[1,3,2,4],[2,4,1,4]],[1],[2]);
75
< deterministic automaton on 2 letters with 4 states >
76
gap> IsStratified(y);
77
false
78
gap> ]]></Example>
79
</Description>
80
</ManSection>
81
82
<ManSection>
83
<Func Name="IsPossibleGraphAut" Arg="aut"/>
84
<Returns> <K>true</K> if <C>aut</C> returns <C>true</C> in <C>IsStratified</C>, <C>Is2StarReplaceable</C> and
85
<C>IsStarClosed</C>.</Returns>
86
<Description>
87
An automaton that fulfils the three functions above has the right form to be an automaton representing
88
rank encoded permutations, which are output from a TPN.
89
<Example><![CDATA[
90
gap> x:=Automaton("det",2,2,[[1,2],[2,2]],[1],[1]);
91
< deterministic automaton on 2 letters with 2 states >
92
gap> IsPossibleGraphAut(x);
93
true
94
gap> y:=Automaton("det",2,2,[[1,2],[1,2]],[1],[1]);
95
< deterministic automaton on 2 letters with 2 states >
96
gap> IsPossibleGraphAut(y);
97
false
98
gap> IsStarClosed(y);
99
true
100
gap> Is2StarReplaceable(y);
101
true
102
gap> IsStratified(y);
103
false
104
gap> ]]></Example>
105
</Description>
106
</ManSection>
107
108
</Section>
109
110
</Chapter>
111