<h3>5 <span class="Heading">From Automata to Networks</span></h3>
<p>It is not only important to see how a TPN can be interpreted as a finite state automaton. But also if an arbitrary automaton could represent the language of rank encoded permutations of a TPN. Currently within <code class="code">PatternClass</code> it is only possible to check whether deterministic automata are possible representatives of a TPN.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsStarClosed</code>( <var class="Arg">aut</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: <code class="keyw">true</code> if the start and accept states in <code class="code">aut</code> are one and the same state.</p>
<p>This has the consequence that the whole rational expression accepted by <code class="code">aut</code> is always enclosed by the Kleene star.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">x:=Automaton("det",4,2,[[3,4,2,4],[2,2,2,4]],[1],[2]);</span>
< deterministic automaton on 2 letters with 4 states >
<span class="GAPprompt">gap></span> <span class="GAPinput">IsStarClosed(x); </span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">AutToRatExp(x); </span>
(a(aUb)Ub)b*
<span class="GAPprompt">gap></span> <span class="GAPinput">y:=Automaton("det",3,2,[[3,2,1],[2,3,1]],[1],[1]);</span>
< deterministic automaton on 2 letters with 3 states >
<span class="GAPprompt">gap></span> <span class="GAPinput">IsStarClosed(y);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">AutToRatExp(y);</span>
((ba*bUa)(aUb))*
<span class="GAPprompt">gap></span> <span class="GAPinput"></span></pre></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Is2StarReplaceable</code>( <var class="Arg">aut</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: <code class="keyw">true</code> if none of the states in the automaton <code class="code">aut</code>, which are not the initial state, have a transition to the initial state labelled with the first letter of the alphabet. It also returns <code class="code">true</code> if there is at least one state <span class="SimpleMath">i ∈ Q</span> with the first two transitions from <span class="SimpleMath">i</span> being <span class="SimpleMath">f(i,1)=1</span> and <span class="SimpleMath">f(i,2)=x</span>, where <span class="SimpleMath">x ∈ Q∖{1}</span> and <span class="SimpleMath">f(x,1)=1</span>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">x:=Automaton("det",3,2,[[1,2,3],[2,2,3]],[1],[2]);</span>
< deterministic automaton on 2 letters with 3 states >
<span class="GAPprompt">gap></span> <span class="GAPinput">Is2StarReplaceable(x);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">y:=Automaton("det",4,2,[[4,1,1,2],[1,3,3,2]],[1],[1]);</span>
< deterministic automaton on 2 letters with 4 states >
<span class="GAPprompt">gap></span> <span class="GAPinput">Is2StarReplaceable(y);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">z:=Automaton("det",4,2,[[4,1,1,2],[1,4,2,2]],[1],[4]);</span>
< deterministic automaton on 2 letters with 4 states >
<span class="GAPprompt">gap></span> <span class="GAPinput">Is2StarReplaceable(z);</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput"></span></pre></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsStratified</code>( <var class="Arg">aut</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: <code class="keyw">true</code> if <code class="code">aut</code> has a specific "layered"form.</p>
<p>A formal description of the most basic stratified automaton is:</p>
<p><span class="SimpleMath">(S,Q,f,q_0,A)</span> with <span class="SimpleMath">S:={1,...,n}, Q:={1,...,m}, n<m, q_0:=1, A:=Q∖ {n+1}, f: Q × S → Q</span> and <span class="SimpleMath">n+1</span> is a sink state.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsPossibleGraphAut</code>( <var class="Arg">aut</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: <code class="keyw">true</code> if <code class="code">aut</code> returns <code class="code">true</code> in <code class="code">IsStratified</code>, <code class="code">Is2StarReplaceable</code> and <code class="code">IsStarClosed</code>.</p>
<p>An automaton that fulfils the three functions above has the right form to be an automaton representing rank encoded permutations, which are output from a TPN.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">x:=Automaton("det",2,2,[[1,2],[2,2]],[1],[1]);</span>
< deterministic automaton on 2 letters with 2 states >
<span class="GAPprompt">gap></span> <span class="GAPinput">IsPossibleGraphAut(x);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">y:=Automaton("det",2,2,[[1,2],[1,2]],[1],[1]);</span>
< deterministic automaton on 2 letters with 2 states >
<span class="GAPprompt">gap></span> <span class="GAPinput">IsPossibleGraphAut(y); </span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">IsStarClosed(y);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">Is2StarReplaceable(y);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IsStratified(y);</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput"></span></pre></div>
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.