% generated by GAPDoc2LaTeX from XML source (Frank Luebeck)
\documentclass[11pt]{report}
\usepackage{a4wide}
\sloppy
\pagestyle{myheadings}
\usepackage{amssymb}
\usepackage[latin1]{inputenc}
\usepackage{makeidx}
\makeindex
\usepackage{graphicx}
\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{pslatex}

\usepackage[
        a4paper=true,bookmarks=false,pdftitle={Written with 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,}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\F}{\mathbb{F}}

\newcommand{\GAP}{\textsf{GAP}}

\newsavebox{\backslashbox}
\sbox{\backslashbox}{\texttt{\symbol{92}}}
\newcommand{\bs}{\usebox{\backslashbox}}

\begin{document}

\logpage{[ 0, 0, 0 ]}
\begin{titlepage}
\begin{center}{\Huge \textbf{Semigroup visualization}}\\[1cm]
\markright{\scriptsize \mbox{}\hfill Semigroup visualization \hfill\mbox{}}
{( Version 0.996 ) }\\[1cm]
\mbox{}\\[2cm]
{\large \textbf{ Manuel Delgado   }}\\
{\large \textbf{ José Joã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é Joã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é João Morais 

 We adopt the copyright regulations of \textsf{GAP} as detailed in the copyright notice in the \textsf{GAP} manual. }\\[1cm]
{\small 
\section*{Acknowledgements}
\logpage{[ 0, 0, 3 ]}
 The first author aknowledges financial support of FCT, through the \emph{Centro de Matemá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ática da Universidade do Porto}. 

 Both authors acknowledge Jorge Almeida, Vítor H. Fernandes and Pedro Silva for
many helpfull discussions and comments. }\\[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. }\\[1cm]
\newpage

\def\contentsname{Contents\logpage{[ 0, 0, 4 ]}}

\tableofcontents
\newpage

   
\chapter{\textcolor{Chapter }{ Introduction }}\logpage{[ 1, 0, 0 ]}
{
  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{\"u}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 ]}
{
  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 ]}
{
 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 ]}
{
  These functions are semigroup attributes that get stored once computed. 

\subsection{\textcolor{Chapter }{HasCommutingIdempotents}}
\logpage{[ 2, 2, 1 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{HasCommutingIdempotents( M )\index{HasCommutingIdempotents@\texttt{HasCommutingIdempotents}}
\label{HasCommutingIdempotents}
}\hfill{\scriptsize (attribute)}}\\


Tests whether the idempotents of the semigroup \mbox{\texttt{M }}commute. }

 

\subsection{\textcolor{Chapter }{IsInverseSemigroup}}
\logpage{[ 2, 2, 2 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsInverseSemigroup( S )\index{IsInverseSemigroup@\texttt{IsInverseSemigroup}}
\label{IsInverseSemigroup}
}\hfill{\scriptsize (attribute)}}\\


Tests whether a finite semigroup \mbox{\texttt{S }}is inverse. It is well-known that it suffices to test whether the idempotents
of \mbox{\texttt{S }}commute and \mbox{\texttt{S }}is regular. The function \texttt{IsRegularSemigroup }is part of \textsf{GAP}. }

 }

 
\section{\textcolor{Chapter }{Some basic functions}}\logpage{[ 2, 3, 0 ]}
{
  

\subsection{\textcolor{Chapter }{PartialTransformation}}
\logpage{[ 2, 3, 1 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{PartialTransformation( 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 \{1, ..., n\}. It is given by means of the list of images \mbox{\texttt{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
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{ReduceNumberOfGenerators( L )\index{ReduceNumberOfGenerators@\texttt{ReduceNumberOfGenerators}}
\label{ReduceNumberOfGenerators}
}\hfill{\scriptsize (function)}}\\


Given a subset \mbox{\texttt{L}} of the generators of a semigroup, returns a list of generators of the same
semigroup but possibly with less elements than \mbox{\texttt{L}}.}

 

\subsection{\textcolor{Chapter }{SemigroupFactorization}}
\logpage{[ 2, 3, 3 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{SemigroupFactorization( S, L )\index{SemigroupFactorization@\texttt{SemigroupFactorization}}
\label{SemigroupFactorization}
}\hfill{\scriptsize (function)}}\\


\mbox{\texttt{L}} is an element (or list of elements) of the semigroup \mbox{\texttt{S}}. Returns a minimal factorization on the generators of \mbox{\texttt{S}} of the element(s) of \mbox{\texttt{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
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{GrahamBlocks( mat )\index{GrahamBlocks@\texttt{GrahamBlocks}}
\label{GrahamBlocks}
}\hfill{\scriptsize (function)}}\\


\mbox{\texttt{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{mat}} in Graham's blocks form and \texttt{phi} maps H-classes of \texttt{gmat} to the corresponding ones of \mbox{\texttt{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 ]}
{
  

\subsection{\textcolor{Chapter }{RightCayleyGraphAsAutomaton}}
\logpage{[ 2, 4, 1 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{RightCayleyGraphAsAutomaton( S )\index{RightCayleyGraphAsAutomaton@\texttt{RightCayleyGraphAsAutomaton}}
\label{RightCayleyGraphAsAutomaton}
}\hfill{\scriptsize (function)}}\\


Computes the right Cayley graph of a finite monoid or semigroup \mbox{\texttt{S}}. It uses the \textsf{GAP} buit-in function \texttt{CayleyGraphSemigroup} to compute the Cayley Graph and returns it as an automaton without initial and
final states. The \textsf{Automata} 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
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{RightCayleyGraphMonoidAsAutomaton( 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 ]}
{
  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 ]}
{
  

\subsection{\textcolor{Chapter }{DrawDClassOfElement}}
\logpage{[ 3, 1, 1 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{DrawDClassOfElement( 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 1 then the elements will appear as transformations,
otherwise they will appear as words. The idempotents will be marked with a *
before them. }

 
\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 ]}
{
  

\subsection{\textcolor{Chapter }{DrawDClasses}}
\logpage{[ 3, 2, 1 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{DrawDClasses( 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 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. }

 
\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 ]}
{
  

\subsection{\textcolor{Chapter }{DrawRightCayleyGraph}}
\logpage{[ 3, 3, 1 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{DrawRightCayleyGraph( S )\index{DrawRightCayleyGraph@\texttt{DrawRightCayleyGraph}}
\label{DrawRightCayleyGraph}
}\hfill{\scriptsize (function)}}\\


Draws the right Cayley graph of a finite monoid or semigroup \mbox{\texttt{S}}. }

 

\subsection{\textcolor{Chapter }{DrawCayleyGraph}}
\logpage{[ 3, 3, 2 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{DrawCayleyGraph( 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:  }

 
\section{\textcolor{Chapter }{Schutzenberger graphs}}\logpage{[ 3, 4, 0 ]}
{
  

\subsection{\textcolor{Chapter }{DrawSchutzenbergerGraphs}}
\logpage{[ 3, 4, 1 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{DrawSchutzenbergerGraphs( S )\index{DrawSchutzenbergerGraphs@\texttt{DrawSchutzenbergerGraphs}}
\label{DrawSchutzenbergerGraphs}
}\hfill{\scriptsize (function)}}\\


Draws the Schutzenberger graphs of the inverse semigroup \mbox{\texttt{S}}.}

 For example, \texttt{DrawSchutzenbergerGraphs(poi3);} would produce the following: 

  }

 }

   
\chapter{\textcolor{Chapter }{User friendly ways to give semigroups and automata}}\logpage{[ 4, 0, 0 ]}
{
  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 ]}
{
  

\subsection{\textcolor{Chapter }{XAutomaton}}
\logpage{[ 4, 1, 1 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{XAutomaton( [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 ]}
{
  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
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{XSemigroup( [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 ]}
{
  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 ]}
{
  \texttt{XSemigroup(poi3);} would pop up the following window, where everything should be clear:  }

 
\subsection{\textcolor{Chapter }{ Syntatic semigroups }}\logpage{[ 4, 2, 4 ]}
{
  \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 ]}}

\bibliographystyle{alpha}
\bibliography{SgpVizMan}

\def\indexname{Index\logpage{[ "Ind", 0, 0 ]}}


\printindex

\newpage
\immediate\write\pagenrlog{["End"], \arabic{page}];}
\immediate\closeout\pagenrlog
\end{document}
