<p>The <strong class="pkg">KBMag</strong> package contains <strong class="pkg">GAP</strong> interfaces to many of the functions for manipulating finite state automata (<span class="SimpleMath">fsa</span>) that are available in the stand-alone. We shall list these here, without giving much detail. For more detail, the user could try looking in the source file <code class="file">gap/fsa4.g</code>.</p>
<h4>4.1 <span class="Heading">Functions for manipulating finite state automata</span></h4>
<p><span class="SimpleMath">fsa</span> are currently implemented as <strong class="pkg">GAP</strong> records, as they were previously in <strong class="pkg">GAP</strong>3. This interface may be updated to the style of <strong class="pkg">GAP</strong>4 at some stage. (Note that the abbreviation <span class="SimpleMath">fsa</span> will be used for both singular and the plural.)</p>
<p>The alphabet of an <span class="SimpleMath">fsa</span> is itself a record that must contain at least the two components <code class="code">type</code> and <code class="code">size</code>, where <code class="code">type</code> is a string, and <code class="code">size</code> a positive integer. The easiest possibility is to use the type <code class="code">simple</code>, and then no other record components are necessary. There are several more complicated possibilities, which are used by the other rewriting system functions. For example, there is the type <code class="code">identifiers</code>, for which fields <code class="code">format</code> and <code class="code">names</code> are necessary. For example:</p>
<p>defines a valid alphabet for an <span class="SimpleMath">fsa</span>. The members of the alphabet are referred to as <code class="code">letters</code>, and can be represented either by a positive integer or by their name (usually a generator of a free group or monoid) if they have one.</p>
<p>The functions <code class="func">ReductionAutomaton</code> (<a href="chap2.html#X7ED0190D7BDA74D7"><span class="RefLink">2.5-2</span></a>), <code class="func">WordAcceptor</code> (<a href="chap2.html#X82CAA53A7926DA74"><span class="RefLink">2.6-2</span></a>), <code class="func">FirstWordDifferenceAutomaton</code> (<a href="chap2.html#X82CAA53A7926DA74"><span class="RefLink">2.6-2</span></a>), <code class="func">SecondWordDifferenceAutomaton</code> (<a href="chap2.html#X82CAA53A7926DA74"><span class="RefLink">2.6-2</span></a>) and <code class="func">GeneralMultiplier</code> (<a href="chap2.html#X82CAA53A7926DA74"><span class="RefLink">2.6-2</span></a>) mentioned in earlier sections all return a <span class="SimpleMath">fsa</span>. The other possibilities for the user to construct a <span class="SimpleMath">fsa</span> are to use the function <code class="func">FSA</code> (<a href="chap4.html#X7E54AFBF87E6178D"><span class="RefLink">4.1-3</span></a>) or to read one in from a file. In the latter case, the user must immediately call <code class="func">InitializeFSA</code> (<a href="chap4.html#X8566C07585AB9BFE"><span class="RefLink">4.1-2</span></a>) on the record that has been read in. For example, running <strong class="pkg">GAP</strong> from the package directory:</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ InitializeFSA</code>( <var class="Arg">fsa</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Initializes a record representing a <span class="SimpleMath">fsa</span> that has been read in from a file.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ FSA</code>( <var class="Arg">alph</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns an initialized <span class="SimpleMath">fsa</span> with alphabet <code class="code">alph</code> having one state that is an initial and final state, and no transitions (edges).</p>
<p>The arguments of the following functions must be initialized <span class="SimpleMath">fsa</span>.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ WriteFSA</code>( <var class="Arg">fsa</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Displays <span class="SimpleMath">fsa</span> nicely. (In a proper implementation, this would be the <code class="code">ViewObj</code> function.)</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsDeterministicFSA</code>( <var class="Arg">fsa</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Tests whether <span class="SimpleMath">fsa</span> is a deterministic <span class="SimpleMath">fsa</span>. Many of the functions below work only for deterministic <span class="SimpleMath">fsa</span>. A deterministic <span class="SimpleMath">fsa</span> with the same language as <span class="SimpleMath">fsa</span> can be constructed with the function <code class="func">DeterminizeFSA</code> (<a href="chap4.html#X7B8AF0EF79125730"><span class="RefLink">4.2-1</span></a>).</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ NumberOfStatesFSA</code>( <var class="Arg">fsa</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns the number of states of <span class="SimpleMath">fsa</span>.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ AcceptingStatesFSA</code>( <var class="Arg">fsa</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns the list of accepting states of <span class="SimpleMath">fsa</span>.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ InitialStatesFSA</code>( <var class="Arg">fsa</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns the list of initial states of <span class="SimpleMath">fsa</span>.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DenseDTableFSA</code>( <var class="Arg">fsa</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><span class="SimpleMath">fsa</span> must be deterministic. The transition table is returned as a list of lists, where the <span class="SimpleMath">e</span>-th entry in the <span class="SimpleMath">s</span>-th inner list is <code class="func">TargetDFA</code> (<a href="chap4.html#X7E64B44A7F30EC6D"><span class="RefLink">4.1-13</span></a>), called as <code class="code">TargetDFA(fsa,e,s);</code>.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SparseTableFSA</code>( <var class="Arg">fsa</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>The transition table is returned as a list of lists, where each entry in the <span class="SimpleMath">s</span>-th inner list is is a two-element list <code class="code">[e,t]</code> of integers that represents a transition from state number <span class="SimpleMath">s</span> to state number <span class="SimpleMath">t</span> under letter number <span class="SimpleMath">e</span>. We can also have <span class="SimpleMath">e=0</span>, representing transitions with no label (<span class="SimpleMath">ϵ</span> transitions).</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ TargetDFA</code>( <var class="Arg">fsa</var>, <var class="Arg">e</var>, <var class="Arg">s</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><span class="SimpleMath">fsa</span> must be a deterministic <span class="SimpleMath">fsa</span>, <span class="SimpleMath">e</span> should be a number or name of a letter of the alphabet, and <spanclass="SimpleMath">s</span> a number of a state of <span class="SimpleMath">fsa</span>. The target of <span class="SimpleMath">s</span> under <span class="SimpleMath">e</span> is returned, or <span class="SimpleMath">0</span> if there is no target.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ TargetsFSA</code>( <var class="Arg">fsa</var>, <var class="Arg">e</var>, <var class="Arg">s</var> )</td><tdclass="tdright">( function )</td></tr></table></div>
<p>Similar to <code class="func">TargetDFA</code> (<a href="chap4.html#X7E64B44A7F30EC6D"><span class="RefLink">4.1-13</span></a>), but <span class="SimpleMath">fsa</span> need not be deterministic, and a list of targets is returned.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SourcesFSA</code>( <var class="Arg">fsa</var>, <var class="Arg">e</var>, <var class="Arg">s</var> )</td><tdclass="tdright">( function )</td></tr></table></div>
<p>Similar to <code class="func">TargetsFSA</code> (<a href="chap4.html#X85ED262883274F58"><span class="RefLink">4.1-14</span></a>), but the list of sources of transitions to <span class="SimpleMath">s</span> under <span class="SimpleMath">e</span> is returned. Note that <span class="SimpleMath">e</span> can also be zero here.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ WordTargetDFA</code>( <var class="Arg">fsa</var>, <var class="Arg">w</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><span class="SimpleMath">fsa</span> must be a deterministic <span class="SimpleMath">fsa</span>, and <span class="SimpleMath">w</span> should be a list of integers or a word in the alphabet (in the case when the alphabet is defined from a free group or monoid). The target of the initial state of <span class="SimpleMath">fsa</span> under <span class="SimpleMath">w</span> is returned, or <span class="SimpleMath">0</span> if there is no such target.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsAcceptedWordDFA</code>( <var class="Arg">fsa</var>, <var class="Arg">w</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><span class="SimpleMath">fsa</span> must be a deterministic <span class="SimpleMath">fsa</span>, and <span class="SimpleMath">w</span> should be a list of integers or a word in the alphabet (in the case when the alphabet is defined from a free group or monoid). This function tests whether <spanclass="SimpleMath">w</span> is in the language of <span class="SimpleMath">fsa</span>.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ AddStateFSA</code>( <var class="Arg">fsa</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Adds an extra non-accepting state to <span class="SimpleMath">fsa</span> with no transitions to or from it.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DeleteStateFSA</code>( <var class="Arg">fsa</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Deletes the highest numbered state together with all transitions to and from it from <span class="SimpleMath">fsa</span>. Use <code class="func">PermuteStatesFSA</code> (<a href="chap4.html#X849090A687418D32"><span class="RefLink">4.1-20</span></a>) first to delete a different state.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PermuteStatesFSA</code>( <var class="Arg">fsa</var>, <var class="Arg">p</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><span class="SimpleMath">p</span> should be a permutation of <span class="SimpleMath">[1..ns]</span>, where <span class="SimpleMath">fsa</span> has <span class="SimpleMath">ns</span> states. The states are permuted, where the original state number <span class="SimpleMath">n</span> becomes the new state number <span class="SimpleMath">n^p</span>.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ AddLetterFSA</code>( <var class="Arg">fsa</var>[, <var class="Arg">name</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<p>Adds an extra letter to the alphabet of <span class="SimpleMath">fsa</span> with no associated transitions. If the alphabet of <span class="SimpleMath">fsa</span> is defined over a free group or monoid, then <code class="code">name</code> specifies the element of this free structure corresponding to the new letter.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DeleteLetterFSA</code>( <var class="Arg">fsa</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Deletes the highest numbered letter together with all associated transitions from the alphabet of <span class="SimpleMath">fsa</span>. Use <code class="func">PermuteLettersFSA</code> (<a href="chap4.html#X7F660FCC7C845197"><span class="RefLink">4.1-23</span></a>) first to delete a different letter.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PermuteLettersFSA</code>( <var class="Arg">fsa</var>, <var class="Arg">p</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><span class="SimpleMath">p</span> should be a permutation of <span class="SimpleMath">[1..na]</span>, where the alphabet of <span class="SimpleMath">fsa</span> has <span class="SimpleMath">na</span> letters. The letters are permuted, where the original letter number <span class="SimpleMath">n</span> becomes the new letter number <span class="SimpleMath">n^p</span>.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ AddEdgeFSA</code>( <var class="Arg">fsa</var>, <var class="Arg">e</var>, <var class="Arg">s</var>, <var class="Arg">t</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Adds an extra transition to <span class="SimpleMath">fsa</span> with source <span class="SimpleMath">s</span>, target <span class="SimpleMath">t</span> and letter <span class="SimpleMath">e</span>. If there is already such a transition, then this function does nothing.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DeleteEdgeFSA</code>( <var class="Arg">fsa</var>, <var class="Arg">e</var>, <var class="Arg">s</var>, <var class="Arg">t</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Deletes the transition from <span class="SimpleMath">fsa</span> with source <span class="SimpleMath">s</span>, target <span class="SimpleMath">t</span> and letter <span class="SimpleMath">e</span>, if there is one.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SetAcceptingFSA</code>( <var class="Arg">fsa</var>, <var class="Arg">s</var>, <var class="Arg">flag</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="code">flag</code> should be <code class="code">true</code> or <code class="code">false</code>, and state number <span class="SimpleMath">s</span> is made accepting or non-accepting, respectively.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SetInitialFSA</code>( <var class="Arg">fsa</var>, <var class="Arg">s</var>, <var class="Arg">flag</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="code">flag</code> should be <code class="code">true</code> or <code class="code">false</code>, and state number <span class="SimpleMath">s</span> is made initial or non-initial, respectively.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsAccessibleFSA</code>( <var class="Arg">fsa</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Tests whether <span class="SimpleMath">fsa</span> is accessible; that is, whether all states can be reached from the initial states.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ AccessibleFSA</code>( <var class="Arg">fsa</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Removes all inaccessible states from <span class="SimpleMath">fsa</span> thus rendering it accessible without altering its language.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsTrimFSA</code>( <var class="Arg">fsa</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Tests whether <span class="SimpleMath">fsa</span> is trim; that is, whether all states can be reached from the initial states, and a final state can be reached from all states.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ TrimFSA</code>( <var class="Arg">fsa</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Removes all inaccessible states from <span class="SimpleMath">fsa</span> and all states from which an accepting state cannot be reached, thus rendering it trim without altering its language.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsBFSFSA</code>( <var class="Arg">fsa</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Tests whether <span class="SimpleMath">fsa</span> is in <code class="code">bfs</code> (breadth-first-search) form; that is, whether the initial states come first and the other states appear in ascending order if one scans the transition table first by state number and then by alphabet number. Note that <span class="SimpleMath">fsa</span> must be accessible for it to be <code class="code">bfs</code>.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ BFSFSA</code>( <var class="Arg">fsa</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Replaces <span class="SimpleMath">fsa</span> by one with the same language but in <code class="code">bfs</code> form. This can be useful for comparing the languages of two <span class="SimpleMath">fsa</span>. In fact <code class="func">MinimizeFSA</code> (<a href="chap4.html#X858E2B79803E4320"><span class="RefLink">4.2-2</span></a>) and <code class="func">BFSFSA</code> are applied in turn to a deteministic <span class="SimpleMath">fsa</span>, then the resulting transition table is uniquely determined by the language of the <span class="SimpleMath">fsa</span>.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ LSizeDFA</code>( <var class="Arg">fsa</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>The size of the acceted language of <span class="SimpleMath">fsa</span>, which must be deterministic. This only works if <span class="SimpleMath">fsa</span> is trim. If not, then <code class="func">TrimFSA</code> (<a href="chap4.html#X7DABF5A87D9CF3F0"><span class="RefLink">4.1-31</span></a>) must be called first.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ LEnumerateDFA</code>( <var class="Arg">fsa</var>, <var class="Arg">min</var>, <var class="Arg">max</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>The words in the language of <span class="SimpleMath">fsa</span> of length <span class="SimpleMath">l</span> satisfying <span class="SimpleMath">min ≤ l ≤ max</span> are returned in a list. The words will either be lists of integers, for <em>simple</em> type alphabets, of lists of words in the underlying free group or monoid for alphabets of type <em>identifiers</em>.</p>
<p>The remaining <span class="SimpleMath">fsa</span> functions all call external programs from the standalone. All of them except <code class="func">DeterminizeFSA</code> (<a href="chap4.html#X7B8AF0EF79125730"><span class="RefLink">4.2-1</span></a>) take only deterministic <span class="SimpleMath">fsa</span> as input, and all of them return deterministic <span class="SimpleMath">fsa</span> as output.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DeterminizeFSA</code>( <var class="Arg">fsa</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns a deterministic <span class="SimpleMath">fsa</span> with the same language as <span class="SimpleMath">fsa</span>.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ MinimizeFSA</code>( <var class="Arg">fsa</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns a <span class="SimpleMath">fsa</span> with the same language as <span class="SimpleMath">fsa</span> and a minimal number of states.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ NotFSA</code>( <var class="Arg">fsa</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns a <span class="SimpleMath">fsa</span> with the same alphabet as <span class="SimpleMath">fsa</span> whose language is the complement of that of <span class="SimpleMath">fsa</span>.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ StarFSA</code>( <var class="Arg">fsa</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns a <span class="SimpleMath">fsa</span> whose language is <span class="SimpleMath">L^*</span>, where <span class="SimpleMath">L</span> is the language of <span class="SimpleMath">fsa</span>.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ReverseFSA</code>( <var class="Arg">fsa</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns a <span class="SimpleMath">fsa</span> whose language consists of the reversed words in the language of <span class="SimpleMath">fsa</span>.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ExistsFSA</code>( <var class="Arg">fsa</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><span class="SimpleMath">fsa</span> should be two-variable <span class="SimpleMath">fsa</span> on an alphabet <span class="SimpleMath">A</span>. An <span class="SimpleMath">fsa</span> is returned that accepts a word <span class="SimpleMath">w_1 ∈ A^*</span> if and only if there exists a word <span class="SimpleMath">w_2 ∈ A^*</span> with <span class="SimpleMath">(w_1,w_2)</span> in the language of <span class="SimpleMath">fsa</span>.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SwapCoordsFSA</code>( <var class="Arg">fsa</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><span class="SimpleMath">fsa</span> should be two-variable <span class="SimpleMath">fsa</span> on an alphabet <span class="SimpleMath">A</span>. A two-variable <span class="SimpleMath">fsa</span> on <span class="SimpleMath">A</span> is returned that accepts <span class="SimpleMath">(w_1,w_2)</span> if and only if <span class="SimpleMath">(w_2,w_1)</span> is accepted by <span class="SimpleMath">fsa</span>.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ AndFSA</code>( <var class="Arg">fsa1</var>, <var class="Arg">fsa2</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><span class="SimpleMath">fsa1</span> and <span class="SimpleMath">fsa2</span> must have the same alphabet. The returned <span class="SimpleMath">fsa</span> has language equal to the intersection of those of <span class="SimpleMath">fsa1</span> and <span class="SimpleMath">fsa2</span>.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ OrFSA</code>( <var class="Arg">fsa1</var>, <var class="Arg">fsa2</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><span class="SimpleMath">fsa1</span> and <span class="SimpleMath">fsa2</span> must have the same alphabet. The returned <span class="SimpleMath">fsa</span> has language equal to the union of those of <span class="SimpleMath">fsa1</span> and <span class="SimpleMath">fsa2</span>.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ConcatFSA</code>( <var class="Arg">fsa1</var>, <var class="Arg">fsa2</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><span class="SimpleMath">fsa1</span> and <span class="SimpleMath">fsa2</span> must have the same alphabet. The returned <span class="SimpleMath">fsa</span> accepts words of the form <span class="SimpleMath">w_1w_2</span>, where <span class="SimpleMath">w_1</span> and <span class="SimpleMath">w_2</span> are in the languages of <span class="SimpleMath">fsa1</span> and <span class="SimpleMath">fsa2</span>, respectively.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ LanguagesEqualFSA</code>( <var class="Arg">fsa1</var>, <var class="Arg">fsa2</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><span class="SimpleMath">fsa1</span> and <span class="SimpleMath">fsa2</span> must have the same alphabet. This function tests whether the languages of <span class="SimpleMath">fsa1</span> and <span class="SimpleMath">fsa2</span> are equal, and returns <code class="code">true</code> or <code class="code">false</code>.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ GrowthFSA</code>( <var class="Arg">fsa</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns the growth function of <span class="SimpleMath">fsa</span>. This is a rational function, of which the the coefficient of <span class="SimpleMath">x^n</span> in its Taylor expansion is equal to the number of words of length <span class="SimpleMath">n</span> in the accepted language of <span class="SimpleMath">fsa</span>.</p>
<p>If the coefficients in this rational function are larger than about <span class="SimpleMath">16000</span> then strange error messages will appear and <code class="code">fail</code> will be returned.</p>
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.