<?xml version=
"1.0" encoding=
"UTF-8"?>
<!
DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<
html xmlns=
"http://www.w3.org/1999/xhtml" xml:lang=
"en">
<
head>
<
title>GAP (Automata) - Chapter
6: Finite regular languages</
title>
<
meta http-equiv=
"content-type" content=
"text/html; charset=UTF-8" />
<
meta name=
"generator" content=
"GAPDoc2HTML" />
<
link rel=
"stylesheet" type=
"text/css" href=
"manual.css" />
<
script src=
"manual.js" type=
"text/javascript"></
script>
<
script type=
"text/javascript">overwriteStyle();</
script>
</
head>
<
body class=
"chap6" onload=
"jscontent()">
<
div class=
"chlinktop"><
span class=
"chlink1">Goto Chapter: </
span><
a href=
"chap0.html">Top</
a> <
a href="chap1.html">1</a> <a href="chap2.html">2</a> <a href="chap3.html">3</a> <a href="chap4.html">4</a> <a href="chap5.html">5</a> <a href="chap6.html">6</a> <a href="chapA.html">A</a> <a href="chapB.html">B</a> <a href="chapC.html">C</a> <a href="chapBib.html">Bib</a> <a href="chapInd.html">Ind</a> </div>
<div class="chlinkprevnexttop"> <a href="chap0.html">[Top of Book]</a> <a href="chap0.html#contents">[Contents]</a> <a href="chap5.html">[Previous Chapter]</a> <a href="chapA.html">[Next Chapter]</a> </div>
<p id="mathjaxlink" class="pcenter"><a href="chap6_mj.html">[MathJax on]</a></p>
<p><a id="X7AF3E5D081126EBD" name="X7AF3E5D081126EBD"></a></p>
<div class="ChapSects"><a href="chap6.html#X7AF3E5D081126EBD">6 <span class="Heading">Finite regular languages</span></a>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap6.html#X85643AEB7E7FB39A">6.1 <span class="Heading">Dealing with finite regular languages</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6.html#X82971FC2851B7B30">6.1-1 IsFiniteRegularLanguage</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6.html#X7E48CD3E78277FF7">6.1-2 FiniteRegularLanguageToListOfWords</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6.html#X7F9C5C6F815773E6">6.1-3 ListOfWordsToAutomaton</a></span>
</div></div>
</div>
<h3>6 <span class="Heading">Finite regular languages</span></h3>
<p>This chapter describes some functions to deal with finite regular languages.</p>
<p><a id="X85643AEB7E7FB39A" name="X85643AEB7E7FB39A"></a></p>
<h4>6.1 <span class="Heading">Dealing with finite regular languages</span></h4>
<p><a id="X82971FC2851B7B30" name="X82971FC2851B7B30"></a></p>
<h5>6.1-1 IsFiniteRegularLanguage</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; IsFiniteRegularLanguage</code>( <var class="Arg">L</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><var class="Arg">L</var> is an automaton or a rational expression. This function tests whether its argument represents a finite language or not.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">r:=RationalExpression("b*(aU@)");;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsFiniteRegularLanguage(last);</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">r:=RationalExpression("aUbU@");;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsFiniteRegularLanguage(last);</span>
true
</pre></div>
<p><a id="X7E48CD3E78277FF7" name="X7E48CD3E78277FF7"></a></p>
<h5>6.1-2 FiniteRegularLanguageToListOfWords</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; FiniteRegularLanguageToListOfWords</code>( <var class="Arg">L</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><var class="Arg">L</var> is an automaton or a rational expression. This function outputs the recognized language as a list of words.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">r:=RationalExpression("aaUx(aUb)"); </span>
aaUx(aUb)
<span class="GAPprompt">gap></span> <span class="GAPinput"> FiniteRegularLanguageToListOfWords(r);</span>
[ "aa", "xa", "xb" ]
</pre></div>
<p><a id="X7F9C5C6F815773E6" name="X7F9C5C6F815773E6"></a></p>
<h5>6.1-3 ListOfWordsToAutomaton</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; ListOfWordsToAutomaton</code>( <var class="Arg">alph</var>, <var class="Arg">L</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Given an alphabet <var class="Arg">alph</var> (a list) and a list of words <var class="Arg">L</var> (a list of lists), outputs an automaton that recognizes the given list of words.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">ListOfWordsToAutomaton("ab",["aaa","bba",""]);</span>
< deterministic automaton on 2 letters with 6 states >
<span class="GAPprompt">gap></span> <span class="GAPinput">FAtoRatExp(last);</span>
(bbUaa)aU@
</pre></div>
<div class="chlinkprevnextbot"> <a href="chap0.html">[Top of Book]</a> <a href="chap0.html#contents">[Contents]</a> <a href="chap5.html">[Previous Chapter]</a> <a href="chapA.html">[Next Chapter]</a> </div>
<div class="chlinkbot"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a> <a href="chap1.html">1</a> <a href="chap2.html">2</a> <a href="chap3.html">3</a> <a href="chap4.html">4</a> <a href="chap5.html">5</a> <a href="chap6.html">6</a> <a href="chapA.html">A</a> <a href="chapB.html">B</a> <a href="chapC.html">C</a> <a href="chapBib.html">Bib</a> <a href="chapInd.html">Ind</a> </div>
<hr />
<p class="foot">generated by <a href="https://www.math.rwth-aachen.de/~Frank.Luebeck/GAPDoc">GAPDoc2HTML</a></p>
</body>
</html>
¤ Dauer der Verarbeitung: 0.4 Sekunden
¤
*© Formatika GbR, Deutschland