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
5 From Automata to Networks
3
4
It is not only important to see how a TPN can be interpreted as a finite
5
state automaton. But also if an arbitrary automaton could represent the
6
language of rank encoded permutations of a TPN. Currently within
7
PatternClass it is only possible to check whether deterministic automata are
8
possible representatives of a TPN.
9
10
11
5.1 Functions
12
13
5.1-1 IsStarClosed
14
15
IsStarClosed( aut )  function
16
Returns: true if the start and accept states in aut are one and the same
17
state.
18
19
This has the consequence that the whole rational expression accepted by aut
20
is always enclosed by the Kleene star.
21
22
 Example 
23
gap> x:=Automaton("det",4,2,[[3,4,2,4],[2,2,2,4]],[1],[2]);
24
< deterministic automaton on 2 letters with 4 states >
25
gap> IsStarClosed(x); 
26
false
27
gap> AutToRatExp(x); 
28
(a(aUb)Ub)b*
29
gap> y:=Automaton("det",3,2,[[3,2,1],[2,3,1]],[1],[1]);
30
< deterministic automaton on 2 letters with 3 states >
31
gap> IsStarClosed(y);
32
true
33
gap> AutToRatExp(y);
34
((ba*bUa)(aUb))*
35
gap> 
36

37
38
5.1-2 Is2StarReplaceable
39
40
Is2StarReplaceable( aut )  function
41
Returns: true if none of the states in the automaton aut, which are not the
42
initial state, have a transition to the initial state labelled
43
with the first letter of the alphabet. It also returns true if
44
there is at least one state i ∈ Q with the first two transitions
45
from i being f(i,1)=1 and f(i,2)=x, where x ∈ Q∖{1} and f(x,1)=1.
46
47
 Example 
48
gap> x:=Automaton("det",3,2,[[1,2,3],[2,2,3]],[1],[2]);
49
< deterministic automaton on 2 letters with 3 states >
50
gap> Is2StarReplaceable(x);
51
true
52
gap> y:=Automaton("det",4,2,[[4,1,1,2],[1,3,3,2]],[1],[1]);
53
< deterministic automaton on 2 letters with 4 states >
54
gap> Is2StarReplaceable(y);
55
true
56
gap> z:=Automaton("det",4,2,[[4,1,1,2],[1,4,2,2]],[1],[4]);
57
< deterministic automaton on 2 letters with 4 states >
58
gap> Is2StarReplaceable(z);
59
false
60
gap> 
61

62
63
5.1-3 IsStratified
64
65
IsStratified( aut )  function
66
Returns: true if aut has a specific "layered" form.
67
68
A formal description of the most basic stratified automaton is:
69
70
(S,Q,f,q_0,A) with S:={1,...,n}, Q:={1,...,m}, n<m, q_0:=1, A:=Q∖ {n+1}, f:
71
Q × S → Q and n+1 is a sink state.
72
73
If i,j ∈ Q ∖ { n+1 },with i < j, and i',j' ∈ S, i=i', j=j' then
74
75
76
f(i,i')=i, f(i,j')=j, f(j,j')=j, f(j,i')=j-1 or n+1.
77
78
 Example 
79
gap> x:=Automaton("det",4,2,[[1,3,1,4],[2,2,4,4]],[1],[2]);
80
< deterministic automaton on 2 letters with 4 states >
81
gap> IsStratified(x); 
82
true
83
gap> y:=Automaton("det",4,2,[[1,3,2,4],[2,4,1,4]],[1],[2]);
84
< deterministic automaton on 2 letters with 4 states >
85
gap> IsStratified(y); 
86
false
87
gap> 
88

89
90
5.1-4 IsPossibleGraphAut
91
92
IsPossibleGraphAut( aut )  function
93
Returns: true if aut returns true in IsStratified, Is2StarReplaceable and
94
IsStarClosed.
95
96
An automaton that fulfils the three functions above has the right form to be
97
an automaton representing rank encoded permutations, which are output from a
98
TPN.
99
100
 Example 
101
gap> x:=Automaton("det",2,2,[[1,2],[2,2]],[1],[1]);
102
< deterministic automaton on 2 letters with 2 states >
103
gap> IsPossibleGraphAut(x);
104
true
105
gap> y:=Automaton("det",2,2,[[1,2],[1,2]],[1],[1]);
106
< deterministic automaton on 2 letters with 2 states >
107
gap> IsPossibleGraphAut(y); 
108
false
109
gap> IsStarClosed(y);
110
true
111
gap> Is2StarReplaceable(y);
112
true
113
gap> IsStratified(y);
114
false
115
gap> 
116

117
118
119