GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
<?xml version="1.0" encoding="ISO-8859-1"?>12<!-- $Id: schutzenberger.xml,v 0.998 Exp $ -->3<Chapter>4<Heading>User friendly ways to give semigroups and automata</Heading>5This chapter describes two Tcl/Tk graphical interfaces that can be used to6define and edit semigroups and automata.789<Section>10<Heading>11Finite automata12</Heading>13<ManSection>14<Func Arg="[A]" Name="XAutomaton" />15<Description>16The function <C> Xautomaton </C> without arguments opens a new window where17an automaton may be specified. A finite automaton (which may then be edited)18may be given as argument.19</Description>20</ManSection>21<Example><![CDATA[22gap> XAutomaton();23]]></Example>24It opens a window like the following:25<P />26<Alt Only="LaTeX">27\begin{center}28\includegraphics[width=0.4\textwidth]{images/xaut.png}29\end{center}30</Alt>31<Alt Only="HTML">32<br><center><img src="images/xaut.png"></center><br>33</Alt>34<C> Var </C> is the &GAP; name of the automaton, <C> States </C> is the35number of states, <C> Alphabet </C> represents the alphabet and may be given36through a positive integer (in this case the alphabet is understood to be <C>37a,b,c,... </C>) or through a string whose symbols, in order, being the letters38of the alphabet. The numbers corresponding to the initial39and accepting states are placed in the respective boxes. The automaton may be40specified to be deterministic, non deterministic or with epsilon41transitions. After pressing the <B> transition matrix </B> button the window42gets larger and the43transition matrix of the automaton may be given.44The <E>i</E>th row of the matrix describes the action of the45<E>i</E>th letter on the states.46<Alt Only="LaTeX">47\begin{center}48\includegraphics[width=0.4\textwidth]{images/xautoma.png}49\end{center}50</Alt>51<Alt Only="HTML">52<br><center><img src="images/xautoma.png"></center><br>53</Alt>54A non deterministic automaton may be given as follows:55<Alt Only="LaTeX">56\begin{center}57\includegraphics[width=0.4\textwidth]{images/xndAUT.png}58\end{center}59</Alt>60<Alt Only="HTML">61<br><center><img src="images/xndAUT.png"></center><br>62</Alt>63<P/>64By pressing the button <B> Ok </B> the &GAP; shell aquires the aspect shown65in the following picture and the automaton <C> ndAUT </C> may be used to do66computations. Some computations such as getting a rational expression67representing the language of the automaton, the (complete) minimal automaton68representing the same language or the transition semigroup of the automaton,69may be done directly after pressing the <B> Functions</B> button.70<Alt Only="LaTeX">71\begin{center}72\includegraphics[width=0.4\textwidth]{images/xndAUTok.png}73\end{center}74</Alt>75<Alt Only="HTML">76<br><center><img src="images/xndAUTok.png"></center><br>77</Alt>78<P/>79By pressing the button <B> View </B> an image representing the automaton is80displayed in a new window.81<Alt Only="LaTeX">82\begin{center}83\includegraphics[width=0.4\textwidth]{images/ndAutImage.png}84\end{center}85</Alt>86<Alt Only="HTML">87<br><center><img src="images/ndAutImage.png"></center><br>88</Alt>89An automaton with epsilon transitions may be given as follows shown in the90following picture. The last letter of the alphabet is always considered to be91the <M> \epsilon</M>. In the images it is represented by @.92<Alt Only="LaTeX">93\begin{center}94\includegraphics[width=0.4\textwidth]{images/EpsTrAut.png}95\end{center}96</Alt>97<Alt Only="HTML">98<br><center><img src="images/EpsTrAut.png"></center><br>99</Alt>100<P/>101A new window with an image representing the automaton may be obtained by pressing the button <B> View </B>.102<Alt Only="LaTeX">103\begin{center}104\includegraphics[width=0.4\textwidth]{images/EpsTrAutImage.png}105\end{center}106</Alt>107<Alt Only="HTML">108<br><center><img src="images/EpsTrAutImage.png"></center><br>109</Alt>110111<P/>112In the next example it is given an argument to the function <C>XAutomaton</C>.113<Example><![CDATA[114gap> A := RandomAutomaton("det",2,2);115< deterministic automaton on 2 letters with 2 states >116gap> XAutomaton(A);117]]></Example>118It opens a window like the following:119<P />120<Alt Only="LaTeX">121\begin{center}122\includegraphics[width=0.4\textwidth]{images/xautgiven.png}123\end{center}124</Alt>125<Alt Only="HTML">126<br><center><img src="images/xautgiven.png"></center><br>127</Alt>128129</Section>130<Section>131<Heading> Finite semigroups </Heading>132The most common ways to give a semigroup to are through generators and133relations, a set of (partial) transformations as generating set and as134syntactic semigroups of automata or rational languages.135<ManSection>136<Func Arg="[S]" Name="XSemigroup" />137<Description>138The function <C> XSemigroup </C> without arguments opens a new window where139a semigroup (or monoid) may be specified. A finite semigroup (which may then be edited) may be given as argument.140</Description>141</ManSection>142<Example><![CDATA[143gap> XSemigroup();144]]></Example>145It opens a window like the following:146<Alt Only="LaTeX">147\begin{center}148\includegraphics[width=0.4\textwidth]{images/xsgp.png}149\end{center}150</Alt>151<Alt Only="HTML">152<br><center><img src="images/xsgp.png"></center><br>153</Alt>154where one may choose how to give the semigroup.155156<Subsection>157<Heading>158Semigroups given through generators and relations159</Heading>160In the window opened by <C>XSemigroup</C>, by pressing the button161<B>Proceed</B> the window should enlarge and have the following aspect.162(If the window does not enlarge automatically, use the mouse to do it.)163164<P />165<Alt Only="LaTeX">166\begin{center}167\includegraphics[width=0.4\textwidth]{images/xb211.png}168\end{center}169</Alt>170<Alt Only="HTML">171<br><center><img src="images/xb211.png"></center><br>172</Alt>173<C> GAP variable </C> is the &GAP; name of the semigroup. One has then to specify the174number of generators, the number of relations (which does not to be exact)175and whether one wants to produce a monoid or a semigroup.176Pressing the <B>Proceed</B> button one gets:177<Alt Only="LaTeX">178\begin{center}179\includegraphics[width=0.4\textwidth]{images/xb212.png}180\end{center}181</Alt>182<Alt Only="HTML">183<br><center><img src="images/xb212.png"></center><br>184</Alt>185186<Alt Only="LaTeX">187\begin{center}188\includegraphics[width=0.4\textwidth]{images/xb21.png}189\end{center}190</Alt>191<Alt Only="HTML">192<br><center><img src="images/xb21.png"></center><br>193194When giving the relations, the usual abbreviations "0" and "1" may be used.195<P/>196Pressing the <B>Done</B> button would output the following to the shell where <Package>GAP</Package>197is running:198</Alt>199<Alt Only="LaTeX">200\begin{center}201\includegraphics[width=0.4\textwidth]{images/gapb21.png}202\end{center}203</Alt>204<Alt Only="HTML">205<br><center><img src="images/gapb21.png"></center><br>206</Alt>207<Alt Only="LaTeX">208<P/>209The menu button <B>Functions</B> has the following commands:210\begin{center}211\includegraphics[width=0.4\textwidth]{images/funcsind.png}212\includegraphics[width=0.4\textwidth]{images/funcsmenu.png}213\end{center}214215The interface allows to add and remove &GAP; functions to the menu. When216adding a function, the name of the function should be provided.217(In its current version, it works only with functions that have218as only argument a semigroup.)219220<P/>221222By pressing the menu button <B>Functions</B> and selecting "Draw Schutzenberger Graphs" would223pop up the following window:224\begin{center}225\includegraphics[width=0.4\textwidth]{images/ShuzenbergerGraphb21.png}226\end{center}227</Alt>228229<Alt Only="HTML">230<P/>231The menu button <B>Functions</B> has the following commands:232<br><center>233<img src="images/funcsind.png">234<img src="images/funcsmenu.png">235</center><br>236237The interface allows to add and remove &GAP; functions to the menu. When238adding a function, the name of the function should be provided.239(In its current version, it works only with functions that have240as only argument a semigroup.)241242<P/>243244By pressing the menu button <B>Functions</B> and selecting "Draw Schutzenberger Graphs" would245pop up the following window:246<br><center><img src="images/ShuzenbergerGraphb21.png"></center><br>247</Alt>248249<Alt Only="LaTeX">250\begin{center}251\includegraphics[width=0.4\textwidth]{images/CayleyGraphb21.png}252\end{center}253</Alt>254<Alt Only="HTML">255By pressing the menu button <B>Functions</B> and selecting "Draw Cayley Graph" would256pop up the following window:257258<br><center><img src="images/CayleyGraphb21.png"></center><br>259</Alt>260261<Alt Only="LaTeX">262\begin{center}263\includegraphics[width=0.4\textwidth]{images/DClassesb21.png}264\end{center}265</Alt>266<Alt Only="HTML">267By pressing the menu button <B>Functions</B> and selecting "Draw D-Classes" would268pop up the following window:269270<br><center><img src="images/DClassesb21.png"></center><br>271</Alt>272</Subsection>273274<Subsection>275<Heading>276Semigroups given by partial transformations277</Heading>278279<Code>XSemigroup(poi3);</Code> would pop up the following window, where everything should be clear:280281<Alt Only="LaTeX">282\begin{center}283\includegraphics[width=0.4\textwidth]{images/Xsemigroup1.png}284\end{center}285</Alt>286<Alt Only="HTML">287<br><center><img src="images/Xsemigroup1.png"></center><br>288</Alt>289290291</Subsection>292293294<Subsection>295<Heading>296Syntatic semigroups297</Heading>298299<Code>XSemigroup();</Code> would pop up the following window, where we would select "Syntatic semigroup",300press the <B>Proceed</B> button and then choose either to give a "Rational expression" or an "Automaton"301by pressing one of those buttons:302303<Alt Only="LaTeX">304\begin{center}305\includegraphics[width=0.4\textwidth]{images/Xsemigroup2.png}306\end{center}307</Alt>308<Alt Only="HTML">309<br><center><img src="images/Xsemigroup2.png"></center><br>310</Alt>311312If "Rational expression" is chosen, a new window pops up where the expression can be specified:313<Alt Only="LaTeX">314\begin{center}315\includegraphics[width=0.4\textwidth]{images/regexp.png}316\end{center}317</Alt>318<Alt Only="HTML">319<br><center><img src="images/regexp.png"></center><br>320</Alt>321322After pressing the <B>Ok</B> button, notice that the menu button <B>Functions</B>323appears on the main window (lower right corner) meaning that <Package>GAP</Package>324already recognizes the given semigroup:325<Alt Only="LaTeX">326\begin{center}327\includegraphics[width=0.4\textwidth]{images/regexp2.png}328\end{center}329</Alt>330<Alt Only="HTML">331<br><center><img src="images/regexp2.png"></center><br>332</Alt>333334335</Subsection>336337338339</Section>340341</Chapter>342343344