% generated by GAPDoc2LaTeX from XML source (Frank Luebeck) \documentclass[a4paper,11pt]{report} \usepackage{a4wide} \sloppy \pagestyle{myheadings} \usepackage{amssymb} \usepackage[latin1]{inputenc} \usepackage{makeidx} \makeindex \usepackage{color} \definecolor{DarkOlive}{rgb}{0.1047,0.2412,0.0064} \definecolor{FireBrick}{rgb}{0.5812,0.0074,0.0083} \definecolor{RoyalBlue}{rgb}{0.0236,0.0894,0.6179} \definecolor{RoyalGreen}{rgb}{0.0236,0.6179,0.0894} \definecolor{RoyalRed}{rgb}{0.6179,0.0236,0.0894} \definecolor{LightBlue}{rgb}{0.8544,0.9511,1.0000} \definecolor{Black}{rgb}{0.0,0.0,0.0} \definecolor{FuncColor}{rgb}{1.0,0.0,0.0} %% strange name because of pdflatex bug: \definecolor{Chapter }{rgb}{0.0,0.0,1.0} \usepackage{fancyvrb} \usepackage{graphicx} \usepackage{pslatex} \usepackage[pdftex=true, a4paper=true,bookmarks=false,pdftitle={Written with GAPDoc}, pdfcreator={LaTeX with hyperref package / GAPDoc}, colorlinks=true,backref=page,breaklinks=true,linkcolor=RoyalBlue, citecolor=RoyalGreen,filecolor=RoyalRed, urlcolor=RoyalRed,pagecolor=RoyalBlue]{hyperref} % write page numbers to a .pnr log file for online help \newwrite\pagenrlog \immediate\openout\pagenrlog =\jobname.pnr \immediate\write\pagenrlog{PAGENRS := [} \newcommand{\logpage}[1]{\protect\write\pagenrlog{#1, \thepage,}} %% were never documented, give conflicts with some additional packages \newcommand{\GAP}{\textsf{GAP}} \begin{document} \logpage{[ 0, 0, 0 ]} \begin{titlepage} \begin{center}{\Huge \textbf{Semigroup visualization\mbox{}}}\\[1cm] \hypersetup{pdftitle=Semigroup visualization} \markright{\scriptsize \mbox{}\hfill Semigroup visualization \hfill\mbox{}} {( Version 0.998 ) \mbox{}}\\[1cm] \mbox{}\\[2cm] {\large \textbf{ Manuel Delgado \mbox{}}}\\ {\large \textbf{ Jos{\a'e} Jo{\~a}o Morais \mbox{}}}\\ \hypersetup{pdfauthor= Manuel Delgado ; Jos{\a'e} Jo{\~a}o Morais } \end{center}\vfill \mbox{}\\ {\mbox{}\\ \small \noindent \textbf{ Manuel Delgado } --- Email: \href{mailto://mdelgado@fc.up.pt} {\texttt{mdelgado@fc.up.pt}}\\ --- Homepage: \href{http://www.fc.up.pt/cmup/mdelgado} {\texttt{http://www.fc.up.pt/cmup/mdelgado}}}\\ {\mbox{}\\ \small \noindent \textbf{ Jos{\a'e} Jo{\~a}o Morais } --- Email: \href{mailto://josejoao@fc.up.pt} {\texttt{josejoao@fc.up.pt}}}\\ \end{titlepage} \newpage\setcounter{page}{2} {\small \section*{Copyright} \logpage{[ 0, 0, 1 ]} {\copyright} 2005 by Manuel Delgado and Jos{\a'e} Jo{\~a}o Morais We adopt the copyright regulations of \textsf{GAP} as detailed in the copyright notice in the \textsf{GAP} manual. \mbox{}}\\[1cm] {\small \section*{Acknowledgements} \logpage{[ 0, 0, 3 ]} The first author aknowledges financial support of FCT, through the \emph{Centro de Matem{\a'a}tica da Universidade do Porto}. The second author acknowledges financial support of FCT and the POCTI program through a scholarship given by \emph{Centro de Matem{\a'a}tica da Universidade do Porto}. Both authors acknowledge Jorge Almeida, V{\a'\i}tor H. Fernandes and Pedro Silva for many helpfull discussions and comments. \mbox{}}\\[1cm] {\small \section*{Colophon} \logpage{[ 0, 0, 2 ]} Bug reports, suggestions and comments are, of course, welcome. Please use the email address \href{mailto://mdelgado@fc.up.pt} {\texttt{mdelgado@fc.up.pt}} or \href{mailto://josejoao@fc.up.pt} {\texttt{josejoao@fc.up.pt}} to this effect. \mbox{}}\\[1cm] \newpage \def\contentsname{Contents\logpage{[ 0, 0, 4 ]}} \tableofcontents \newpage \chapter{\textcolor{Chapter }{ Introduction }}\logpage{[ 1, 0, 0 ]} \hyperdef{L}{X7DFB63A97E67C0A1}{} { The aim of this package is to turn \textsf{ GAP } more user-friendly, at least for semigroup theorists. It requires the usage of external programs as is the case of \texttt{graphviz} \cite{KoutsofiosNorth:2002}, a software for drawing graphs developed at AT \& T Labs, that can be obtained at \href{http://www.graphviz.org/} {\texttt{http://www.graphviz.org/}}. It is used not only to draw right Cayley graphs of finite semigroups and Sch\texttt{\symbol{123}}\texttt{\symbol{92}}"u\texttt{\symbol{125}}zenberger graphs of finite inverse semigroups but also to visualize in the usual way the egg-box picture of a D-classe of a finite semigroup. \ \\ \ \\ \textsc{Important note}: The version of \texttt{graphviz} to install should be greater or equal to 1.16. \ \\ \ \\ Tcl/Tk should also be available in order to run the graphical interfaces (XAutomaton and XSemigroup) used to specify automata and semigroups. } \chapter{\textcolor{Chapter }{Basics}}\logpage{[ 2, 0, 0 ]} \hyperdef{L}{X868F7BAB7AC2EEBC}{} { We give some examples of semigroups to be used later. We also describe some basic functions that are not directly available from \textsf{GAP}, but are useful for the purposes of this package. \section{\textcolor{Chapter }{Examples }}\logpage{[ 2, 1, 0 ]} \hyperdef{L}{X7A489A5D79DA9E5C}{} { These are some examples of semigroups that will be used through this manual \begin{Verbatim}[fontsize=\small,frame=single,label=Example] gap> f := FreeMonoid("a","b"); <free monoid on the generators [ a, b ]> gap> a := GeneratorsOfMonoid( f )[ 1 ];; gap> b := GeneratorsOfMonoid( f )[ 2 ];; gap> r:=[[a^3,a^2], > [a^2*b,a^2], > [b*a^2,a^2], > [b^2,a^2], > [a*b*a,a], > [b*a*b,b] ]; [ [ a^3, a^2 ], [ a^2*b, a^2 ], [ b*a^2, a^2 ], [ b^2, a^2 ], [ a*b*a, a ], [ b*a*b, b ] ] gap> b21:= f/r; <fp semigroup on the generators [<identity ... >, a, b ]> \end{Verbatim} \begin{Verbatim}[fontsize=\small,frame=single,label=Example] gap> f := FreeSemigroup("a","b"); <free semigroup on the generators [ a, b ]> gap> a := GeneratorsOfSemigroup( f )[ 1 ];; gap> b := GeneratorsOfSemigroup( f )[ 2 ];; gap> r:=[[a^3,a^2], > [a^2*b,a^2], > [b*a^2,a^2], > [b^2,a^2], > [a*b*a,a], > [b*a*b,b] ]; [ [ a^3, a^2 ], [ a^2*b, a^2 ], [ b*a^2, a^2 ], [ b^2, a^2 ], [ a*b*a, a ], [ b*a*b, b ] ] gap> b2:= f/r; <fp semigroup on the generators [ a, b ]> \end{Verbatim} \begin{Verbatim}[fontsize=\small,frame=single,label=Example] gap> g0:=Transformation([4,1,2,4]);; gap> g1:=Transformation([1,3,4,4]);; gap> g2:=Transformation([2,4,3,4]);; gap> poi3:= Monoid(g0,g1,g2); <monoid with 3 generators> \end{Verbatim} } \section{\textcolor{Chapter }{Some attributes}}\logpage{[ 2, 2, 0 ]} \hyperdef{L}{X85134313846D1A8A}{} { These functions are semigroup attributes that get stored once computed. \subsection{\textcolor{Chapter }{HasCommutingIdempotents}} \logpage{[ 2, 2, 1 ]}\nobreak \hyperdef{L}{X7F7FAED380682973}{} {\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{HasCommutingIdempotents({\slshape M})\index{HasCommutingIdempotents@\texttt{HasCommutingIdempotents}} \label{HasCommutingIdempotents} }\hfill{\scriptsize (attribute)}}\\ Tests whether the idempotents of the semigroup \mbox{\texttt{\slshape M }}commute. } \subsection{\textcolor{Chapter }{IsInverseSemigroup}} \logpage{[ 2, 2, 2 ]}\nobreak \hyperdef{L}{X83F1529479D56665}{} {\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsInverseSemigroup({\slshape S})\index{IsInverseSemigroup@\texttt{IsInverseSemigroup}} \label{IsInverseSemigroup} }\hfill{\scriptsize (attribute)}}\\ Tests whether a finite semigroup \mbox{\texttt{\slshape S }}is inverse. It is well-known that it suffices to test whether the idempotents of \mbox{\texttt{\slshape S }}commute and \mbox{\texttt{\slshape S }}is regular. The function \texttt{IsRegularSemigroup }is part of \textsf{GAP}. } } \section{\textcolor{Chapter }{Some basic functions}}\logpage{[ 2, 3, 0 ]} \hyperdef{L}{X78CA2A0D869C51DC}{} { \subsection{\textcolor{Chapter }{PartialTransformation}} \logpage{[ 2, 3, 1 ]}\nobreak \hyperdef{L}{X7A65787A83C0F8EF}{} {\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{PartialTransformation({\slshape L})\index{PartialTransformation@\texttt{PartialTransformation}} \label{PartialTransformation} }\hfill{\scriptsize (function)}}\\ A partial transformation is a partial function of a set of integers of the form \texttt{\symbol{123}}1, ..., n\texttt{\symbol{125}}. It is given by means of the list of images \mbox{\texttt{\slshape L}}. When an element has no image, we write 0. Returns a full transformation on a set with one more element that acts like a zero.} \begin{Verbatim}[fontsize=\small,frame=single,label=Example] gap> PartialTransformation([2,0,4,0]); Transformation( [ 2, 5, 4, 5, 5 ] ) \end{Verbatim} \subsection{\textcolor{Chapter }{ReduceNumberOfGenerators}} \logpage{[ 2, 3, 2 ]}\nobreak \hyperdef{L}{X7EEED52C7D38E1CA}{} {\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{ReduceNumberOfGenerators({\slshape L})\index{ReduceNumberOfGenerators@\texttt{ReduceNumberOfGenerators}} \label{ReduceNumberOfGenerators} }\hfill{\scriptsize (function)}}\\ Given a subset \mbox{\texttt{\slshape L}} of the generators of a semigroup, returns a list of generators of the same semigroup but possibly with less elements than \mbox{\texttt{\slshape L}}.} \subsection{\textcolor{Chapter }{SemigroupFactorization}} \logpage{[ 2, 3, 3 ]}\nobreak \hyperdef{L}{X7BBEBEE885D05208}{} {\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{SemigroupFactorization({\slshape SL})\index{SemigroupFactorization@\texttt{SemigroupFactorization}} \label{SemigroupFactorization} }\hfill{\scriptsize (function)}}\\ \mbox{\texttt{\slshape L}} is an element (or list of elements) of the semigroup \mbox{\texttt{\slshape S}}. Returns a minimal factorization on the generators of \mbox{\texttt{\slshape S}} of the element(s) of \mbox{\texttt{\slshape L}}. Works only for transformation semigroups.} \begin{Verbatim}[fontsize=\small,frame=single,label=Example] gap> el1 := Transformation( [ 2, 3, 4, 4 ] );; gap> el2 := Transformation( [ 2, 4, 3, 4 ] );; gap> f1 := SemigroupFactorization(poi3,el1); [ [ Transformation( [ 1, 3, 4, 4 ] ), Transformation( [ 2, 4, 3, 4 ] ) ] ] gap> f1[1][1] * f1[1][2] = el1; true gap> SemigroupFactorization(poi3,[el1,el2]); [ [ Transformation( [ 1, 3, 4, 4 ] ), Transformation( [ 2, 4, 3, 4 ] ) ], [ Transformation( [ 2, 4, 3, 4 ] ) ] ] \end{Verbatim} \subsection{\textcolor{Chapter }{GrahamBlocks}} \logpage{[ 2, 3, 4 ]}\nobreak \hyperdef{L}{X7FB7633483A45209}{} {\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{GrahamBlocks({\slshape mat})\index{GrahamBlocks@\texttt{GrahamBlocks}} \label{GrahamBlocks} }\hfill{\scriptsize (function)}}\\ \mbox{\texttt{\slshape mat}} is a matrix as displayed by \texttt{DisplayEggBoxOfDClass(D);} of a regular D-class \texttt{D}. This function outputs a list \texttt{[gmat, phi]} where \texttt{gmat} is \mbox{\texttt{\slshape mat}} in Graham's blocks form and \texttt{phi} maps H-classes of \texttt{gmat} to the corresponding ones of \mbox{\texttt{\slshape mat}}, i.e., \texttt{phi[i][j] = [i',j']} where \texttt{mat[i'][j'] = gmat[i][j]}. If the argument to this function is not a matrix corresponding to a regular D-class, the function may abort in error. } \begin{Verbatim}[fontsize=\small,frame=single,label=Example] gap> p1 := PartialTransformation([6,2,0,0,2,6,0,0,10,10,0,0]);; gap> p2 := PartialTransformation([0,0,1,5,0,0,5,9,0,0,9,1]);; gap> p3 := PartialTransformation([0,0,3,3,0,0,7,7,0,0,11,11]);; gap> p4 := PartialTransformation([4,4,0,0,8,8,0,0,12,12,0,0]);; gap> css3:=Semigroup(p1,p2,p3,p4); <semigroup with 4 generators> gap> el := Elements(css3)[8];; gap> D := GreensDClassOfElement(css3, el);; gap> IsRegularDClass(D); true gap> DisplayEggBoxOfDClass(D); [ [ 1, 0, 1, 0 ], [ 0, 1, 0, 1 ], [ 0, 1, 0, 1 ], [ 1, 0, 1, 0 ] ] gap> mat := [ [ 1, 0, 1, 0 ], > [ 0, 1, 0, 1 ], > [ 0, 1, 0, 1 ], > [ 1, 0, 1, 0 ] ];; gap> res := GrahamBlocks(mat);; gap> PrintArray(res[1]); [ [ 1, 1, 0, 0 ], [ 1, 1, 0, 0 ], [ 0, 0, 1, 1 ], [ 0, 0, 1, 1 ] ] gap> PrintArray(res[2]); [ [ [ 1, 1 ], [ 1, 3 ], [ 1, 2 ], [ 1, 4 ] ], [ [ 4, 1 ], [ 4, 3 ], [ 4, 2 ], [ 4, 4 ] ], [ [ 2, 1 ], [ 2, 3 ], [ 2, 2 ], [ 2, 4 ] ], [ [ 3, 1 ], [ 3, 3 ], [ 3, 2 ], [ 3, 4 ] ] ] \end{Verbatim} } \section{\textcolor{Chapter }{Cayley graphs}}\logpage{[ 2, 4, 0 ]} \hyperdef{L}{X789D5E5A8558AA07}{} { \subsection{\textcolor{Chapter }{RightCayleyGraphAsAutomaton}} \logpage{[ 2, 4, 1 ]}\nobreak \hyperdef{L}{X822983CD7F01B5EA}{} {\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{RightCayleyGraphAsAutomaton({\slshape S})\index{RightCayleyGraphAsAutomaton@\texttt{RightCayleyGraphAsAutomaton}} \label{RightCayleyGraphAsAutomaton} }\hfill{\scriptsize (function)}}\\ Computes the right Cayley graph of a finite monoid or semigroup \mbox{\texttt{\slshape S}}. It uses the \textsf{GAP} buit-in function \texttt{CayleyGraphSemigroup} to compute the Cayley Graph and returns it as an automaton without initial nor final states. (In this automaton state \texttt{i} represents the element \texttt{Elements(S)[i]}.) The \textsf{Automata} package is used to this effect. } \begin{Verbatim}[fontsize=\small,frame=single,label=Example] gap> rcg := RightCayleyGraphAsAutomaton(b21); < deterministic automaton on 2 letters with 6 states > gap> Display(rcg); | 1 2 3 4 5 6 ----------------------- a | 2 4 6 4 2 4 b | 3 5 4 4 4 3 Initial state: [ ] Accepting state: [ ] \end{Verbatim} \subsection{\textcolor{Chapter }{RightCayleyGraphMonoidAsAutomaton}} \logpage{[ 2, 4, 2 ]}\nobreak \hyperdef{L}{X82F7D3E485D615D8}{} {\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{RightCayleyGraphMonoidAsAutomaton({\slshape S})\index{RightCayleyGraphMonoidAsAutomaton@\texttt{RightCayleyGraphMonoidAsAutomaton}} \label{RightCayleyGraphMonoidAsAutomaton} }\hfill{\scriptsize (function)}}\\ This function is a synonym of \texttt{RightCayleyGraphAsAutomaton} (\ref{RightCayleyGraphAsAutomaton}). } } } \chapter{\textcolor{Chapter }{ Drawings of semigroups }}\logpage{[ 3, 0, 0 ]} \hyperdef{L}{X826F747F81441D2E}{} { There are some pictures that may give a lot of information about a semigroup. This is the case of the egg-box picture of the D-classes, the right Cayley graph of a finite monoid and the Schutzenberger graphs of a finite inverse monoid. \section{\textcolor{Chapter }{ Drawing the D-class of an element of a semigroup }}\logpage{[ 3, 1, 0 ]} \hyperdef{L}{X7F71117D7F0259B8}{} { \subsection{\textcolor{Chapter }{DrawDClassOfElement}} \logpage{[ 3, 1, 1 ]}\nobreak \hyperdef{L}{X87448A11856B0F2D}{} {\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{DrawDClassOfElement({\slshape arg})\index{DrawDClassOfElement@\texttt{DrawDClassOfElement}} \label{DrawDClassOfElement} }\hfill{\scriptsize (function)}}\\ This function takes as arguments a semigroup followed by a transformation which is the element whose D-class will be drawn. Optionally we can then specify n lists of elements and the elements of each list will be drawn in different colours. Finally, we may specify a string name the file that will be used to write the drawing of the class (in PostScript format) and if the last argument is the integer \texttt{1} then the elements will appear as transformations, otherwise they will appear as words. The idempotents will be marked with a * before them. This last optional argument may also be the integer \texttt{2} and in this case the elements will appear as integers, where \texttt{i} represents the element \texttt{Elements(S)[i]}. } \begin{Verbatim}[fontsize=\small,frame=single,label=Example] gap> DrawDClassOfElement(poi3, Transformation([1,4,3,4])); gap> DrawDClassOfElement(poi3, Transformation([1,4,3,4]),1); gap> DrawDClassOfElement(poi3, Transformation([1,4,3,4]), [Transformation( [ 2, 3, 4, 4 ] )],1); gap> DrawDClassOfElement(poi3, Transformation([1,4,3,4]), [Transformation( [ 2, 3, 4, 4 ] ), Transformation( [ 2, 4, 3, 4 ] )], [Transformation( [ 2, 4, 3, 4 ] )],1); gap> DrawDClassOfElement(poi3, Transformation([1,4,3,4]), [Transformation( [ 2, 4, 3, 4 ] )],"Dclass",1); \end{Verbatim} } \section{\textcolor{Chapter }{ Drawing the D-classes of a semigroup }}\logpage{[ 3, 2, 0 ]} \hyperdef{L}{X81CCF2BB81C4DF6F}{} { \subsection{\textcolor{Chapter }{DrawDClasses}} \logpage{[ 3, 2, 1 ]}\nobreak \hyperdef{L}{X7BDBEDA37ADCAADE}{} {\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{DrawDClasses({\slshape arg})\index{DrawDClasses@\texttt{DrawDClasses}} \label{DrawDClasses} }\hfill{\scriptsize (function)}}\\ This function is similar to the previous one, except that this one draws all the D-classes of the semigroup given as the first argument. It then takes optionally n lists of elements and the elements of each list will be drawn in different colours. It also accepts a string specifying the name of the file in which the drawing will be written and the last, optional, argument, the integer \texttt{1}, to specify whether the elements will appear as words or as transformations as in the previous function. The idempotents will be marked with a * before them. This last optional argument may also be the integer \texttt{2} and in this case the elements will appear as integers, where \texttt{i} represents the element \texttt{Elements(S)[i]}. } \begin{Verbatim}[fontsize=\small,frame=single,label=Example] gap> DrawDClasses(poi3,"DClasses"); gap> DrawDClasses(poi3, [Transformation( [ 2, 3, 4, 4 ] ), Transformation( [ 2, 4, 3, 4 ] )], [Transformation( [ 2, 4, 3, 4 ] )],1); \end{Verbatim} } \section{\textcolor{Chapter }{Cayley graphs}}\logpage{[ 3, 3, 0 ]} \hyperdef{L}{X789D5E5A8558AA07}{} { \subsection{\textcolor{Chapter }{DrawRightCayleyGraph}} \logpage{[ 3, 3, 1 ]}\nobreak \hyperdef{L}{X7EB36DB07C6F58A0}{} {\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{DrawRightCayleyGraph({\slshape S})\index{DrawRightCayleyGraph@\texttt{DrawRightCayleyGraph}} \label{DrawRightCayleyGraph} }\hfill{\scriptsize (function)}}\\ Draws the right Cayley graph of a finite monoid or semigroup \mbox{\texttt{\slshape S}}. } \subsection{\textcolor{Chapter }{DrawCayleyGraph}} \logpage{[ 3, 3, 2 ]}\nobreak \hyperdef{L}{X86798CC9823D1DB2}{} {\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{DrawCayleyGraph({\slshape S})\index{DrawCayleyGraph@\texttt{DrawCayleyGraph}} \label{DrawCayleyGraph} }\hfill{\scriptsize (function)}}\\ This function is a synonym of \texttt{DrawRightCayleyGraph} (\ref{DrawRightCayleyGraph}). } For example, the command \texttt{DrawCayleyGraph(b21);} would produce the following image (where state \texttt{i} represents the element \texttt{Elements(S)[i]}, the neutral element is colored in "light blue" and all other idempotents are colored in "light coral"): } \section{\textcolor{Chapter }{Schutzenberger graphs}}\logpage{[ 3, 4, 0 ]} \hyperdef{L}{X8641B3A6846AAFB5}{} { \subsection{\textcolor{Chapter }{DrawSchutzenbergerGraphs}} \logpage{[ 3, 4, 1 ]}\nobreak \hyperdef{L}{X7B7B58B77EA25719}{} {\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{DrawSchutzenbergerGraphs({\slshape S})\index{DrawSchutzenbergerGraphs@\texttt{DrawSchutzenbergerGraphs}} \label{DrawSchutzenbergerGraphs} }\hfill{\scriptsize (function)}}\\ Draws the Schutzenberger graphs of the inverse semigroup \mbox{\texttt{\slshape S}}.} For example, \texttt{DrawSchutzenbergerGraphs(poi3);} would produce the following: } \section{\textcolor{Chapter }{Drawings output formats}}\label{Drawings_output_formats} \logpage{[ 3, 5, 0 ]} \hyperdef{L}{X7F5419527FFCD1DF}{} { By default, when a drawing is requested, it is outputted in PostScript format. Since \texttt{graphviz} allows other output formats (see \href{http://www.graphviz.org/doc/info/output.html} {\texttt{http://www.graphviz.org/doc/info/output.html}}), it is possible to also request a drawing in a format other than PostScript. \subsection{\textcolor{Chapter }{DrawingsListOfExtraFormats}} \logpage{[ 3, 5, 1 ]}\nobreak \hyperdef{L}{X844AA65E815BCFDF}{} {\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{DrawingsListOfExtraFormats\index{DrawingsListOfExtraFormats@\texttt{DrawingsListOfExtraFormats}} \label{DrawingsListOfExtraFormats} }\hfill{\scriptsize (global variable)}}\\ This is a global variable which holds the valid output formats for a drawing. It currently has the value: \texttt{["dia", "fig", "gd", "gd2", "gif", "hpgl", "jpg", "mif", "mp", "pcl", "pic", "plain", "plain-ext", "png", "ps", "ps2", "svg", "svgz", "vrml", "vtx", "wbmp", "none"]} (see \href{http://www.graphviz.org/doc/info/output.html} {\texttt{http://www.graphviz.org/doc/info/output.html}} for their description). } \subsection{\textcolor{Chapter }{DrawingsExtraFormat}} \logpage{[ 3, 5, 2 ]}\nobreak \hyperdef{L}{X7CE046CE786F76D5}{} {\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{DrawingsExtraFormat\index{DrawingsExtraFormat@\texttt{DrawingsExtraFormat}} \label{DrawingsExtraFormat} }\hfill{\scriptsize (global variable)}}\\ This is a global variable which holds the alternative output format for a drawing. By default its value is \texttt{"none"} which indicates that just PostScript will be used as the output format. If its value becomes one of those in \texttt{DrawingsListOfExtraFormats} (\ref{DrawingsListOfExtraFormats}), then besides the PostScript file, it will also be created a file in the alternative format. To change this variable's value, please use \texttt{SetDrawingsExtraFormat} (\ref{SetDrawingsExtraFormat}). } \subsection{\textcolor{Chapter }{SetDrawingsExtraFormat}} \logpage{[ 3, 5, 3 ]}\nobreak \hyperdef{L}{X87B43746819C55F3}{} {\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{SetDrawingsExtraFormat({\slshape f})\index{SetDrawingsExtraFormat@\texttt{SetDrawingsExtraFormat}} \label{SetDrawingsExtraFormat} }\hfill{\scriptsize (function)}}\\ This function is used to set the value of \texttt{DrawingsExtraFormat} (\ref{DrawingsExtraFormat}) to the format \mbox{\texttt{\slshape f}} which is one of \texttt{DrawingsListOfExtraFormats} (\ref{DrawingsListOfExtraFormats}). \begin{Verbatim}[fontsize=\small,frame=single,label=Example] gap> DrawingsExtraFormat; "none" gap> SetDrawingsExtraFormat("jpg"); gap> DrawingsExtraFormat; "jpg" gap> DrawRightCayleyGraph(poi3); Displaying file: /tmp/tmp.tpJqvI/cayleygraph.dot.ps The extra output format file: /tmp/tmp.tpJqvI/cayleygraph.dot.jpg has also been created. \end{Verbatim} } } \section{\textcolor{Chapter }{Drawings extra graph attributes}}\label{Drawings_extra_graph_attributes} \logpage{[ 3, 6, 0 ]} \hyperdef{L}{X795DD98D86A1A441}{} { The functions described in this subsection are intended to give the user a finer control over the final drawing. They allow to define the graph attributes described in \href{http://graphviz.org/doc/info/attrs.html} {\texttt{http://graphviz.org/doc/info/attrs.html}}. (Note that only graph attributes are allowed to be defined, not edge nor node attributes are supported yet.) \subsection{\textcolor{Chapter }{DrawingsExtraGraphAttributes}} \logpage{[ 3, 6, 1 ]}\nobreak \hyperdef{L}{X7A3895EB7C0573DD}{} {\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{DrawingsExtraGraphAttributes\index{DrawingsExtraGraphAttributes@\texttt{DrawingsExtraGraphAttributes}} \label{DrawingsExtraGraphAttributes} }\hfill{\scriptsize (global variable)}}\\ This is a global variable which holds a list of strings, each of which defines a \emph{dot} graph attribute. This variable is \emph{not} intended to be modified by the user directly, but can be used to check which extra attributes are currently defined. To set the attributes, please use \texttt{SetDrawingsExtraGraphAttributes} (\ref{SetDrawingsExtraGraphAttributes}). If \texttt{DrawingsExtraGraphAttributes} holds the value \texttt{"none"} then the default \emph{dot} settings will be used. Use \texttt{ClearDrawingsExtraGraphAttributes} (\ref{ClearDrawingsExtraGraphAttributes}) to set it to \texttt{"none"}. } \subsection{\textcolor{Chapter }{SetDrawingsExtraGraphAttributes}} \logpage{[ 3, 6, 2 ]}\nobreak \hyperdef{L}{X7B652A9179C45291}{} {\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{SetDrawingsExtraGraphAttributes({\slshape L})\index{SetDrawingsExtraGraphAttributes@\texttt{SetDrawingsExtraGraphAttributes}} \label{SetDrawingsExtraGraphAttributes} }\hfill{\scriptsize (function)}}\\ This is the function to define the drawing's graph attributes (see \href{http://graphviz.org/doc/info/attrs.html} {\texttt{http://graphviz.org/doc/info/attrs.html}} for a list and explanation of them). the argument \mbox{\texttt{\slshape L}} is a list of strings, each of which defines a \emph{dot} graph attribute. For example, if we wanted to define the graph size to be 7x9 (in inches), we would call \texttt{SetDrawingsExtraGraphAttributes(["size=7,9"]);}. If we also wanted to define the graph to be displayed in landscape mode we would call \texttt{SetDrawingsExtraGraphAttributes(["size=7,9", "rotate=90"]);}. If, in addition we wanted to define the background color to be, for example, pink, we would call \texttt{SetDrawingsExtraGraphAttributes(["size=7,9", "rotate=90", "bgcolor=pink"]);}. After defining the attributes, any command that creates a drawing will use the last defined attributes. To set them back to the defaults, please use \texttt{ClearDrawingsExtraGraphAttributes} (\ref{ClearDrawingsExtraGraphAttributes}). \begin{Verbatim}[fontsize=\small,frame=single,label=Example] gap> DrawingsExtraGraphAttributes; "none" gap> SetDrawingsExtraGraphAttributes(["size=7,9"]); gap> DrawingsExtraGraphAttributes; [ "size=7,9" ] gap> SetDrawingsExtraGraphAttributes(["size=7,9", "rotate=90"]); gap> DrawingsExtraGraphAttributes; [ "size=7,9", "rotate=90" ] gap> SetDrawingsExtraGraphAttributes(["size=7,9", "rotate=90", "bgcolor=pink"]); gap> DrawingsExtraGraphAttributes; [ "size=7,9", "rotate=90", "bgcolor=pink" ] gap> ClearDrawingsExtraGraphAttributes(); gap> DrawingsExtraGraphAttributes; "none" \end{Verbatim} } \subsection{\textcolor{Chapter }{ClearDrawingsExtraGraphAttributes}} \logpage{[ 3, 6, 3 ]}\nobreak \hyperdef{L}{X7B915CC480D0ABF0}{} {\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{ClearDrawingsExtraGraphAttributes({\slshape })\index{ClearDrawingsExtraGraphAttributes@\texttt{ClearDrawingsExtraGraphAttributes}} \label{ClearDrawingsExtraGraphAttributes} }\hfill{\scriptsize (function)}}\\ This function sets the graph drawing attributes back to \emph{dot}'s defaults. } } } \chapter{\textcolor{Chapter }{User friendly ways to give semigroups and automata}}\logpage{[ 4, 0, 0 ]} \hyperdef{L}{X83D3B9D482790646}{} { This chapter describes two Tcl/Tk graphical interfaces that can be used to define and edit semigroups and automata. \section{\textcolor{Chapter }{ Finite automata }}\logpage{[ 4, 1, 0 ]} \hyperdef{L}{X811E5FC2849C5644}{} { \subsection{\textcolor{Chapter }{XAutomaton}} \logpage{[ 4, 1, 1 ]}\nobreak \hyperdef{L}{X8470C731867684DF}{} {\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{XAutomaton({\slshape [A]})\index{XAutomaton@\texttt{XAutomaton}} \label{XAutomaton} }\hfill{\scriptsize (function)}}\\ The function \texttt{ Xautomaton } without arguments opens a new window where an automaton may be specified. A finite automaton (which may then be edited) may be given as argument. } \begin{Verbatim}[fontsize=\small,frame=single,label=Example] gap> XAutomaton(); \end{Verbatim} It opens a window like the following: \ \\ \ \\ Due to problems with scaling and displaying images, they will be available only in HTML format. \ \\ \ \\ \texttt{ Var } is the \textsf{GAP} name of the automaton, \texttt{ States } is the number of states, \texttt{ Alphabet } represents the alphabet and may be given through a positive integer (in this case the alphabet is understood to be \texttt{ a,b,c,... }) or through a string whose symbols, in order, being the letters of the alphabet. The numbers corresponding to the initial and accepting states are placed in the respective boxes. The automaton may be specified to be deterministic, non deterministic or with epsilon transitions. After pressing the \textsc{ transition matrix } button the window gets larger and the transition matrix of the automaton may be given. The \emph{i}th row of the matrix describes the action of the \emph{i}th letter on the states. A non deterministic automaton may be given as follows: By pressing the button \textsc{ Ok } the \textsf{GAP} shell aquires the aspect shown in the following picture and the automaton \texttt{ ndAUT } may be used to do computations. Some computations such as getting a rational expression representing the language of the automaton, the (complete) minimal automaton representing the same language or the transition semigroup of the automaton, may be done directly after pressing the \textsc{ Functions} button. By pressing the button \textsc{ View } an image representing the automaton is displayed in a new window. An automaton with epsilon transitions may be given as follows shown in the following picture. The last letter of the alphabet is always considered to be the $ \epsilon$. In the images it is represented by $\@$. A new window with an image representing the automaton may be obtained by pressing the button \textsc{ View }. In the next example it is given an argument to the function \texttt{XAutomaton}. \begin{Verbatim}[fontsize=\small,frame=single,label=Example] gap> A := RandomAutomaton("det",2,2); < deterministic automaton on 2 letters with 2 states > gap> XAutomaton(A); \end{Verbatim} It opens a window like the following: } \section{\textcolor{Chapter }{ Finite semigroups }}\logpage{[ 4, 2, 0 ]} \hyperdef{L}{X836830E97ED27F7F}{} { The most common ways to give a semigroup to are through generators and relations, a set of (partial) transformations as generating set and as syntactic semigroups of automata or rational languages. \subsection{\textcolor{Chapter }{XSemigroup}} \logpage{[ 4, 2, 1 ]}\nobreak \hyperdef{L}{X7CFD37938771E821}{} {\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{XSemigroup({\slshape [S]})\index{XSemigroup@\texttt{XSemigroup}} \label{XSemigroup} }\hfill{\scriptsize (function)}}\\ The function \texttt{ XSemigroup } without arguments opens a new window where a semigroup (or monoid) may be specified. A finite semigroup (which may then be edited) may be given as argument. } \begin{Verbatim}[fontsize=\small,frame=single,label=Example] gap> XSemigroup(); \end{Verbatim} It opens a window like the following: where one may choose how to give the semigroup. \subsection{\textcolor{Chapter }{ Semigroups given through generators and relations }}\logpage{[ 4, 2, 2 ]} \hyperdef{L}{X83397F6B7B44CACD}{} { In the window opened by \texttt{XSemigroup}, by pressing the button \textsc{Proceed} the window should enlarge and have the following aspect. (If the window does not enlarge automatically, use the mouse to do it.) \texttt{ GAP variable } is the \textsf{GAP} name of the semigroup. One has then to specify the number of generators, the number of relations (which does not to be exact) and whether one wants to produce a monoid or a semigroup. Pressing the \textsc{Proceed} button one gets: } \subsection{\textcolor{Chapter }{ Semigroups given by partial transformations }}\logpage{[ 4, 2, 3 ]} \hyperdef{L}{X7FCC7AFB793048E2}{} { \texttt{XSemigroup(poi3);} would pop up the following window, where everything should be clear: } \subsection{\textcolor{Chapter }{ Syntatic semigroups }}\logpage{[ 4, 2, 4 ]} \hyperdef{L}{X854F0DDF7D612393}{} { \texttt{XSemigroup();} would pop up the following window, where we would select "Syntatic semigroup", press the \textsc{Proceed} button and then choose either to give a "Rational expression" or an "Automaton" by pressing one of those buttons: If "Rational expression" is chosen, a new window pops up where the expression can be specified: After pressing the \textsc{Ok} button, notice that the menu button \textsc{Functions} appears on the main window (lower right corner) meaning that \textsf{GAP} already recognizes the given semigroup: } } } \def\bibname{References\logpage{[ "Bib", 0, 0 ]} \hyperdef{L}{X7A6F98FD85F02BFE}{} } \bibliographystyle{alpha} \bibliography{SgpVizMan} \def\indexname{Index\logpage{[ "Ind", 0, 0 ]} \hyperdef{L}{X83A0356F839C696F}{} } \printindex \newpage \immediate\write\pagenrlog{["End"], \arabic{page}];} \immediate\closeout\pagenrlog \end{document}