Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
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
Project: cocalc-sagemath-dev-slelievre
Views: 4183461[1X5 [33X[0;0YFrom Automata to Networks[133X[101X23[33X[0;0YIt is not only important to see how a TPN can be interpreted as a finite4state automaton. But also if an arbitrary automaton could represent the5language of rank encoded permutations of a TPN. Currently within6[10XPatternClass[110X it is only possible to check whether deterministic automata are7possible representatives of a TPN.[133X8910[1X5.1 [33X[0;0YFunctions[133X[101X1112[1X5.1-1 IsStarClosed[101X1314[29X[2XIsStarClosed[102X( [3Xaut[103X ) [32X function15[6XReturns:[106X [33X[0;10Y[9Xtrue[109X if the start and accept states in [10Xaut[110X are one and the same16state.[133X1718[33X[0;0YThis has the consequence that the whole rational expression accepted by [10Xaut[110X19is always enclosed by the Kleene star.[133X2021[4X[32X Example [32X[104X22[4X[25Xgap>[125X [27Xx:=Automaton("det",4,2,[[3,4,2,4],[2,2,2,4]],[1],[2]);[127X[104X23[4X[28X< deterministic automaton on 2 letters with 4 states >[128X[104X24[4X[25Xgap>[125X [27XIsStarClosed(x); [127X[104X25[4X[28Xfalse[128X[104X26[4X[25Xgap>[125X [27XAutToRatExp(x); [127X[104X27[4X[28X(a(aUb)Ub)b*[128X[104X28[4X[25Xgap>[125X [27Xy:=Automaton("det",3,2,[[3,2,1],[2,3,1]],[1],[1]);[127X[104X29[4X[28X< deterministic automaton on 2 letters with 3 states >[128X[104X30[4X[25Xgap>[125X [27XIsStarClosed(y);[127X[104X31[4X[28Xtrue[128X[104X32[4X[25Xgap>[125X [27XAutToRatExp(y);[127X[104X33[4X[28X((ba*bUa)(aUb))*[128X[104X34[4X[25Xgap>[125X [27X[127X[104X35[4X[32X[104X3637[1X5.1-2 Is2StarReplaceable[101X3839[29X[2XIs2StarReplaceable[102X( [3Xaut[103X ) [32X function40[6XReturns:[106X [33X[0;10Y[9Xtrue[109X if none of the states in the automaton [10Xaut[110X, which are not the41initial state, have a transition to the initial state labelled42with the first letter of the alphabet. It also returns [10Xtrue[110X if43there is at least one state [22Xi ∈ Q[122X with the first two transitions44from [22Xi[122X being [22Xf(i,1)=1[122X and [22Xf(i,2)=x[122X, where [22Xx ∈ Q∖{1}[122X and [22Xf(x,1)=1[122X.[133X4546[4X[32X Example [32X[104X47[4X[25Xgap>[125X [27Xx:=Automaton("det",3,2,[[1,2,3],[2,2,3]],[1],[2]);[127X[104X48[4X[28X< deterministic automaton on 2 letters with 3 states >[128X[104X49[4X[25Xgap>[125X [27XIs2StarReplaceable(x);[127X[104X50[4X[28Xtrue[128X[104X51[4X[25Xgap>[125X [27Xy:=Automaton("det",4,2,[[4,1,1,2],[1,3,3,2]],[1],[1]);[127X[104X52[4X[28X< deterministic automaton on 2 letters with 4 states >[128X[104X53[4X[25Xgap>[125X [27XIs2StarReplaceable(y);[127X[104X54[4X[28Xtrue[128X[104X55[4X[25Xgap>[125X [27Xz:=Automaton("det",4,2,[[4,1,1,2],[1,4,2,2]],[1],[4]);[127X[104X56[4X[28X< deterministic automaton on 2 letters with 4 states >[128X[104X57[4X[25Xgap>[125X [27XIs2StarReplaceable(z);[127X[104X58[4X[28Xfalse[128X[104X59[4X[25Xgap>[125X [27X[127X[104X60[4X[32X[104X6162[1X5.1-3 IsStratified[101X6364[29X[2XIsStratified[102X( [3Xaut[103X ) [32X function65[6XReturns:[106X [33X[0;10Y[9Xtrue[109X if [10Xaut[110X has a specific "layered" form.[133X6667[33X[0;0YA formal description of the most basic stratified automaton is:[133X6869[33X[0;0Y[22X(S,Q,f,q_0,A)[122X with [22XS:={1,...,n}, Q:={1,...,m}, n<m, q_0:=1, A:=Q∖ {n+1}, f:70Q × S → Q[122X and [22Xn+1[122X is a sink state.[133X7172[33X[0;0YIf [22Xi,j ∈ Q ∖ { n+1 }[122X,with [22Xi < j[122X, and [22Xi',j' ∈ S[122X, [22Xi=i', j=j'[122X then[133X737475[24X[33X[0;6Yf(i,i')=i, f(i,j')=j, f(j,j')=j, f(j,i')=j-1 or n+1.[133X[124X7677[4X[32X Example [32X[104X78[4X[25Xgap>[125X [27Xx:=Automaton("det",4,2,[[1,3,1,4],[2,2,4,4]],[1],[2]);[127X[104X79[4X[28X< deterministic automaton on 2 letters with 4 states >[128X[104X80[4X[25Xgap>[125X [27XIsStratified(x); [127X[104X81[4X[28Xtrue[128X[104X82[4X[25Xgap>[125X [27Xy:=Automaton("det",4,2,[[1,3,2,4],[2,4,1,4]],[1],[2]);[127X[104X83[4X[28X< deterministic automaton on 2 letters with 4 states >[128X[104X84[4X[25Xgap>[125X [27XIsStratified(y); [127X[104X85[4X[28Xfalse[128X[104X86[4X[25Xgap>[125X [27X[127X[104X87[4X[32X[104X8889[1X5.1-4 IsPossibleGraphAut[101X9091[29X[2XIsPossibleGraphAut[102X( [3Xaut[103X ) [32X function92[6XReturns:[106X [33X[0;10Y[9Xtrue[109X if [10Xaut[110X returns [10Xtrue[110X in [10XIsStratified[110X, [10XIs2StarReplaceable[110X and93[10XIsStarClosed[110X.[133X9495[33X[0;0YAn automaton that fulfils the three functions above has the right form to be96an automaton representing rank encoded permutations, which are output from a97TPN.[133X9899[4X[32X Example [32X[104X100[4X[25Xgap>[125X [27Xx:=Automaton("det",2,2,[[1,2],[2,2]],[1],[1]);[127X[104X101[4X[28X< deterministic automaton on 2 letters with 2 states >[128X[104X102[4X[25Xgap>[125X [27XIsPossibleGraphAut(x);[127X[104X103[4X[28Xtrue[128X[104X104[4X[25Xgap>[125X [27Xy:=Automaton("det",2,2,[[1,2],[1,2]],[1],[1]);[127X[104X105[4X[28X< deterministic automaton on 2 letters with 2 states >[128X[104X106[4X[25Xgap>[125X [27XIsPossibleGraphAut(y); [127X[104X107[4X[28Xfalse[128X[104X108[4X[25Xgap>[125X [27XIsStarClosed(y);[127X[104X109[4X[28Xtrue[128X[104X110[4X[25Xgap>[125X [27XIs2StarReplaceable(y);[127X[104X111[4X[28Xtrue[128X[104X112[4X[25Xgap>[125X [27XIsStratified(y);[127X[104X113[4X[28Xfalse[128X[104X114[4X[25Xgap>[125X [27X[127X[104X115[4X[32X[104X116117118119