Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/patternclass/doc/   (GAP Algebra Version 4.15.1©)  Datei vom 30.7.2024 mit Größe 108 kB image not shown  

Impressum PatternClass.tex   Sprache: Latech

 

% generated by GAPDoc2LaTeX from XML source (Frank Luebeck)
\documentclass[a4paper,11pt]{report}

                \usepackage{graphicx}
                \usepackage{float}
                
\usepackage[top=37mm,bottom=37mm,left=27mm,right=27mm]{geometry}
\sloppy
\pagestyle{myheadings}
\usepackage{amssymb}
\usepackage[utf8]{inputenc}
\usepackage{makeidx}
\makeindex
\usepackage{color}
\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{linkColor}{rgb}{0.0,0.0,0.554}
\definecolor{citeColor}{rgb}{0.0,0.0,0.554}
\definecolor{fileColor}{rgb}{0.0,0.0,0.554}
\definecolor{urlColor}{rgb}{0.0,0.0,0.554}
\definecolor{promptColor}{rgb}{0.0,0.0,0.589}
\definecolor{brkpromptColor}{rgb}{0.589,0.0,0.0}
\definecolor{gapinputColor}{rgb}{0.589,0.0,0.0}
\definecolor{gapoutputColor}{rgb}{0.0,0.0,0.0}

%%  for a long time these were red and blue by default,
%%  now black, but keep variables to overwrite
\definecolor{FuncColor}{rgb}{0.0,0.0,0.0}
%% strange name because of pdflatex bug:
\definecolor{Chapter }{rgb}{0.0,0.0,0.0}
\definecolor{DarkOlive}{rgb}{0.1047,0.2412,0.0064}


\usepackage{fancyvrb}

\usepackage{mathptmx,helvet}
\usepackage[T1]{fontenc}
\usepackage{textcomp}


\usepackage[
            pdftex=true,
            bookmarks=true,        
            a4paper=true,
            pdftitle={Written with GAPDoc},
            pdfcreator={LaTeX with hyperref package / GAPDoc},
            colorlinks=true,
            backref=page,
            breaklinks=true,
            linkcolor=linkColor,
            citecolor=citeColor,
            filecolor=fileColor,
            urlcolor=urlColor,
            pdfpagemode={UseNone}, 
           ]{hyperref}

\newcommand{\maintitlesize}{\fontsize{50}{55}\selectfont}

% 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}}

%% nicer description environments, allows long labels
\usepackage{enumitem}
\setdescription{style=nextline}

%% depth of toc
\setcounter{tocdepth}{1}





%% command for ColorPrompt style examples
\newcommand{\gapprompt}[1]{\color{promptColor}{\bfseries #1}}
\newcommand{\gapbrkprompt}[1]{\color{brkpromptColor}{\bfseries #1}}
\newcommand{\gapinput}[1]{\color{gapinputColor}{#1}}


\begin{document}

\logpage{[ 0, 0, 0 ]}
\begin{titlepage}
\mbox{}\vfill

\begin{center}{\maintitlesize \textbf{ PatternClass \mbox{}}}\\
\vfill

\hypersetup{pdftitle= PatternClass }
\markright{\scriptsize \mbox{}\hfill  PatternClass  \hfill\mbox{}}
{\Huge \textbf{ A permutation pattern class package \mbox{}}}\\
\vfill

{\Huge  2.4.5 \mbox{}}\\[1cm]
{ 30 August 2024 \mbox{}}\\[1cm]
\mbox{}\\[2cm]
{\Large \textbf{ Ruth Hoffmann\\
    \mbox{}}}\\
{\Large \textbf{ Steve Linton\\
    \mbox{}}}\\
{\Large \textbf{ Michael Albert\\
    \mbox{}}}\\
\hypersetup{pdfauthor= Ruth Hoffmann\\
    ;  Steve Linton\\
    ;  Michael Albert\\
    }
\end{center}\vfill

\mbox{}\\
{\mbox{}\\
\small \noindent \textbf{ Ruth Hoffmann\\
    }  Email: \href{mailto://rh347@st-andrews.ac.uk} {\texttt{rh347@st\texttt{\symbol{45}}andrews.ac.uk}}\\
  Homepage: \href{https://www.st-andrews.ac.uk/computer-science/people/rh347/} {\texttt{https://www.st\texttt{\symbol{45}}andrews.ac.uk/computer\texttt{\symbol{45}}science/people/rh347/}}\\
  Address: \begin{minipage}[t]{8cm}\noindent
 School of Computer Science,\\
 University of St. Andrews,\\
 North Haugh,\\
 St. Andrews,\\
 Fife,\\
 KY16 9SS,\\
 SCOTLAND\\
 \end{minipage}
}\\
{\mbox{}\\
\small \noindent \textbf{ Steve Linton\\
    }  Email: \href{mailto://sl4@st-andrews.ac.uk} {\texttt{sl4@st\texttt{\symbol{45}}andrews.ac.uk}}\\
  Homepage: \href{http://sal.host.cs.st-andrews.ac.uk/} {\texttt{http://sal.host.cs.st\texttt{\symbol{45}}andrews.ac.uk/}}\\
  Address: \begin{minipage}[t]{8cm}\noindent
 Steve Linton\\
 School of Computer Science,\\
 University of St. Andrews,\\
 North Haugh,\\
 St. Andrews,\\
 Fife,\\
 KY16 9SS,\\
 SCOTLAND\\
 \end{minipage}
}\\
{\mbox{}\\
\small \noindent \textbf{ Michael Albert\\
    }  Email: \href{mailto://malbert@cs.otago.ac.nz} {\texttt{malbert@cs.otago.ac.nz}}\\
  Homepage: \href{https://www.otago.ac.nz/computer-science/people/Michael_Albert.html} {\texttt{https://www.otago.ac.nz/computer\texttt{\symbol{45}}science/people/Michael{\textunderscore}Albert.html}}\\
  Address: \begin{minipage}[t]{8cm}\noindent
 Michael Albert\\
 Department of Computer Science,\\
 University of Otago,\\
 PO Box 56,\\
 DUNEDIN 9054,\\
 New Zealand,\\
 \end{minipage}
}\\
\end{titlepage}

\newpage\setcounter{page}{2}
\newpage

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

\tableofcontents
\newpage

 
\chapter{\textcolor{Chapter }{Introduction}}\logpage{[ 1, 0, 0 ]}
\hyperdef{L}{X7DFB63A97E67C0A1}{}
{
 Token passing networks (TPNs) are directed graphs with nodes that can hold at
most one token. Also each graph has a designated input node, which generates
an ordered sequence of numbered tokens and a designated output node that
collects the tokens in the order they arrive at it. The input node has no
incoming edges, whereas the output node has no outgoing edges. A token $t$ travels through the graph, from node to node, if there is an edge connecting
the nodes, if the node the token is moving from is either the input node and
the tokens $1, \ldots, t-1$ have been released or the node is not the output node, and lastly if the
destination node contains no token or it is the output node. \cite{PermGenTPGraph} 

 The set of permutations resulting from a TPN is closed under the property of
containment. A permutation $a$ contains a permutation $b$ of shorter length if in $a$ there is a subsequence that is isomorphic to $b$. This class of permutations can be represented by its
anti\texttt{\symbol{45}}chain, which in this context is called the basis. \cite{RegCloSetPerms} 

 To enhance the computability of permutation pattern classes, each permutation
can be encoded, using the so called rank encoding. For a permutation $p_{1} \ldots p_{n}$, it is the sequence $e_{1}\ldots e_{n}$ where $e_{i}$ is the rank of $p_{i}$ among $\{p_{i},p_{i+1},\ldots,p_{n}\}$. It can be shown that the sets of encoded permutations of the class and the
basis, both are a rational languagesrational language as from
automata. \cite{RegCloSetPerms} 

 There is another approach to get from TPNs to their corresponding automata.
Namely building equivalence classes from TPNs using the different dispositions
of tokens within them. These equivalence classes of dispositions and the rank
encoding of the permutations allow to build the same rational language as from
the process above. \cite{PermGenTPGraph} }

 
\chapter{\textcolor{Chapter }{Token Passing Networks}}\logpage{[ 2, 0, 0 ]}
\hyperdef{L}{X7C769071875E96B2}{}
{
 \label{tpn} A token passing network is a directed graph with a designated input node and a
designated output node. The input node has no incoming edges whereas the
output node has no outgoing edges. Also the input node generates a sequence of
tokens, labelled 1, 2, 3, ... . These tokens are passed on to the nodes within
the graph, where each node, apart from the input and output node, can hold at
most one token at any time. The edges do not hold tokens but are there to pass
them on. The following must hold if a token $t$ moves from the node $x$ to the node $y$. 

 There is an edge from $x$ to $y$; $x$ is the input node, and the tokens 1, 2, 3, ... , $t-1$ have been moved, or $x$ is any other node but not the output node; lastly either $y$ is the output node or $y$ is not the input node and currently is not occupied by a token. \cite{PermGenTPGraph} 

 Token passing networks, or TPNs, are represented in \textsf{GAP} as a list. Each entry of the list is the index of the node within the TPN and
contains a list of the "destinations", i.e. the end of the edge or arrow where
it is directed to. 

 Here is an example how the input of such a TPN looks in \textsf{GAP}: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@hex:=[[2,3],[4],[5],[3,6],[6],[]];|
  [ [ 2, 3 ], [ 4 ], [ 5 ], [ 3, 6 ], [ 6 ], [  ] ]
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 
  This list represents the following directed graph:
  \begin{figure}[H] \begin{center} \leavevmode \includegraphics[scale=0.75]{img/hex.jpg} \end{center} \end{figure}
  From this it is visible that the input node is 1, as it has no other node
pointing any arrows towards it, and the output node is 6, as it has no
destinations (hence the empty list). 
\section{\textcolor{Chapter }{ Specific TPN }}\logpage{[ 2, 1, 0 ]}
\hyperdef{L}{X80EE110279808BD3}{}
{
 In \texttt{PatternClass} there are several functions that define different kinds of specific token
passing networks. 

\subsection{\textcolor{Chapter }{Parstacks}}
\logpage{[ 2, 1, 1 ]}\nobreak
\hyperdef{L}{X85AFF5537F917AEB}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{Parstacks({\mdseries\slshape m, n})\index{Parstacks@\texttt{Parstacks}}
\label{Parstacks}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
A list that represents the directed edges of a token passing network.



 \texttt{Parstacks} constructs a token passing network with 2 different sized stacks \texttt{m,n} positioned in parallel. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@Parstacks(2,2);|
  [ [ 2, 4 ], [ 3, 6 ], [ 2 ], [ 5, 6 ], [ 4 ], [  ] ]
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 
      \texttt{Parstacks(2,2)} can be visualised as the following directed graph:
      \begin{figure}[H] \begin{center} \leavevmode \includegraphics[scale=0.75]{img/ps22.jpg} \end{center} \end{figure}
      
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@Parstacks(4,3);|
  [ [ 2, 6 ], [ 3, 9 ], [ 2, 4 ], [ 3, 5 ], [ 4 ], [ 7, 9 ], [ 6, 8 ], [ 7 ],
    [  ] ]
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 
      The token passing network below represents the list that was output by \texttt{Parstacks(4,3)}.
      \begin{figure}[H] \begin{center} \leavevmode \includegraphics[scale=0.75]{img/ps43.jpg} \end{center} \end{figure}
      }

 

\subsection{\textcolor{Chapter }{Seqstacks}}
\logpage{[ 2, 1, 2 ]}\nobreak
\hyperdef{L}{X7D6D07D980634845}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{Seqstacks({\mdseries\slshape n[, m[, o[, p[, ...]]]]})\index{Seqstacks@\texttt{Seqstacks}}
\label{Seqstacks}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
A list that represents the directed edges of a token passing network.



 The token passing network build by \texttt{Seqstacks} contains a series of stacks (as many as you have integers in the arguments
list) each of different length (each integer in the argument list). 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@Seqstacks(2,2);|
  [ [ 2 ], [ 3, 4 ], [ 2 ], [ 5, 6 ], [ 4 ], [  ] ]
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 
      \texttt{Seqstacks(2,2)} can be visualised as the following directed graph:
      \begin{figure}[H] \begin{center} \leavevmode \includegraphics[scale=0.75]{img/ss22.jpg} \end{center} \end{figure}
      
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@Seqstacks(3,1,4);|
  [ [ 2 ], [ 3, 5 ], [ 2, 4 ], [ 3 ], [ 4 ], [ 7, 10 ], [ 6, 8 ], [ 7, 9 ], 
    [ 8 ], [  ] ]
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 
      The token passing network containing a series of stacks of length 3, 1 and 4 looks as follows:
      \begin{figure}[H] \begin{center} \leavevmode \includegraphics[scale=0.75]{img/ss314.jpg} \end{center} \end{figure}
      }

 

\subsection{\textcolor{Chapter }{BufferAndStack}}
\logpage{[ 2, 1, 3 ]}\nobreak
\hyperdef{L}{X81E3656E85CB6EB7}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{BufferAndStack({\mdseries\slshape m, n})\index{BufferAndStack@\texttt{BufferAndStack}}
\label{BufferAndStack}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
A list that represents the directed edges of a token passing network.



 \texttt{BufferAndStack} is a token passing network that consists of a buffer of size \texttt{m} which is followed by a single stack of size \texttt{n}. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@BufferAndStack(2,2);|
  [ [ 2, 3 ], [ 4 ], [ 4 ], [ 5, 6 ], [ 4 ], [  ] ]
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 
      \texttt{BufferAndStack(2,2)} is the following directed graph:
      \begin{figure}[H] \begin{center} \leavevmode \includegraphics[scale=0.75]{img/bs22.jpg} \end{center} \end{figure}
      
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@BufferAndStack(4,3);|
  [ [ 2 .. 5 ], [ 6 ], [ 6 ], [ 6 ], [ 6 ], [ 7, 9 ], [ 6, 8 ], [ 7 ], [  ] ]
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 
      The token passing network correlating to the list output by \texttt{BufferAndStack(4,3)} is:
      \begin{figure}[H] \begin{center} \leavevmode \includegraphics[scale=0.75]{img/bs43.jpg} \end{center} \end{figure}
      }

 }

 }

 
\chapter{\textcolor{Chapter }{Permutation Encoding}}\logpage{[ 3, 0, 0 ]}
\hyperdef{L}{X8696E21E80C1AEC1}{}
{
 A permutation $\pi=\pi_{1} \ldots \pi_{n}$ has rank encoding $p_{1} \ldots p_{n}$ where $ p_{i}= |\{j : j \geq i, \pi_{j} \leq \pi_{i} \} | $. In other words the rank encoded permutation is a sequence of $p_{i}$ with $1\leq i\leq n$, where $p_{i}$ is the rank of $\pi_{i}$ in $\{\pi_{i},\pi_{i+1},\ldots ,\pi_{n}\}$. \cite{RegCloSetPerms} 

 The encoding of the permutation 3 2 5 1 6 7 4 8 9 is done as follows: \begin{center}
\begin{tabular}{c|c|c}Permutation&
Encoding&
Assisting list\\
325167489&
$\emptyset$&
123456789\\
25167489&
3&
12456789\\
5167489&
32&
1456789\\
167489&
323&
146789\\
67489&
3231&
46789\\
7489&
32312&
4789\\
489&
323122&
489\\
89&
3231221&
89\\
9&
32312211&
9\\
$\emptyset$&
323122111&
$\emptyset$\\
\end{tabular}\\[2mm]
\end{center}

 Decoding a permutation is done in a similar fashion, taking the sequence $p_{1} \ldots p_{n}$ and using the reverse process will lead to the permutation $\pi=\pi_{1} \ldots \pi_{n}$, where $\pi_{i}$ is determined by finding the number that has rank $p_{i}$ in $\{\pi_{i}, \pi_{i+1}, \ldots , \pi_{n}\}$. 

 The sequence 3 2 3 1 2 2 1 1 1 is decoded as: \begin{center}
\begin{tabular}{c|c|c}Encoding&
Permutation&
Assisting list\\
323122111&
$\emptyset$&
123456789\\
23122111&
3&
12456789\\
3122111&
32&
1456789\\
122111&
325&
146789\\
22111&
3251&
46789\\
2111&
32516&
4789\\
111&
325167&
489\\
11&
3251674&
89\\
1&
32516748&
9\\
$\emptyset$&
325167489&
$\emptyset$\\
\end{tabular}\\[2mm]
\end{center}

 
\section{\textcolor{Chapter }{ Encoding and Decoding }}\logpage{[ 3, 1, 0 ]}
\hyperdef{L}{X793F8BF48048365F}{}
{
 

\subsection{\textcolor{Chapter }{RankEncoding}}
\logpage{[ 3, 1, 1 ]}\nobreak
\hyperdef{L}{X8143AF3D79F4CC1D}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{RankEncoding({\mdseries\slshape p})\index{RankEncoding@\texttt{RankEncoding}}
\label{RankEncoding}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
A list that represents the rank encoding of the permutation \texttt{p}. 



 Using the algorithm above \texttt{RankEncoding} turns the permutation \texttt{p} into a list of integers. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@RankEncoding([3, 2, 5, 1, 6, 7, 4, 8, 9]);|
  [ 3, 2, 3, 1, 2, 2, 1, 1, 1 ]
  !gapprompt@gap>| !gapinput@RankEncoding([ 4, 2, 3, 5, 1 ]);                 |
  [ 4, 2, 2, 2, 1 ]
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{RankDecoding}}
\logpage{[ 3, 1, 2 ]}\nobreak
\hyperdef{L}{X7DA97A7B7C8EB18A}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{RankDecoding({\mdseries\slshape e})\index{RankDecoding@\texttt{RankDecoding}}
\label{RankDecoding}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
A permutation in list form.



 A rank encoded permutation is decoded by using the reversed process from
encoding, which is also explained above. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@RankDecoding([ 3, 2, 3, 1, 2, 2, 1, 1, 1 ]);|
  [ 3, 2, 5, 1, 6, 7, 4, 8, 9 ]
  !gapprompt@gap>| !gapinput@RankDecoding([ 4, 2, 2, 2, 1 ]);|
  [ 4, 2, 3, 5, 1 ]
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{SequencesToRatExp}}
\logpage{[ 3, 1, 3 ]}\nobreak
\hyperdef{L}{X832A1FEC7E5491EA}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{SequencesToRatExp({\mdseries\slshape list})\index{SequencesToRatExp@\texttt{SequencesToRatExp}}
\label{SequencesToRatExp}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
A rational expression that describes all the words in \texttt{list}.



 A list of sequences is turned into a rational expression by concatenating each
sequence and unifying all of them. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@SequencesToRatExp([[ 1, 1, 1, 1, 1 ],[ 2, 1, 2, 2, 1 ],[ 3, 2, 1, 2, 1 ],|
  !gapprompt@>| !gapinput@[ 4, 2, 3, 2, 1 ]]);|
  11111U21221U32121U42321
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 }

 }

 }

 
\chapter{\textcolor{Chapter }{From Networks to Automata}}\logpage{[ 4, 0, 0 ]}
\hyperdef{L}{X84E9957A81BF938D}{}
{
 It is known that the language of all encoded permutations of a TPN is
rational, and thus is it indeed possible to turn a TPN into an automaton. The
idea is to inspect all dispositions of tokens within the TPN and find
equivalence classes of these dispositions, for more details consult \cite{PermGenTPGraph}. Adding a constraint, which limits the number of tokens at any time within
the TPN, is also considered in this chapter. 

 The algorithms featured in this chapter do not return the minimal automata
representing the input TPN as they are exactly visualising the equivalence
classes of the dispositions of the tokens in the TPN. The automaton can be
minimalised by choice, as it simplifies future computations involving the
automaton also is makes the automata more legible. 
\section{\textcolor{Chapter }{Functions}}\logpage{[ 4, 1, 0 ]}
\hyperdef{L}{X86FA580F8055B274}{}
{
 

\subsection{\textcolor{Chapter }{GraphToAut}}
\logpage{[ 4, 1, 1 ]}\nobreak
\hyperdef{L}{X7CFD21C47E43D8FF}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{GraphToAut({\mdseries\slshape g, innode, outnode})\index{GraphToAut@\texttt{GraphToAut}}
\label{GraphToAut}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
An automaton representing the input TPN.



 \texttt{GraphToAut} turns an array represented directed graph, with a distinct input node and a
distinct output node, into the corresponding automaton, that accepts the
language build by the resulting rank encoded permutations of the directed
graph. 
\begin{Verbatim}[commandchars=!@B,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>B !gapinput@x:=Seqstacks(2,2);B
  [ [ 2 ], [ 3, 4 ], [ 2 ], [ 5, 6 ], [ 4 ], [  ] ]
  !gapprompt@gap>B !gapinput@aut:=GraphToAut(x,1,6);B
  < epsilon automaton on 4 letters with 64 states >
  !gapprompt@gap>B !gapinput@aut:=MinimalAutomaton(aut);B
  < deterministic automaton on 3 letters with 3 states >
  !gapprompt@gap>B !gapinput@Display(aut);B
     |  1  2  3  
  --------------
   a |  1  3  1  
   b |  3  3  3  
   c |  2  2  2  
  Initial state:   [ 1 ]
  Accepting state: [ 1 ]
  !gapprompt@gap>B !gapinput@B
\end{Verbatim}
 
      The minimal automaton corresponding to \texttt{Seqstacks(2,2)} is:
      \begin{figure}[H] \begin{center} \leavevmode \includegraphics[scale=0.75]{img/ss22aut.jpg} \end{center} \end{figure}
      
\begin{Verbatim}[commandchars=!@B,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>B !gapinput@x:=Parstacks(2,2);B
  [ [ 2, 4 ], [ 3, 6 ], [ 2 ], [ 5, 6 ], [ 4 ], [  ] ]
  !gapprompt@gap>B !gapinput@aut:=GraphToAut(x,1,6);B
  < epsilon automaton on 5 letters with 66 states >
  !gapprompt@gap>B !gapinput@aut:=MinimalAutomaton(aut);B
  < deterministic automaton on 4 letters with 9 states >
  !gapprompt@gap>B !gapinput@Display(aut);B
     |  1  2  3  4  5  6  7  8  9  
  --------------------------------
   a |  1  2  1  3  2  2  6  6  3  
   b |  3  2  3  3  4  3  6  9  3  
   c |  9  2  9  4  6  6  4  9  9  
   d |  8  2  8  7  5  5  7  8  8  
  Initial state:   [ 1 ]
  Accepting state: [ 1 ]
  !gapprompt@gap>B !gapinput@B
\end{Verbatim}
 
      The rank encoded permutations of \texttt{Parstacks(2,2)} are accepted by the following automaton:
      \begin{figure}[H] \begin{center} \leavevmode \includegraphics[scale=0.75]{img/ps22aut.jpg} \end{center} \end{figure}
      
\begin{Verbatim}[commandchars=!@C,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>C !gapinput@x:=BufferAndStack(3,2);C
  [ [ 2 .. 4 ], [ 5 ], [ 5 ], [ 5 ], [ 6, 7 ], [ 5 ], [  ] ]
  !gapprompt@gap>C !gapinput@aut:=GraphToAut(x,1,7);C
  < epsilon automaton on 5 letters with 460 states >
  !gapprompt@gap>C !gapinput@aut:=MinimalAutomaton(aut);C
  < deterministic automaton on 4 letters with 4 states >
  !gapprompt@gap>C !gapinput@Display(aut);C
     |  1  2  3  4  
  -----------------
   a |  1  4  1  3  
   b |  3  4  3  3  
   c |  4  4  4  4  
   d |  2  2  2  2  
  Initial state:   [ 1 ]
  Accepting state: [ 1 ]
  !gapprompt@gap>C !gapinput@C
\end{Verbatim}
 
      The following automaton represents the language of rank encoded permutations that are output by \texttt{BufferAndStack(3,2)}:
      \begin{figure}[H] \begin{center} \leavevmode \includegraphics[scale=0.75]{img/bs32aut.jpg} \end{center} \end{figure}
      
\begin{Verbatim}[commandchars=!@B,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>B !gapinput@x:=[[2,3],[4],[5],[3,6],[6],[]];B
  [ [ 2, 3 ], [ 4 ], [ 5 ], [ 3, 6 ], [ 6 ], [  ] ]
  !gapprompt@gap>B !gapinput@aut:=GraphToAut(x,1,6);B
  < epsilon automaton on 4 letters with 80 states >
  !gapprompt@gap>B !gapinput@aut:=MinimalAutomaton(aut);B
  < deterministic automaton on 3 letters with 8 states >
  !gapprompt@gap>B !gapinput@Display(aut);B
     |  1  2  3  4  5  6  7  8  
--------------
   a |  1  3  1\hyperdef{L}{X7C}java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
   b |  3  8  3  4  4  6  the correspondingautomaton that the
   c |  2  2  2  4  5  5  7  7  
  Initial state:   [ 1 ]
  Accepting state: [ 1 ]
  !gapprompt@gap>B !gapinput@B
\end{Verbatim}
 The input TPN here is the first network described in Chapter \ref{tpn}. 
      The language of rank java.lang.StringIndexOutOfBoundsException: Range [0, 34) out of bounds for length 7
      \begin{figure}[H] \begin{  gapprompt@B gapinput@aut:GraphToAut(16);java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
     }

 

\subsection{\textcolor{Chapter }{ConstrainedGraphToAut}}
\logpage{[ 4, 1, 2 ]}\nobreak
\hyperdef{L}{X7D457B517F2FDDA9}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ConstrainedGraphToAut({\mdseries\slshape g, innode, outnode, capacity})\index{ConstrainedGraphToAut@\texttt  !gapprompt@gap>B gapinput@a)B
\label{ConstrainedGraphToAut}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent     1  3  1  
An automaton representing the input TPN with bounded capacity.



 \texttt{ConstrainedGraphToAut} builds an epsilon automaton based on the same idea   b   333java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
node and a distinct output node, but  Accepting  [1]
there can be at most \texttt{capacity} tokens in the graph, at any timejava.lang.StringIndexOutOfBoundsException: Range [71, 30) out of bounds for length 30
\begin{Verbatim}[commandchars=!@B,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>B !      \begin{figure}[H] \begin{center} \eavevmode \includegraphicsscale=0.75]{img/ss22aut.jpg}\end{}\{figurejava.lang.StringIndexOutOfBoundsException: Index 122 out of bounds for length 122
    ]3  ][2]  5  ,[4],  java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
  gapprompt@> !gapinput@:=(,,,)B
  < epsilon automaton on 6 letters with 21 states >
  !gapprompt@gap>B !gapinput@aut  [ , 4] 6 ],[4]   java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
  < deterministic automaton on 5 letters with 3 states >
  !gapprompt@gap>B !gapinput@Display(aut);                       B
     |  1  2  3  
  --------------
   a |  1  2  1  
   b |  3  2  3  
   c |  2  2  2  
   d |  2  2  2  
   e |  2  2  2  
  Initial state:   [ 1 ]
  Accepting state: [ 1 ]
  !gapprompt@gap>B !gapinput@B
\end{Verbatim}
 
      The rank encoded permutations of \texttt{Seqstacks(2,2)}, where at any time there are at most 2 tokens within the network, are accepted by
      the following automaton:
      \begin{figure}[H] \begin{center} \leavevmode \includegraphics[scale=0.75]{img/ss22c2aut.jpg} \end{center} \end{figure}
      
\begin{Verbatim}[commandchars=!@E,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>E !gapinput@x:=BufferAndStack(3,2);      E
  [ [ 2 .. 4 ], [ 5 ], [ 5 ], [ 5 ], [ 6, 7 ], [ 5 ], [  ] ]
  !gapprompt@gap>E !gapinput@aut:=ConstrainedGraphToAut(x,1,6,3);E
  < epsilon automaton on 7 letters with 112 states >
  !gapprompt@gap>E !gapinput@aut:=MinimalAutomaton(aut);E
  < deterministic automaton on 6 letters with 4 states >
  !gapprompt@gap>E !gapinput@Display(aut);E
     |  1  2  3  4  
  -----------------
   a |  1  2  1  3  
   b |  3  2  3  3  
   c |  4  2  4  4  
   d |  2  2  2  2  
   e |  2  2  2     a|12  java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
   f |  2  2  2  2  
  Initial state:   [ 1 ]
  Accepting state: [ 1 ]
  !gapprompt@gap>E !gapinput@E
\end{Verbatim}
 
      The automaton corresponding to \texttt{BufferAndStack(3,2)} with limited capacity of 3 tokens is:
      \      the following automaton:
      
\begin{Verbatim}[commandchars=!@B,fontsize=\small,frame=single,label=Example]
> !gapinput@:[2][[],36][][]                      
  [ java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
  !gapprompt@gap>B !gapprompt@ap gapinput@:BufferAndStack(32;E
  < psilonautomaton on 6 letters with 48 states >
  !gapprompt@gap>B !gapinput@aut:=MinimalAutomaton(aut  !appromptgapE!apinput@:ConstrainedGraphToAut(,,,);
<java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 56
!@B!Displayaut;B
     |  1  2  3  4  5  6  7  8  
  --  gapprompt@> gapinput(;java.lang.StringIndexOutOfBoundsException: Range [43, 44) out of bounds for length 43
   a | ---------
   b |  3  8  3  4  4  6  6  6  
   |2   2455     
   d |  4   b    233java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
   e  |123   678 
  Initial state:   [ 1 ]
  Accepting state: [ 1 ]
 gapprompt@> gB
endVerbatimjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
 
      The automaton that accepts the   |22    5577 
      with at most 3 tokens in java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 32
      \begin{  state:[1]
      }

 }

 }

java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
chapter{{ }FromtoNetworks}\{ ,0  }
\hyperdef{L}{java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 7
{
 It is notjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
automaton  alsoifan automaton represent the language java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
 ofaTPN. \PatternClass} only to whetherdeterministicautomata  possible
 It is not  see acan interpretedas  finite 
\Chapter{}logpage[5, ,0]java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
hyperdefL{}}
{
 

\subsection{\textcolor{Chapter }{IsStarClosed}}
{ ,1  }nobreak
\hyperdef{L}{X7E1DAEB979824B68}{}
\oindent\extcolor{uncColor}\riangleright\t{IsStarClosed({mdseries\ aut}\indexIsStarClosed@tIsStarClosed}
\label{IsStarClosed}
}\java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
\textbf{\\logpage{[ 5 1  }nobreak
 \texttt{true} if the start and accept states in \texttt{aut} java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 33



 This has label{IsStarClosed
b{Verbatim}commandchars!|fontsize\,frame=single,abel=xamplejava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
  !gapprompt@gap>| !gapinput@x:=Automaton("det",4,2,[[3,4,2,4],[2,2,2,4]],[1],[2]);|
  < deterministic automaton on 2 letters with 4 states >
  !gapprompt@gap>| !gapinput@IsStarClosed(x);                                      |
  false
  !gapprompt@gap>| !gapinput@AutToRatExp(x);        |
  (a(aUb)Ub)b*
  !gapprompt@gap>| !gapinput@y:=Automaton("det",3,2,[[3,2,1],[2,3,1]],[1],[1]);|
  < deterministic automaton on 2 letters with 3 states >
  !gapprompt@gap>| !gapinput@IsStarClosed(y);|
  true
  !gapprompt@gap>| !gapinput@AutToRatExp(y);|
  ((ba*bUa)(aUb))*
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{Is2StarReplaceable}}
\logpage{[ 5, 1, 2 ]}\nobreak
\hyperdef{L}{X873324D67DC9DC41}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{Is2StarReplaceable({\mdseries\slshape aut})\index{Is2StarReplaceable@\texttt{Is2StarReplaceable}}
\label{Is2StarReplaceable}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
 \texttt{true} if none of the states in the automaton \texttt{aut}, which are not the initial state, have a transition to the initial state
labelled with the first letter of the alphabet. It also returns \texttt{true} if there is at least one state $i \in Q$ with the first two transitions from $i$ being $f(i,1)=1$ and $f(i,2)=x$, where $x \in Q\setminus\{1\}$ and $f(x,1)=1$.



 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@x:=Automaton("det",3,2,[[1,2,3],[2,2,3]],[1],[2]);|
  < deterministic automaton on 2 letters with 3 states >
  !gapprompt@gap>| !gapinput@Is2StarReplaceable(x);|
  true
  !gapprompt@gap>| !gapinput@y:=Automaton("det",4,2,[[4,1,1,2],[1,3,3,2]],[1],[1]);|
  < deterministic automaton on 2 letters with 4 states >
  !gapprompt@gap>| !gapinput@Is2StarReplaceable(y);|
  true
  !gapprompt@gap>| !gapinput@z:=Automaton("det",4,2,[[4,1,1,2],[1,4,2,2]],[1],[4]);|
  < deterministic automaton on 2 letters with 4 states >
  !gapprompt@gap>| !gapinput@Is2StarReplaceable(z);|
  false
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsStratified}}
\logpage{[ 5, 1, 3 ]}\nobreak
\hyperdef{L}{X7FF528F784C9020B}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{IsStratified({\mdseries\slshape aut})\index{IsStratified@\texttt{IsStratified}}
\label{IsStratified}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
\texttt{true} if \texttt{aut} has a specific "layered" form.



 A formal description of the most basic stratified automaton is: 

 $(S,Q,f,q_{0},A)$ with $S:=\{1,...,n\},\,\, Q:=\{1,...,m\},\,\, n<m,\,\, q_{0}:=1,\,\, A:=Q\setminus
\{n+1\},\,\, f: Q \times S \rightarrow Q $ and $n+1$ is a sink state. 

 If $i,j \in Q \setminus \{ n+1 \}$,with $i < j$, and $i',j' \in S$, $i=i',\,\, j=j'$ then 
\[f(i,i')=i,\,\, f(i,j')=j,\,\, f(j,j')=j,\,\, f(j,i')=j-1 \,\, or \,\, n+1.\]
 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@x:=Automaton("det",4,2,[[1,3,1,4],[2,2,4,4]],[1],[2]);|
  < deterministic automaton on 2 letters with 4 states >
  !gapprompt@gap>| !gapinput@IsStratified(x);                                      |
  true
  !gapprompt@gap>| !gapinput@y:=Automaton("det",4,2,[[1,3,2,4],[2,4,1,4]],[1],[2]);|
  < deterministic automaton on 2 letters with 4 states >
  !gapprompt@gap>| !gapinput@IsStratified(y);                                      |
  false
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsPossibleGraphAut}}
\logpage{[ 5, 1, 4 ]}\nobreak
\hyperdef{L}{X7C3B9EB080F72043}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{IsPossibleGraphAut({\mdseries\slshape aut})\index{IsPossibleGraphAut@\texttt{IsPossibleGraphAut}}
\label{IsPossibleGraphAut}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
 \texttt{true} if \texttt{aut} returns \texttt{true} in \texttt{IsStratified}, \texttt{Is2StarReplaceable} and \texttt{IsStarClosed}.



 An automaton that fulfils the three functions above has the right form to be
an automaton representing rank encoded permutations, which are output from a
TPN. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@x:=Automaton("det",2,2,[[1,2],[2,2]],[1],[1]);|
  < deterministic automaton on 2 letters with 2 states >
  !gapprompt@gap>| !gapinput@IsPossibleGraphAut(x);|
  true
  !gapprompt@gap>| !gapinput@y:=Automaton("det",2,2,[[1,2],[1,2]],[1],[1]);|
  < deterministic automaton on 2 letters with 2 states >
  !gapprompt@gap>| !gapinput@IsPossibleGraphAut(y);                        |
  false
  !gapprompt@gap>| !gapinput@IsStarClosed(y);|
  true
  !gapprompt@gap>| !gapinput@Is2StarReplaceable(y);|
  true
  !gapprompt@gap>| !gapinput@IsStratified(y);|
  false
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 }

 }

 }

 
\chapter{\textcolor{Chapter }{Pattern Classes}}\logpage{[ 6, 0, 0 ]}
\hyperdef{L}{X85A198CB7EBA4BDE}{}
{
 Permutation pattern classes can be determined using their corresponding basis.
The basis of a pattern class is the anti\texttt{\symbol{45}}chain of the
class, under the order of containment. A permutation $\pi$ contains another permutation $\sigma$ (of shorter length) if there is a subsequence in $\pi$, which is isomorphic to $\sigma$. 

 With the rational language of the rank encoded class, it is also possible to
find the rational language of the basis and vice versa. Several specific kinds
of transducers are used in this process. \cite{RegCloSetPerms} 
\section{\textcolor{Chapter }{Transducers}}\logpage{[ 6, 1, 0 ]}
\hyperdef{L}{X843CB33182B8E477}{}
{
 

\subsection{\textcolor{Chapter }{Transducer}}
\logpage{[ 6, 1, 1 ]}\nobreak
\hyperdef{L}{X7A2DA7017E4F6BC4}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{Transducer({\mdseries\slshape states, init, transitions, accepting})\index{Transducer@\texttt{Transducer}}
\label{Transducer}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
A record that represents a transducer.



 A transducer is essentially an automaton, where running through the process
does not determine whether the input is accepted, but the input is translated
to another language, over a different alphabet. 

 Formally a transducer is a six\texttt{\symbol{45}}tuple with: $Q$ being the set of states, $S$ the input alphabet, $G$ the output alphabet, $I \in Q$ the start state, $A \subseteq Q$ the set of accept states, and with the transition function $f: Q \times (S \cup \{e\}) \rightarrow Q \times (G \cup \{e\})$, where $e$ is the empty word. 

 In this function the transducer is stored by defining how many states there
are, which one (by index) is the start or initial state, the transitions are
of the form \texttt{[inputletter,outputletter,fromstate,tostate]} and a list of accept states. The input and output alphabet are determined by
the input and output letters on the transitions. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@trans:=Transducer(3,1,[[1,2,1,2],[1,2,2,2],[2,2,1,3],[2,2,2,3],|
  !gapprompt@>| !gapinput@[1,1,3,3],[2,2,3,3]],[2]);|
  rec( accepting := [ 2 ], initial := 1, states := 3, 
    transitions := [ [ 1, 2, 1, 2 ], [ 1, 2, 2, 2 ], [ 2, 2, 1, 3 ], 
        [ 2, 2, 2, 3 ], [ 1, 1, 3, 3 ], [ 2, 2, 3, 3 ] ] )
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 
      This transducer can be visualised as the following graph:
      \begin{figure}[H] \begin{center} \leavevmode \includegraphics[scale=0.75]{img/trans.jpg} \end{center} \end{figure}
      }

 

\subsection{\textcolor{Chapter }{DeletionTransducer}}
\logpage{[ 6, 1, 2 ]}\nobreak
\hyperdef{L}{X7EB2EA8C78DA1F74}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{DeletionTransducer({\mdseries\slshape k})\index{DeletionTransducer@\texttt{DeletionTransducer}}
\label{DeletionTransducer}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
A transducer over \texttt{k}+1 states.



 A deletion transducer is a transducer that deletes one letter of a rank
encoded permutation and returns the correct rank encoding of the new
permutation. The deletion transducer over \texttt{k} deletes letters over the set of all rank encoded permutations with highest
rank \texttt{k}. Specifically, running through a deletion transducer with a rank encoded
permutation, of highest rank \texttt{k}, will lead to the set of all rank encoded permutations that have one letter
of the initial permutation removed. It is important to note that computing
these shorter permutations with the transducer, is done by reading the input
permutation from right to left. For example the deletion transducer with \texttt{k}=3, looks as follows: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@DeletionTransducer(3);|
  rec( accepting := [ 1 .. 3 ], initial := 4, states := 4, 
    transitions := [ [ 1, 1, 4, 4 ], [ 1, 0, 4, 1 ], [ 2, 1, 1, 1 ], 
        [ 1, 1, 1, 2 ], [ 3, 2, 1, 1 ], [ 1, 1, 2, 3 ], [ 1, 1, 3, 3 ], 
        [ 2, 2, 4, 4 ], [ 2, 0, 4, 2 ], [ 3, 2, 2, 2 ], [ 2, 2, 2, 3 ], 
        [ 2, 2, 3, 3 ], [ 3, 3, 4, 4 ], [ 3, 0, 4, 3 ], [ 3, 3, 3, 3 ] ] )
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 
      \begin{figure}[H] \begin{center} \leavevmode \includegraphics[scale=0.75]{img/dt3.jpg} \end{center} \end{figure}
      }

 

\subsection{\textcolor{Chapter }{TransposedTransducer}}
\logpage{[ 6, 1, 3 ]}\nobreak
\hyperdef{L}{X85711F837F30E225}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{TransposedTransducer({\mdseries\slshape t})\index{TransposedTransducer@\texttt{TransposedTransducer}}
\label{TransposedTransducer}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
A new transducer with interchanged input and output letters on each
transition.



 A transducer is transposed when all origins and destinations of transitions
are left the same as before but the input and output letters on each
transition are interchanged. Taking the deletion transducer from above, its
transpose looks as follows: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@TransposedTransducer(DeletionTransducer(3));|
  rec( accepting := [ 1 .. 3 ], initial := 4, states := 4, 
    transitions := [ [ 1, 1, 4, 4 ], [ 0, 1, 4, 1 ], [ 1, 2, 1, 1 ], 
        [ 1, 1, 1, 2 ], [ 2, 3, 1, 1 ], [ 1, 1, 2, 3 ], [ 1, 1, 3, 3 ], 
        [ 2, 2, 4, 4 ], [ 0, 2, 4, 2 ], [ 2, 3, 2, 2 ], [ 2, 2, 2, 3 ], 
        [ 2, 2, 3, 3 ], [ 3, 3, 4, 4 ], [ 0, 3, 4, 3 ], [ 3, 3, 3, 3 ] ] )
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 
      \begin{figure}[H] \begin{center} \leavevmode \includegraphics[scale=0.75]{img/dtt3.jpg} \end{center} \end{figure}
      }

 

\ {java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 56
  gapprompt@> y;
\  !gapprompt> !gapinputy;java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
{\noindentendV}
\label{InvolvementTransducer}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
A transducer over \texttt{k}+1 states, with a \texttt{k} sized alphabet.



isa over\{k}+   anynumberoflettersin rankencoded permutation,of
rank at most \texttt{k}. 
\begin{Verbatim\logpage{[ , ,2]\nobreak
!gap|!@InvolvementTransducer(3);|
  ( accepting :=[1.  ],initial = 4 states:4 
     =[[1 1 ,2] [ 1,0 1 3] [ ,1 1,1]java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
        [ 2, 0, 1, 3 ], [ 3, 2, 1, 1 ], [ 3}h\scriptsize (unction)}\
[1 0,2 ],[ ,2 ,4]  2,0 2, 2]  3 ,2, 2] 
        [ 3, 0, 2, 2 ], [ 1, 1, 3, 2 ], [ 1, 0, 3, 3 ], [ 2, 1, 3, 1 ], 
[2 0 3  ,[ 3 ,3 ] [,0, , 3 ,[1 ,4 4 ,java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
        [ 1, 0, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        [ 3, 0, 4, 4 ] ] )
  !gapprompt@gap>| !gapinput@|
end{erbatim}
 
      \begin{figure < java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 56
  java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7

 

subsectionChapter{}java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
 ,1  }nobreak
\!gapprompt> gapinputz);|
{\  gappromptgap|!|
\label{CombineAutTransducer
}\hfill{\scriptsize
\textbf{\indent Returns:\ }
   of a combination textttaut}and texttttrans.



 Combining automata and transducers is done over the natural "translation\abelIsStratified}
the by the automaton accepted language}{ function}\\
uildinga  thataccepts  newlanguage.Thefunction\  thisprocess  andreturnsthe new \{symbol45}}
utomaton 
\begin{Verbatim}[commandchars=!@B,fontsize=\small,frame=java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 0
  !gapprompt@gap>B !gapinput@a:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 56
!gapB!gapinput@()B
  java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
!gapB!t:Transducer21,[1212],2,11,2]java.lang.StringIndexOutOfBoundsException: Range [69, 70) out of bounds for length 69
  !gapprompt@>B !gapinput@[1,1,2,1],[2,2,2,1]],[1]);B
  rec( \begin{Verbatim[=@,=small,framesinglelabeljava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
    transitions := [ [ 1, 2, 1, 2 ], [ 2, 1, 1, 2 ], [ 1, 1, 2, 1 ], 
        [ 2, 2, 2, 1 ] ] )
  !gapprompt@gap>B !gapinput@res:=CombineAutTransducer(a,t);B
  < non deterministic automaton on 2 letters with 2 states >
  !gapprompt@gap>B !gapinput@AutToRatExp(res);B
  (ba)*
  !gapprompt@gap>B !gapinput@Display(res);B
     |  1       2
  -------------------
   a |         [ 1 ]   
   b | [ 2 ]           
  Initial state:   [ 1 ]
  Accepting state: [ 1 ]
  !gapprompt@gap>B !gapinput@B
\end{Verbatim}
 }

 }

 
\section{\textcolor{Chapter }{From Class to Basis and vice versa}}\logpage{[ 6, 2, 0 ]}
\hyperdef{L}{X7CFEC6DB7CA880CC}{}
{
 

\subsection{\textcolor{Chapter }{BasisAutomaton}}
\logpage{[ 6, 2, 1 ]}\nobreak
\hyperdef{L}{X7FD8B2357CAAFC0B}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{BasisAutomaton({\mdseries\slshape a})\index{BasisAutomaton@\texttt{BasisAutomaton}}
\label{BasisAutomaton}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
An automaton that accepts the rank encoded permutations of the basis of the
input automaton \texttt{a}.



 Every pattern class has a basis that consists of the smallest set of
permutations which do not belong to the class. Using 
\[B(L)=(L^{r} D^{t})^{r} \cap L^{c}\]
 it is possible using the deletion transducer $D$ and the language of rank encoded permutations $L$ to find the language of the rank encoded permutations of the basis $B(L)$, and thus the basis. 
\begin{Verbatim}[commandchars=!CF,fontsize=\small,frame=single,label=Example]
  !gappromptCgap>F !gapinputCx:=Parstacks(2,2);F
  [ [ 2, 4 ], [ 3, 6 ], [ 2 ], [ 5, 6 ], [ 4 ], [  ] ]
  !gappromptCgap>F !gapinputCxa:=GraphToAut(x,1,6);F
  < epsilon automaton on 5 letters with 66 states >
  !gappromptCgap>F !gapinputCma:=MinimalAutomaton(xa);F
  < deterministic automaton on 4 letters with 9 states >
  !gappromptCgap>F !gapinputCDisplay(ma);F
     |  1  2  3  4  5  6  7  8  9  
  --------------------------------
   a |  1  2  1  3  2  2  6  6  3  
   b |  3  2  3  3  4  3  6  9  3  
   c |  9  2  9  4  6  6  4  9  9  
   d |  8  2  8  7  5  5  7  8  8  
  Initial state:   [ 1 ]
  Accepting state: [ 1 ]
  !gappromptCgap>F !gapinputCba:=BasisAutomaton(ma);F
  < deterministic automaton on 4 letters with 9 states >
  !gappromptCgap>F !gapinputCDisplay(ba);F
     |  1  2  3  4  5  6  7  8  9  
  --------------------------------
   a |  2  2  1  3  4  2  2  2  2  
   b |  2  2  2  2  2  4  1  2  8  
   c |  2  2  2  2  2  2  1  2  2  
   d |  2  2  2  9  2  2  5  6  2  
  Initial state:    [ 7 ]
  Accepting states: [ 1, 5 ]
  !gappromptCgap>F !gapinputCAutToRatExp(ba);F
  d(a(dbdb)*aaU@)UbUc
  !gappromptCgap>F !gapinputCF
\end{Verbatim}
 Ignoring the trailingjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
permutations are avoided in this particular class. The shortest permutation in
the basis, looking at the rational expression, is $daaa$, which can be translated to 4111 and decoded to the permutation 4123. }

 

\subsection{\textcolor{Chapter }{ClassAutomaton}}
\logpage{[ 6, 2, 2 ]}\nobreak
\hyperdef{L}{X78BD24D7828004E8}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ClassAutomaton({\mdseries\slshape a})\index{ClassAutomaton@\texttt{ClassAutomaton}}
\label{ClassAutomaton}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
The automaton that accepts permutations of the class in their rank encoding.



 The function \texttt{ClassAutomaton} does the reverse process of \texttt{BasisAutomaton}. Namely it takes the automaton that represents the language of the rank
encoded basis of a permutation class, and using the formula 
\[L=B_{k} \cap ((B(L)^{r} I^{t})^{c} )^{r}\]
 returns the automaton that accepts the rank encoded permutations of the class.
In the formula, $B_{k}$ is the automaton that accepts all permutations of any length with highest rank $k$, $B(L)$ is the automaton that represents the basis and $I$ is the involement transducer. 
begin{[=@,fontsize=small=l=]
  !gapprompt@gap>B !java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
  !gapprompt@>B !gapinput@[2,2,2,2,2,2,1,2,2],[2,2,2,9,2,2,5,6,2]],[7],[1,5]); B
  < deterministic automaton on 4 letters with 9 states >
  !gapprompt@gap>B !gapinput@ca:=ClassAutomaton(xa); B
  <  An automaton that three abovehas   form  be
  !gapprompt@gap>B !gapinput@Display(ca);B
     |  1  2  3  4  5  6  7  8  9  
  --------------------------------
   a |  1  2  1  3  2  2  6  6  3  
   b |  3  2  3  3  4  3  6  9  3  
            4           
   d |  8  2  8  7  5  5  7  8  8  
  Initial state:   [ 1 ]
  Accepting state: [ 1 ]
  !gapprompt@gap>B !gapinput@IsPossibleGraphAut(ca);B  !gap|!@:Automaton(det,,,[1,][,],1,1)|
  true
  !g> g@java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{BoundedClassAutomaton}}
\logpage{[ 6, 2, 3 ]}\nobreak
\hyperdef{L}{X856A6F5085BAA7C3}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{BoundedClassAutomaton({\mdseries\slshape k})\index{BoundedClassAutomaton@\texttt{BoundedClassAutomaton}}
\label{BoundedClassAutomaton}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
An automaton that accepts all rank encoded permutations, with highest rank
being \texttt{k}.



 The bounded class automaton, is an automaton that accepts all rank encoded
permutations, of any length, with highest rank \texttt{k}. 
\begin{Verbatim}[commandchars=!@E,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>E !gapinput@BoundedClassAutomaton(3);E
  < deterministic automaton on 3 letters with 3 states >
  !gapprompt@gap>E !gapinput@Display(last);E
     |  1  2  3  
  --------------
   a |  1  1  2  
   b |  2  2  2  
   c |  3  3  3  
  Initial state:   [ 1 ]
  Accepting state: [ 1 ]
  !gapprompt@gap> !gapinputjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
\end{Verbatim}
 }

 

subsection{\textcolor{Chapter }{ClassAutFromBaseEncoding}}
\logpage{[ 6, 2, 4 ]}\nobreak
\hyperdef{L  
\textcolorFuncColor{\$enspace\{ClassAutFromBaseEncoding(\slshape, }\C@textttClassAutFromBaseEncoding}
\label{ClassAutFromBaseEncoding}
}\hfill{\scriptsize (function)}}\\
textbf\indent Returns: }
The class automaton from a list of rank encoded basis permutations.



 Given the permutations in the basis, in their rank encoded form, and the bound
of the rank of the permutations of the class, \texttt{ClassAutFromBaseEncoding} builds the automaton that accepts rank encoded permutations of the class. 
\begin{Verbatim}[commandchars=!@G,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>G !gapinput@ClassAutFromBaseEncoding([[4,1,1,1]],4); G
  < deterministic automaton on 4 letters with 7 states >
  !gapprompt@gap>G !gapinput@Display(last);G
     |  1  2  3  4  5  6  7  
  --------------------------
   a |  1  2  1  3  2  2  6  
   b |  3  2  3  3  4  3  4  
   c |  4  2  4  4  6  6    false
   d |  7  2  7  7  5  5  7  
  Initial  [1]
  Accepting state: [ 1 ]
  !gapprompt@gap>G !gapinput@G
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 }

 

\subsection{\textcolor{Chapter }{ClassAutFromBase}}
\logpage{[ 6, 2, 5 ]}\nobreak
\hyperdef{L}{X80CBBEE08239B1B1}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ClassAutFromBase({\mdseries\slshape perms, k})\index{ClassAutFromBase@\texttt{ClassAutFromBase}}
\label{ClassAutFromBase}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
The class automaton from a list of permutations of the basis.



 Taking \texttt{perms} which is the list of permutations in the basis and \texttt{k} an integer which indicates the highest rank in the encoded permutations of the
class, \texttt{ClassAutFromBase} constructs the automaton that accepts the language of rank encoded
permutations of the class.  
\begin{Verbatim}[commandchars=!@E,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>E !gapinput@ClassAutFromBase([[4,1,2,3]],4);E
  < deterministic automaton on 4 letters
  !gappromptgapE!apinput@l)E
     |  1  2  3  4  5  6  7  
  ----------------Thebasisof  pattern isthe \{symbol45}ofthe
 2  6java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
   b|3233434
  42446    java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
   d |  7  2  7  7  5  5  7  
  Initial state:   [ 1 ]
  Accepting state: [ 1 ]
  !gapprompt@gap>E !gapinput@E
\end{Verbatim}
 }

 

subsection{textcolorChapter {}}
\logpage{ 6,2  ]\obreak
\hyperdef{L}{X877C8457804E4B45
{\noindent\java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
\label{ExpandAlphabet}
}hfill{scriptsize (}\java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
\textbf{\indent Returns:\ }
 Formally  isasix{symbol45}tuple : Q  setof ,$$the  ,$$the   I$thestart ,$\Q  ofacceptstates,and  transition $:Q\ S\ \e} rightarrow  t( c {\),wheree  empty  



 Given an automaton)is  orinitial ,thetransitionsare
 in\{},\exttt{xpandAlphabet    texttta}tocontain  ofsize textttnewAlphabet}   haveno transitions within the  
=\small,=single,abelExample]
  !gapprompt@gap>B !gapinput@aut:=\begin{Verbatim}[commandchars=!@|,fontsize,singlelabel=]
  <deterministicon with  states java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
  !gapprompt@gap>B !gapinput@Display(aut);B
|123java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
---------
   a |  2  2  3  
   b |  3  3  3  
  Initial state:   [ 1 ]
  Accepting state: [ 3 ]
  !gapprompt@gap>B !gapinput@ExpandAlphabet(aut,4);B
  < deterministic automaton on 4 letters
  gappromptgap> gapinput@(last;java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
     |  1  2  3  
  --\beginfigure[]\{center}\\s=.75]{img/trans.jpg} \end{center} \end{figure}
   2  \label{DeletionTransducer}
   b |  3  3  3  
   c |
   d|           
 ]
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
putB
\encoded permutation and returns the correct rank encoding of the new
 }

 }

 
\section{\textcolor{Chapter }{Direct Sum of Regular Classes}}\logpage{[ 6, 3, 0 ]}
\hyperdef{L}{X8218BF7787571EE0}{}
{
 It is obvious that the direct sum of two rational pattern classes is also
rational. But the skew sum of two rational pattern classes does not imply that
the resulting pattern class is rational, because if the second class in the
sum has infinitely many permutations, the alphabet of the skew sum class will
be infinite and thusly the resulting class will not be rational. 

\subsection{\textcolor{Chapter }{ClassDirectSum}}
\logpage{[ 6, 3, 1 ]}\nobreak
\{L}{7DC869E27CC3BFE0}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ClassDirectSum({rank\texttt{} ,running  deletionjava.lang.StringIndexOutOfBoundsException: Range [74, 68) out of bounds for length 88

{\scriptsize (function)}\
\textbf{\indent Returns:\ }
An these shorterpermutations with the transducer, is done by reading the input



 \texttt{ClassDirectSum\{Verbatim}[commandchars!|,fontsize=\small,frame=single,label=Example]
\begin{Verbatim}[commandchars=!|F,fontsize=\small,frame=single,label=Example]
  !gapprompt|gap>F !gapinput|a:=BasisAutomaton(GraphToAut(Parstacks(2,2),1,6));  F
  < deterministic automaton on 4 with states >
  !gapprompt|gap>F !gapinput|AutToRatExp(a);                                     F
  d(a(dbdb)*aaU@)UbUc
  !gapprompt|gap>F !gapinput|b:=MinimalAutomaton(GraphToAut(Seqstacks(2,2),1,6));F
  < deterministic automaton on 3 letters with 3 states >
  !gapprompt|gap>F !gapinput|AutToRatExp(b);                                     F
  ((cc*(aUb)Ub)(cc*(aUb)Ub)*aUa)*
  !gapprompt|gap>F !gapinput|ab:=ClassDirectSum(a,b);                            F
  < deterministic automaton on 4 letters with 11 states >
  !gapprompt|gap>F !gapinput|AutToRatExp(ab);                                    F
  ((d(acUc)c*(aUb)Ud(abUb))(cc*(aUb)Ub)*aUda(d(bdbd)*bdbaaUa)UbUc)((cc*(aUb)U\
  b)(cc*(aUb)Ub)*aUa)*Ud(aU@)
  !gapprompt|gap>F !gapinput|F
\end{Verbatim}
 }

 }

 
\section{\textcolor{Chapter }{Statistical Inspections}}\logpage{[ 6, 4, 0 ]}
\hyperdef{L}{X80F7EB16817DDB99}{}
{
 It is of interest to see what permutations and how many of different length
are accepted by the class, respectively the basis. 

 In this section, the examples will be inspecting the basis automaton of the
token passing network containing 2 stacks of capacity 2,   !gapprompt@gap>|!gapinput@DeletionTransducer(3);|
parallel to each other. 
\begin{Verbatim}[commandchars=!|C,fontsize=\small,frame=single,label=Example]
  !gapprompt|gap>C gapinputx=arstacks(,2)C
  [ [ 2, 4 ], [ 3, 6 ], [ 2 ], [ 5, 6 ], [ 4 ], [  ] ]
  !gapprompt|gap>C !gapinput|xa:=GraphToAut(x,1,6);C
  < epsilon automaton on 5 letters with 66 states >
  !gapprompt|gap>C !gapinput|ma:=MinimalAutomaton(xa);C
  < deterministic automaton on 4 letters with 9 states >
  !gapprompt|gap>C !gapinput|ba:=BasisAutomaton(ma);C
  < deterministic automaton on 4 letters with 9 states >
  !gapprompt|gap>C !gapinput|AutToRatExp(ba);C
  d(a(dbdb)*aaU@)UbUc
  !gapprompt|gap>C !gapinput|C
\end{Verbatim}
 

\subsection{\textcolor{Chapter }{Spectrum}}
\logpage{[ 6, 4, 1 ]}\nobreak
\hyperdef{L}{X82004197784C17F8}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{3,3] 
labelSpectrum}
}\hfill{\        [ 2, 2,,3 ,[3 
\textbf{\indent Returns:\{}
A list indicating how many words of each length from 1 to \texttt{int} or 15 (default) are accepted by the automaton.



Eachentry thereturned indicateshowmanywordsoflengththeindex
of the entry are accepted by the automaton \texttt{aut}. The length of the list is by default 15, but if this is too much or too
little the second optional argument regulates the length of the list. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [29, 2) out of bounds for length 49
  !gapprompt@gap>| !gapinput@Spectrum(ba,20);|
  [ 3, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1 ]
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{NumberAcceptedWords}}
\are left thesameasbefore the inputandoutputletters on each
hyperdef{}X7E07D0B882DD9033{java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{NumberAcceptedWords({\mdseries\slshape aut, len})\index{NumberAcceptedWords@\texttt{NumberAcceptedWords}}
\label{NumberAcceptedWords}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
The number of words of length \texttt{len} accepted by the automaton \texttt{aut}.



 Given the automaton \texttt{aut} and the integer \texttt{len}, \texttt{java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
\begin{Verbatim}[commandchars=!@|fontsize\small,frame=ingle,abel=]
@gap|!@NumberAcceptedWords(,1;java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
  3
  !gapprompt@gap>| !gapinput@NumberAcceptedWords(ba,16);|
  1
  !gapprompt@gap>| !gapinput@|
endVerbatim}
 }

 

\subsection{\textcolor{Chapter }{AutStateTransitionMatrix}}
\logpage{[ 6, 4, 3 ]}\nobreak
\hyperdef{L}{X7BAE229C84A45841}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{AutStateTransitionMatrix({\mdseries\slshape aut})\index{AutStateTransitionMatrix@\texttt{AutStateTransitionMatrix}}
\abelAutStateTransitionMatrix}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
A matrix         2 2 3 3]  3 3 ,4]  ,3 4,3 ,[3 3, 3, 3 ] ] )



 In the matrix computed by \texttt{AutStateTransitionMatrix} the rows are indexed by the state the transitions are originating from, the
columnns are indexed by the states the transitions are ending at. Each entry $a_{i,j}$ of the matrix represents the number of transitions from the state $i$ to the state $j$. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@AutStateTransitionMatrix(ba);|
  [ [ 0, 4, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 4, 0, 0, 0, 0, 0, 0, 0 ], 
    \V}
    [ 0, 3, 0, 1, 0, 0, 0, 0, 0 ], [ 0, 3, 0,  
 [ 0, 3 0,0,0,1 0 00] 
    [ 0, 3, 0, 0, 0, 0, 0, 1, 0 ] ]
  !gapprompt@gap>| !java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{AcceptedWords}}
\logpage{[ 6{ntF{\triangleright\nspace\{InvolvementTransducer{\dseriesslshape })i{@textttInvolvementTransducer}java.lang.StringIndexOutOfBoundsException: Index 168 out of bounds for length 168
\hyperdef{L\\Returns: java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
\\{{\$enspacetexttt{cceptedWords{mdseriesslshape ,int)indexAcceptedWords\exttt{}
\label{AcceptedWords}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
All words of length \texttt{int} that are accepted by the automaton \texttt{aut}.



 \texttt{AcceptedWords} outputs all permutations accepted by the automaton \texttt{aut}, which have length \texttt{int}, in a list. The permutations are output in their rank encoding. 
\begin{Verbatim}[java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
 gappromptgap>| !gapinput@AcceptedWords(ba,1);|
  [ [ 2 ], [ 3 ], [ 4 ] ]
 gg> !AcceptedWords(,)|
[[4  4,2 ,2 ,2   ,2 4 2,1 1]]
  !gapprompt@gap>| !gapinput@|
end{erbatim}
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

 

\{textcolor}AcceptedWordsR}}
logpage{ ,4,5 }\obreak
         2 ,3 3 ]  3 1, 3 3 ,[3 , 3,3 ,[1 ,4,4 ] 
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace         ,0,4  ,[2,2 ,4]  2 0  2]  3 3  4] 
\label{AcceptedWordsR}
hfillscriptsize function)\java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
      \figureH begin l\[=.75{/.}\{}endfigure}
\label{AcceptedWordsReversed}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
The list of all by the automaton accepted words of length \texttt{int1}, where each word is written in reverse.



 \{}and\{}are and  thefollowingarguments;an  t{} integer\int1}which thelengthofthe wordsthat  bythe texttt{}and   textttint2}which  optional representstheinitial  \{}  valueof functions   containing  permutations
of length \texttt{int1} that are accepted by \texttt{aut}. The permutations are rank encoded and written in reverse. 
{noindenttextcolor{}$triangleright$enspace\{CombineAutTransducer{mdseriesslshapeaut }\C@t{}java.lang.StringIndexOutOfBoundsException: Index 174 out of bounds for length 174
!@ap> gapinput@cceptedWordsRba1);|
  [ [ 2 ], [ 3 ], [ 4 ] ]
  !gapprompt@gap>| !gapinput@AcceptedWordsReversed(ba,16); |
  [ [ 1, 1, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 1, 4 ] ]
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 }

 }

 }

 
c\{}{Permutation}}logpage[7,0,0]java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
\hyperdef{L}{X81DB657E7FEF0295}{}
{
 In this chapter we mention a couple functions that are fairly basic but useful
tools to work with. 
\section{\textcolor{Chapter }{ Complement }}\logpage{[ 7, 1, 0 ]}
\hyperdef{L}{X80E3E5BB8156C6A1}{}
{
 !@gapB!@=21[121,][,,,]B

{Chapter}{ermComplement}
\logpage{[ 7, 1, 1 ]}\nobreak
\hyperdef{L}{X820405DB787A5D32}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{(\s )indexPermComplement@\texttt{PermComplement}}
\label{PermComplement}
}\hfill{\scriptsize (function)}}\\
\    transitions := [ [ 1, 2, 1, 2 ], [ 2, 1, 1, 2 ], [ 1, 1, 2, 1 ], 
permutation  isthecomplement of textttperm.



 The complement of a permutation $\tau=\  ba*
\[\tau^{  gapprompt@> gapinputDisplayres)B
. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,    |[ 1 ]java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
  !gapprompt@gap>| !gapinput@PermComplement([3,2,8,6,7,1,5,4]);|
  [ 6, 7, 1, 3, 2, 8, 4, 5 ]
 gapprompt@> gapinput@java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
\end  gappromptgap g@java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
 }

 }

 
\section{\textcolor{Chapter }{ Rank Encoding }}\logpage{[ 7, 2, 0 ]}
\{
{
 

\subsection{\textcolor{Chapter }{IsRankEncoding}}
\logpage{[ 7, 2, 1 ]}\nobreak
\hyperdef{L}{X7F1000E882050AFF}{}
{\noindent\textcolor{\abel{
\{}
}\hfill{\scriptsize (function)}}\\
\textbf{\indentAnautomaton  therankencoded of of
\texttt{true} if \texttt{perm} is a java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 0



 \texttt{IsRankEncoding} checkes whether the\BL=L{}D{}^r cap^{c\java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
class automaton,withthehighestrankbeing bythe highest  in \texttt{perm}. 
\\begin{Verbatim[commandchars=!CF,fontsize=\mallframesinglelabelExample]
  gappromptgap|!IsRankEncoding(3,,,,412,];java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
true
  !gapprompt@gap>| !gapinput@IsRankEncoding([3,2,6,4,5,1,2,1]);|
  
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 }

}

                   }

 
\chapter{\textcolor{Chapter }{Properties of Permutations }}\logpage{[ 8, 0, 0 ]}
\hyperdef{L}{X87A0210C7BCFBA99}{}
{
 It has been of interest        2  8755      java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
.include plus\{\ymbol{}and
minus\texttt{\symbol{45}}decomposable permutations,
block\texttt\{45}  permutations  well  
  direct sum permutations  acoupleof
definitions on which some of the properties are based on:

 An interval of a permutation $\sigma$ is a set of contiguous values which in $\sigma$ have consecutive indices. 

  permutation oflength$$ iscalled simple if it only containsthe intervals oflength 0 1and$$. 

 
hapter}Intervals   }\ogpage{ , 1,0 }
\hyperdef{L}{X85B2BC647868C9C4}{}
{
     |22    2   56  java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35

\subsection{\textcolor{Chapter }{IsInterval}}
\logpage{[ 8, 1, 1 ]}\nobreak
\hyperdef{  gappromptCgap>F!gapinputCF
{\noindent Ignoring  trailing textttUbUc}which  noise thebasis   pattern indicates which
{}
\\(}\\
\textbf{\indent Returns:\ java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
\{ 6 ,2]\



 IsInterval takes in any list\{ClassAutomaton}
lexicographically and checkes whether it is an interval.  
beginVerbatim[commandchars=!|,fontsize\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@IsInterval([3,6,9,2]);|
  false
!@gap> !@IsInterval([2,6,5,,4]);|
  true
  !gapprompt@gap>| !gapinput
endVerbatim
}

 }

 
section{textcolor{Chapter}{ Simplicity }}\logpage{[ 8, 2, 0 ]}
\hyperdef{L}{X7B82346E7E2C330C}{}
{
Asmentioned apermutation  tobesimple  only 
intervals\{[=@,=smallframes,labelExamplejava.lang.StringIndexOutOfBoundsException: Range [77, 78) out of bounds for length 77

\subsection{\textcolor{Chapter }{ gapprompt> gapinput@2,,2,,122][,,,,,,,,],7,15) B
\logpage{[ 8, 2, 1 ]}\nobreak
\hyperdef{L}{X7ECAD3E4818C589D}{}
{noindenttextcolor{FuncColor}$\riangleright$\enspace\texttt{IsSimplePerm({\mdseries\slshape perm})\index{IsSimplePerm@\texttt{IsSimplePerm}}
  <deterministicautomatonon4     >
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
\texttt{true} if \texttt{perm} is simple.



 To check whether \texttt{perm} (length of \texttt{perm} = $n$) is a simple permutation \texttt{IsSimplePerm} uses the basic algorithm  !gapprompt@> gDisplay);
\begin{Verbatim}     |  1  2345  6   89java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
  gapprompt@gap>| !gapinput@IsSimplePerm([2,3,4,5,1,1,1,1]);|
  true
  !gapprompt@  8  2  8  7  5  5  7  8  8  
  true
  !gapprompt@gap>| !gapinput@IsSimplePerm([3,2,8,6,7,1,5,4]);|
  false
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 }

 }

 
\section{\textcolor{ java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
\hyperdef{L}{X7A6836EC7E9CE3D8}{}
{
 In \cite{SimpPermsPosetjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
permutation and then \logpage{[ 6, 2, 3 ]}\nobreak
resulting permutation would still be\hyperdef{}X856A6F5085BAA7C3{
 functions such that the set of simple permutations of shorter length,
by one deletion, can be found. 

\subsection{\textcolor{Chapter }{OnePointDelete}}
\logpage{[ 8, 3, 1 ]}\nobreak
\hyperdef{L}{X877D962E7FBFB47E}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\\{indentReturns: java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
\label{OnePointDelete}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
A list of simple permutations with one point less than \texttt{perm}.



 \texttt{OnePointDelete} removes single points in the simple permutation and returns a list of the
resulting simple permutations, in their rank  The bounded class automaton, is an automaton that  rankencoded
\{[=@,=\small,=singlelabelExample]
  !gapprompt@gap>| !gapinput@OnePointDelete([5,2,3,1,2,1]);|
  [[2,,1 2 1 ]  4 1  2,1 
  !gapprompt@gap  gappromptgap> gapinput@()E
  [ [ 2, 3, 1, 2, 1 ], [ 4, 1, 2, 2, 1 ] ]
 !|
\end{Verbatim}
 }

 

\subsection{\  Accepting state  
\logpage{[ 8, 3, 2 ]}\nobreak
\hyperdef{L}{X787F62137E709A2C}{}
{\noindent\textcolor{ }
\label{TwoPointDelete}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
The exceptional permutation with two point less than \texttt{perm}.



 \texttt{TwoPointDelete} removes two points of the input exceptional permutation and returns the list
of the unique resulting permutation, in its rank encoding.  
\smallf=inglelabel=Examplejava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
  gapprompt@ap|!T(24681,,,];
  [ [ 2, 3, 4, 1, 1, 1 ] ]
  !gapprompt@gap>| !gapinput@java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
  [ [ 2, 3, 4, 1, 1, 1 ] ]
  !gapprompt@gap>| !gapinput@|
eV}
 }

 

\subsection{\textcolor{Chapter }{PointDeletion}}
\logpage{[ 8, 3, 3 ]}\nobreak
\hyperdef{L}{X8696CBE580B27FE5}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{PointDeletion({\mdseries\java.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 28
\label{PointDeletion}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
A list of simple permutations with of shorter length than \texttt{perm}.



 \texttt{PointDeletion} takes any simple permutation does not matter whether exceptional or not and
removes the right number of points.  
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@PointDeletion([5,2,3,1,2,1]);|
  [ [ 2, 3, 1, 2, 1 ], [ 4, 1, 2, 2, 1 ] ]
  !gapprompt@gap>| !gapinput@PointDeletion([5,2,4,1,6,3]);|
  [ [ 2, 3, 1, 2, 1 ], [ 4, 1, 2, 2, 1 ] ]
  !gapprompt@gap>| !gapinput@PointDeletion([2,4,6,8,1,3,5,7]);|
  [ [ 2, 3, 4, 1, 1, 1 ] ]
  !gapprompt@gap>| !gapinput@PointDeletion([2,3,4,5,1,1,1,1]);|
  [ [ 2, 3, 4, 1, 1, 1 ] ]
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 }

 }

 
\section{\textcolor{Chapter }{ Block\texttt{\symbol{45}}Decomposition }}\logpage{[ 8, 4, 0 ]}
\hyperdef{L}{X87EB37927F40662B}{}
{
 Given a permutation $\pi$ of length $m$ and nonempty permutations $\alpha_{1},\ldots,\alpha_{m}$ the inflation of $\pi$ by $\alpha_{1},\ldots,\alpha_{m}$, written as $\pi[\alpha_{1},\ldots,\alpha_{m}]$, is the permutation obtained by replacing each entry $\pi(i)$ by an interval that is order isomorphic to $\alpha_{i}$ \cite{SimpSurv}. Conversely a block\texttt{\symbol{45}}decomposition of $\sigma$ is any expression of $\sigma$ as an inflation $\sigma=\pi[\alpha_{1},\ldots,\alpha_{m}]$. The block decomposition of a permutation is unique if and only if $\sigma,\pi,\alpha_{1},\ldots,\alpha_{n}$ all are in the same pattern class and $\pi$ is simple and $\pi\neq 1 2,\ 2 1$ \cite{SimpAndPRestrPerms}. 

 For example the inflation of $25413[21,1,1,1,2413]=3 2 8 9 1 5 7 4 6$, written in \textsf{GAP} this is \texttt{[[2,5,4,1,3],[2,1],[1],[1],[1],[2,4,1,3]]}. This decomposition of $3 2 8 9 1 5 7 4 6$ is not unique. The unique block\texttt{\symbol{45}}decomposition, as described
above, for $3 2 8 9 1 5 7 4 6=2413[21,12,1,2413]$ or in \textsf{GAP} notation \texttt{[3,2,8,9,1,5,7,4,6]=[[2,4,1,3],[2,1],[1,2],[1],[2,4,1,3]]}. 

\subsection{\textcolor{Chapter }{Inflation}}
\logpage{[ 8, 4, 1 ]}\nobreak
\hyperdef{L}{X8279728778F1F299}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{Inflation({\mdseries\slshape list{\textunderscore}of{\textunderscore}perms})\index{Inflation@\texttt{Inflation}}
\label{Inflation}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
A permutation that represents the inflation of the list of permutations,
taking the first permutation to be $\pi$, as described in the definition of inflation.



 Inflation takes the list of permutations that stand for a box decomposition of
a permutation, and calculates that permutation by replacing each entry $i$ in the first permutation by an interval order isomorphic to the permutation in
index $i+1$.  
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@Inflation([[3,2,1],[1],[1,2],[1,2,3]]);|
  [ 6, 4, 5, 1, 2, 3 ]
  !gapprompt@gap>| !gapinput@Inflation([[1,2],[1],[4,2,1,3]]);|
  [ 1, 5, 3, 2, 4 ]
  !gapprompt@gap>| !gapinput@Inflation([[2,4,1,3],[2,1],[3,1,2],[1],[2,4,1,3]]);|
  [ 3, 2, 10, 8, 9, 1, 5, 7, 4, 6 ]
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{BlockDecomposition}}
\logpage{[ 8, 4, 2 ]}\nobreak
\hyperdef{L}{X7C07BE268055FEBD}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{BlockDecomposition({\mdseries\slshape perm})\index{BlockDecomposition@\texttt{BlockDecomposition}}
\label{BlockDecomposition}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
A list of permutations, representing the
block\texttt{\symbol{45}}decomposition of \texttt{perm}. In the list the first permutation is $\pi$, as described in the definiton of block\texttt{\symbol{45}}decomposition
above.



 \texttt{BlockDecomposition} takes a plus\texttt{\symbol{45}} and minus\texttt{\symbol{45}}indecomposable
permutation and decomposes it into its maximal maximal intervals, which are
preceded by the simple permutation that represents the positions of the
intervals. If a plus\texttt{\symbol{45}} or
minus\texttt{\symbol{45}}decomposable permutation is input, then the
decomposition will not be the unique decomposition, by the definition of
plus\texttt{\symbol{45}} or minus\texttt{\symbol{45}} decomposable
permutations, see below.  
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@BlockDecomposition([3,2,10,8,9,1,5,7,4,6]);|
  [ [ 2, 4, 1, 3 ], [ 2, 1 ], [ 3, 1, 2 ], [ 1 ], [ 2, 4, 1, 3 ] ]
  !gapprompt@gap>| !gapinput@BlockDecomposition([1,2,3,4,5]);                      |
  [ [ 1, 2 ], [ 1, 2, 3, 4 ], [ 1 ] ]
  !gapprompt@gap>| !gapinput@BlockDecomposition([5,4,3,2,1]);|
  [ [ 2, 1 ], [ 4, 3, 2java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
  !gapprompt@gap>| !gapinput@ |
\end{Verbatim}
 }

 }

 
\section\{[ 6, ,5]\
\hyperdef{L}{X8278DD0F7F128656}{}
{
 A permutation $\sigma$ is said to be plus\texttt{\symbol{45}}decomposable if it can be written
uniquely in the following form, 
\[\sigma = 12 [\alpha_{1},\alpha_{2}] \]
 where $\alpha_{1}$ is not plus\texttt{\symbol{45}}decomposable. 

 The subset of a rational class, containing all permutations that are
plus\texttt{\symbol{45}}decomposable and in the class, has been found to be
also rational under the rank encoding. 

\subsection{\textcolor{Chapter }{IsPlusDecomposable}}
\logpage{[ 8, 5, 1 ]}\nobreak
\hyperdef{L}{X80CBC61C851B1D20}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{IsPlusDecomposable({\mdseries\slshape perm})\index{IsPlusDecomposable@\texttt{IsPlusDecomposable}}
\label{IsPlusDecomposable}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
\texttt{true} if \texttt{perm} is plus\texttt{\symbol{45}}decomposable.



 To check whether \texttt{perm} is a plus\texttt{\symbol{45}}decomposable permutation \texttt{IsPlusDecomposable} uses the fact that there has to be an interval $1..x$ where $x <n$ ($n$ = length of the \texttt{perm}) in the rank encoded permutation that is a valid rank encoding.  
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@IsPlusDecomposable([3,3,2,3,2,2,1,1]);|
  true
  !gapprompt@gap>| !gapinput@IsPlusDecomposable([3,4,2,6,5,7,1,8]);|
  true
  !gapprompt@gap>| !gapinput@IsPlusDecomposable([3,2,8,6,7,1,5,4]);|
  false
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 }

 }

 
\section{\textcolor{Chapter }{ Minus\texttt{\symbol{45}}Decomposability }}\logpage{[ 8, 6, 0 ]}
\hyperdef{L}{X801EF8FB79F18910}{}
{
 Minus\texttt{\symbol{45}}decomposability is essentially the same as
plus\texttt{\symbol{45}}decomposability, the difference is that if a
permutation $\sigma$ is minus\texttt{\symbol{45}}decomposable, it can be written uniquely in the
following form, 
\[\sigma = 21 [\alpha_{1},\alpha_{2}] \]
 where $\alpha_{1}$ is not minus\texttt{\symbol{45}}decomposable. 

 Here also, the subset of a rational class, containing all permutations that
are minus\texttt{\symbol{45}}decomposable and in the class, has been found to
be rational under the rank encoding. 

\subsection{\textcolor{Chapter }{IsMinusDecomposable}}
\logpage{[ 8, 6, 1 ]}\nobreak
\hyperdef{L}{X87A6DF207B27C676}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{IsMinusDecomposable({\mdseries\slshape perm})\index{IsMinusDecomposable@\texttt{IsMinusDecomposable}}
\label{IsMinusDecomposable}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
\texttt{true} if \texttt{perm} is minus\texttt{\symbol{45}}decomposable.



 To check whether \texttt{perm} (length of \texttt{perm} = $n$) is a minus\texttt{\symbol{45}}decomposable permutation \texttt{IsMinusDecomposable} uses the fact that the first $n-x$, where $x<n$, letters in the rank encoding of \texttt{perm} have to be $>x$ and that the letters from position $x+1$ until the last one have to be $\leq x$.  
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@IsMinusDecomposable([3,3,3,3,3,3,2,1]);|
  true
  !gapprompt@gap>| !gapinput@IsMinusDecomposable([3,4,5,6,7,8,2,1]);|
  true
  !gapprompt@gap>| !gapinput@IsMinusDecomposable([3,2,8,6,7,1,5,4]);|
  false
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 }

 }

 
\section{\textcolor{Chapter }{ Sums of Permutations }}\logpage{[ 8, 7, 0 ]}
\hyperdef{L}{X7B7C59AA84E3425C}{}
{
 The direct sum of two \hyperdef{L}}}
\[\sigma \oplus \tau = \sigma_{1}\ \ \sigma_{2}\ldots\sigma_{k}\ \ \tau_{1}+k\ \
t{}kldots\tau_{l}+k\ .\]
 In a similar fashion the skew sum of $\sigma, \tau$ is 
\[\sigma \ominus \tau = \sigma_{1}+l\ \ \sigma_{2}+l\ldots\sigma_{k}+l\ \
\tau_{1}\ \tau_{2}\ldots\tau_{l}\ .\]
 The calculation of the direct and skew sums of permutations using the rank
encoding is also straight forward and is used in the functions described
below. The direct sum of two permutations $\sigma,\tau$ represented as their rank encoded sequences is the permutation which has the
rank encoding that is the concatention of the rank encoding of $\sigma$ and $\tau$. The skew sum of two permutations $\sigma,\tau$ encoded by the rank encoding is the concatenation of the rank encodings of $\sigma$ and $\tau$ where in the sequence corresponding to $\sigma$ under the rank encoding each element has been increased by $l$, with $l$ being the length of $\tau$. 

\subsection{\textcolor{Chapter }{PermDirectSum}}
\logpage{[ 8, 7, 1 ]}\nobreak
\hyperdef{L}{X7E0DD72F7F6E0440}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{PermDirectSum({\mdseries\slshape perm1, perm2})\index{PermDirectSum@\texttt{PermDirectSum}}
\label{PermDirectSum}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
A permutation resulting from \texttt{perm1} $\oplus$ \texttt{perm2}.



 \texttt{PermDirectSum} returns the permutation corresponding to \texttt{perm1} $\oplus$ \texttt{perm2} if \texttt{perm1} and \texttt{perm2} are both not rank encoded. If both \texttt{perm1} and \texttt{perm2} are rank encoded, then \texttt{PermDirectSum} returns a rank encoded sequence. 
\begin{Verbatim[=!@,=small,=]
  !gapprompt@gap>| !gapinput@PermDirectSum([2,4,1,3],[2,5,4,1,3]);|
  [ 2, 4, 1, 3, 6, 9, 8, 5, 7 ]
  !gapprompt@gap>| !gapinput@PermDirectSum([2,3,1,1],[2,4,3,1,1]);|
  [ 2, 3, 1, 1, 2, 4, 3, 1, 1 ]
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 }

 

\subsection{\textcolord| 7     java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
\logpage{[ 8, 7, 2 ]}\nobreak
\hyperdef{L}{X7CE8A32A78A4A6BB}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{PermSkewSum({\mdseries\slshape perm1, perm2})\index{PermSkewSum@\texttt{PermSkewSum}}
\label{PermSkewSum}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
A permutation resulting from \texttt{perm1} $\ominus$ \texttt{perm2}.



 \texttt{PermSkewSum} returns the permutation corresponding to \texttt{perm1} $\ominus$ \texttt{perm2} if \texttt{perm1} and \texttt{perm2} are both not rank encoded. If both \texttt{perm1} and \texttt{perm2} are rank encoded, then \texttt{PermSkewSum} returns a rank encoded sequence. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@PermSkewSum([2,4,1,3],[2,5,4,1,3]);|
  [ 7, 9, 6, 8, 2, 5, 4, 1, 3 ]
  !gapprompt@gap>| !gapinput@PermSkewSum([2,3,1,1],[2,4,3,1,1]);|
  [ 7, 8, 6, 6, 2, 4, 3, 1, 1 ]
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 }

 }

 }

 
\chapter{\textcolor{Chapter }{ Regular Languages of Sets of Permutations }}\logpage{[ 9, 0, 0 ]}
\hyperdef{L}{X7E9C84807FCB6408}{}
{
  This chapter is dedicated to the different sets of permutations with the same
properties. 
\section{\textcolor{Chapter }{ Inversions in Permutations }}\logpage{[ 9, 1, 0 ]}
\hyperdef{L}{X82F103DB7A446E7B}{}
{
 An inversion in a permutation $\tau=\tau_{1}\ldots\tau_{n}$ is a pair $(i,j)$ such that $1\leq i<j\leq n$ and $\tau_{i}>\tau_{j}$ \cite{UpBndStanWilf1324}. 

\subsection{\textcolor{Chapter }{InversionAut}}
\logpage{[ 9, 1, 1 ]}\nobreak
\hyperdef{L}{X79B3989A7D90B227}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{InversionAut({\mdseries\slshape k})\index{InversionAut@\texttt{InversionAut}}
\label{InversionAut}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
An automaton that accepts all permutations with exactly \texttt{k} inversions.



 The rational language of all permutations with a given number , \texttt{k}, of inversions is computed by \texttt{InversionAut}. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@a:=InversionAut(1);|
  < deterministic automaton on 2 letters with 4 states >
  !gapprompt@gap>| !gapinput@AutToRatExp(a);|
  a*baa*
  !gapprompt@gap>| !gapinput@Spectrum(a);     |
  [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 ]
  !gapprompt@gap>| !gapinputeVerbatim
  < deterministic automatonjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  @b)|
  ((a*ba*bUa*c)a*bUa*ba*cUa*d)a*(ba*baa*Ucaaa*)U(a*ba*bUa*c)a*(ca*baa*Udaaaa*)U(\
  a*ba*daUa*eaa)a*baa*Ua*ba*(dbUeaa)aaa*U(a*eabUa*(ebUfaa)a)aaa*
  !gapprompt@gap>| !gapinput@Spectrum(b);   |
  [ 0, 0, 0, 3, 22, 71, 169, 343, 628, 1068\{xpandAlphabet}
!gap|!@java.lang.StringIndexOutOfBoundsException: Range [30, 31) out of bounds for length 30
\end{Verbatim}
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 

{textcolor{ }InversionAutOfClass}
\logpage{[ 9, 1, 2 ]}\nobreak
\hyperdef{L}{X7C6166407D4A1798}{}
{\noindent\textcolor{  gappromptgap gapinputaut=(det,,2[2,,][,,],1][];
\  < on2 with 3 >
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
 acceptingall     \{}inversions.



 \texttt{InversionAutOfClass} intersects the rational pattern class with the rational language containing
all permutations under the rank encoding that have exactly \texttt{inv} inversions. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@a:=MinimalAutomaton(GraphToAut(Seqstacks(2,2),1,6));|
  < deterministic automaton on 3 letters with 3 states >
  !gapprompt@gap>| !gapinput@Spectrum(a);                                        |
  [ 1, 2, 6, 18, 54, 162, 486, 1458, 4374, 13122, 39366, 118098, 354294, 
    1062882, 3188646 ]
  !gapprompt@gap>| !gapinput@b:=InversionAutOfClass(a,4);                        |
  < deterministic automaton on 5 letters with 23 states >
  !gapprompt@gap>| !gapinput@Spectrum(b);                                        |
  [ 0, 0, 0, 3, 13, 35, 75, 140, 238, 378, 570, 825, 1155, 1573, 2093 ]
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 }

 }

 
  !gapprompt@gap>B !gapinput@Display(last);B
\hyperdef{L}{X8603B5A3872690FD}{}
{
  

\subsection{\textcolor{Chapter }{PlusDecomposableAut}}
\logpage{[ 9, 2, 1 ]}\nobreak
\hyperdef{L}{X7B43561F78C4C03C}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{PlusDecomposableAut({\mdseries\slshape aut})\index{PlusDecomposableAut@\texttt{PlusDecomposableAut}}
\label{PlusDecomposableAut}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
An automaton that accepts the subset of the class \texttt{aut} containing the plus\texttt{\symbol{45}}decomposable permutations of \texttt{aut}.



 The \texttt{PlusDecomposableAut} automaton accepts the      java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
permutations of the encoded class accepted by \texttt  state:[3 java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
beginVerbatim}commandchars!|fontsize=,rame,=]
  !gapprompt@gap>| !gapinput@xa:=MinimalAutomaton(GraphToAut(
  < deterministic automaton java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
);|
  [ 1, 2, 6, 23, 89, 345, 1338, 5189, 20122, 78024, 302529, 1172993, 4547973, 
    17633432, 68368135 ]

  < deterministic automaton on 4 letters with 16 states >
  !gapprompt@gap>| !sum has infinitely many permutations ofthe  class java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
  [ 0, 1, 3, 11, 47, 196, \{}}
    13853682, 54945158 ]
!@>!apinput|
\end{Verbatim}
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

 

\subsection{\textcolor{Chapter }{PlusIndecomposableAut}}
\logpage{[ 9, 2, 2 ]}\nobreak
{}X780030727DF57B1C}}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{PlusIndecomposableAut({\mdseries\slshape
\label{java.lang.StringIndexOutOfBoundsException: Range [0, 28) out of bounds for length 0
}\hfill\scriptsize f)}java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
\textbf\Returns: java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
 \textttaut  arenot\\{}decomposable.



 \PlusIndecomposableAutomaton}automaton  theofallplus\{symbol45}indecomposable
ofthe encoded accepted byaut, by rejecting everyrank
encoding that in the original!gapF!|:java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
state before the last letter in the rank!|F!|b;F
}commandchars@fontsize\framesingle,=]
!gap|!@:MinimalAutomaton(raphToAutParstacks(,)1,);
  < deterministic automaton on 4 letters with 9 states >
  !gapprompt@gap>| !gapinput@Spectrum(xa);|
  ,2,6,23,89,3451338, 20122 78024,302529 ,4547973 
    17633432, 68368135 ]
  !gapprompt@gap>| !gapinput@a:=PlusIndecomposableAut(xa  gapprompt|>!F
  < deterministic automaton on 4 letters with 11 states >
  !gapprompt@gap>| !gapinput@Spectrum(a);|
  [ 1, 1, 3, 12, 42, 149, 530, 1883, 6689 
   3779750, java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 }

 

{textcolor{ }MinusDecomposableAut}java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
\logpage{[ 9, 2, 3 ]}\nobreak
\hyperdef{L}{X80F5A8AC8306FEE2}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{MinusDecomposableAut({\mdseries\slshape aut  gappromptgap> gapinput:GraphToAutx16;java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
\label{MinusDecomposableAut}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
An automaton that accepts the subset of the class \texttt{aut} containing the minus\texttt{\symbol{45}}decomposable permutations of \texttt{aut}.



 The \texttt{MinusDecomposableAut} automaton accepts the language of all minus\texttt{\symbol{45}}decomposable
permutations of the rank encoded class accepted by \texttt{aut}.  
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@xa:=MinimalAutomaton(GraphToAut(Parstacks(2,2),1,6));|
  < deterministic automaton on 4 letters with 9 states >
  !gapprompt@gap>| !gapinput@Spectrum(xa);|
  [ 1, 2, 6, 23, 89, 345, 1338, 5189, 20122, 78024, 302529, 1172993, 4547973, 
    17633432, 68368135 ]
  !gapprompt@gap>| !gapinput@a:=MinusDecomposableAut(xa);                         |
  < deterministic automaton on 4 letters with 12 states >
  !gapprompt@gap>| !gapinput@Spectrum(a);                                         |
  [ 0, 1, 3, 10, 24, 64, 180, 520, 1524, 4504, 13380, 39880, 119124, 356344, 
    1066980 ]
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{MinusIndecomposableAut}}
\logpage{[ 9, 2, 4 ]}\nobreak
\hyperdef{L}{X8689DB147A7EE2C1}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{MinusIndecomposableAut({\mdseries\slshape aut})\index{MinusIndecomposableAut@\texttt{MinusIndecomposableAut}}
\label{MinusIndecomposableAut}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
An automaton that accepts all permutations of \texttt{aut} that are not minus\texttt{\symbol{45}}decomposable.



 The \texttt{MinusIndecomposableAut} automaton accepts the language of all minus\texttt{\symbol{45}}indecomposable
permutations of the encoded class accepted by aut, which is the complement set
of the set of minus\texttt{\symbol{45}}decomposable permutations within the
class.  
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@xa:=MinimalAutomaton(GraphToAut(Parstacks(2,2),1,6));|
  < deterministic automaton on 4 letters with 9 states >
  !gapprompt@gap>| !gapinput@Spectrum(xa);|
  [ 1, 2, 6, 23, 89, 345, 1338, 5189, 20122, 78024, 302529, 1172993, 4547973, 
    17633432, 68368135 ]
  !gapprompt@gap>| !gapinput@a:=MinusIndecomposableAut(xa);|
  < deterministic automaton on 4 letters with 17 states >
  !gapprompt@gap>| !gapinput@Spectrum(a);|
  [ 1, 1, 3, 13, 65, 281, 1158, 4669, 18598, 73520, 289149, 1133113, 4428849, 
    17277088, 67301155 ]
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 }

 }

 
\section{\textcolor{Chapter }{ Language of all non\texttt{\symbol{45}}simple permutations }}\logpage{[ 9, 3, 0 ]}
\hyperdef{L}{X80E741077DE09F63}{}
{
  The regular language of all non\texttt{\symbol{45}}simple rank encoded
permutations with highest rank $k$ is described by the following equation, 
\[ E(NS_{k}) = E(\Omega_{k}) \cap ( \bigcup_{l=1}^{k-1} P_{l} \bigcup_{m=l}^{k-1}
E(\hat{\Omega}_{k-m})^{+m} \cup \bigcup_{j=1}^{k-1} E(\hat{\Omega}_{k-j})^{+j}
\cup \]
 
\[ \cup \bigcup_{a=2}^{k-1} \bigcup_{b=0}^{k-1-a} Q_{a,b} \bigcup_{i=0}^{a-2}
(E(\hat{\Omega}_{k-(b+i)})^{+b+  < deterministic automaton on 4  9states java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
E(\mathcal{D}_{P}(\Omega_{k})) \]
 where java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 $P_{l}$ is the language of prefixes of rank encoded permutations{\oindent\extcolorFuncColor$triangleright$texttt{pectrum{mdseries\ , ])iSpectrumtexttt{}
ends with}\hfill{\scriptsizefunction}\java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34

 Q_{,} is the languageof prefixes ofrankencodedpermutations, where the prefix
ends with a gap of size $i$ and the sum of the sizes of gaps below equals to $j$. 

 $E(\Omega_

 $(Omega_k){i} thesublanguageof$(Omega_{}$containingthewordsoflength \ i,$ in\athbb{}.

 $E(\hat{\Omega}_{k})$ is the sublanguage of $E(\Omega_little  secondoptional  regulates ofthe .java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70

 $E(\  [ 3, 0, 0 1 0 0 0,1,0 0,0,1,0,,0java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
described in \cite{RegLangPlusMinPerms}. 

\subsection{\textcolor{Chapter }{LengthBoundAut}}
\logpage{[ 9, 3, 1 ]}\nobreak
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{\noindent\textcolor{FuncColor}{$\\logpage{ ,4, 3 ]}\nobreak
\label{LengthBoundAut}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
The subautomaton of \texttt{aut} that accepts words between (and including) the lengths \texttt{min} and \texttt{i}.



 We are taking the automaton \texttt{aut} and it's alphabet \texttt{k}, and find \{}
\eginVerbatim[ommandchars=@,=\,framesinglelabelExample
gap|!@=(4) java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
  < java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
  gapprompt@ap|!Spectruma;java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
   ,2 6 24 ,384  6144,24576 ,393216,1572864 6291456 
 25165824,100663296 java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
!gap|!@(a,,,)|
  < deterministic automaton on 4 letters with 22 states >
  !gapprompt@gap>[1,3,0,0,0,0,0,0,0]  ,2 ,0 0 0 0,0,1 ] 
  [ 0, 0, 0, 24,  [0,3,0,,0,0,0 0 0]  ,3 ,1 ,0,0,0,0 ] 
  !gapprompt@gap>| !gapinput@|
\{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{ShiftAut}}
\logpage{[ 9, 3, 2 ]}\nobreak
\hyperdef{L}{X7B11C3137DEA8B4B}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ShiftAut({\mdseries\slshape i, k})\index{ShiftAut@\texttt{ShiftAut}}
\label{ShiftAut}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
The automaton $\Omega_{k-i}^{+i}$.



 We are shifting the alphabet of $\Omega_{k-i}$ in their values by $i$ to expand to the alphabet $\{1,\ldots,k\}$, but keeping the automaton structure of $\Omega_{k-i}$. 
\begin{Verbatim}[commandchars=!@B,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>B !gapinput@ShiftAut(2,4);B
  < non deterministic automaton on 4 letters with 4 states >
  !gapprompt@gap>B !gapinput@Display(last);B
     |  1       2       3       4
  -----------------------------------
   a |                                 
   b |                                 
   c | [ 2 ]   [ 4 ]   [ 4 ]   [ 4 ]   
   d | [ 3 ]   [ 3 ]   [ 3 ]   [ 3 ]   
  Initial state:   [ 1 ]
  Accepting state: [ 4 ]
  !gapprompt@gap>B !gapinput@ShiftAut(1,4);B
  < non deterministic automaton on 4 letters with 5 states >
  !gapprompt@gap>B !gapinput@Display(last);B
     |  1       2       3       4       5
  -------------------------------------------
   a |                                         
   b | [ 2 ]   [ 5 ]   [ 5 ]   [ 3 ]   [ 5 ]   
   c | [ 3 ]   [ 3 ]   [ 3 ]   [ 3 ]   [ 3 ]   
   d | [ 4 ]   [ 4 ]   [ 4 ]   [ 4 ]   [ 4 ]   
  Initial state:   [ 1 ]
  Accepting state: [ 5 ]
  !gapprompt@gap>B !gapinput@B
\end{Verbatim}
 }

 

\subsectionbegin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
\logpage{[ 9, 3, 3 ]}\nobreak
\hyperdef{L}{X864D53717A30C8EE}}
\noindenttFuncColor$triangleright$enspace\{{mdseriesslshape ,rank)index{extGap\N}java.lang.StringIndexOutOfBoundsException: Index 134 out of bounds for length 134
labeljava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
  of gapsizes.



 Knowing the current available gap sizes \java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 29
are separated by blocks where there are already points inserted. We determine
   point knownus \{}  being  what   sizes.
\begin{Verbatim}[commandchars=!@|,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
!@ap|!@NextGap(1,]2)|
  [ 1 ]
@NextGap[1,3)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
  [ 1, 1 ]
  !gapprompt@gap>| !gapinput@NextGap([2java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  [ 2, 1 ]
  !gapprompt@gap>| !gapinput@|
\end}
 }

 

\subsection{\textcolor{Chapter }{GapAut}}
\logpage{[ 9, 3, 4 ]}\nobreak
\hyperdef{L}{X7A660F527E913DB6}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{GapAut({\mdseries\slshape k})\index{GapAut@\java.lang.StringIndexOutOfBoundsException: Index 111 out of bounds for length 22
\label{GapAut}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
The non\texttt{\symbol{45}}deterministic automaton accepting the rank java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
a_k$thelist     sizes.



 The automaton accepts the rank encoded permutations of $\Omega_{k}$, but the automaton is slightly extended through having each state
corresponding to a gap size and the start state being the emptyset of gap
sizes. The transitions of the automaton     
ated  \NextGap.Please  that ofthe gapsizes the correspondsto the
state of   [ 6, 7, 1, 3 2 8 4 5 ]
\begin{Verbatim}[commandchars=!@B,fontsize=\small,frame=single  !apprompt@ap|!gapinput@|
\{Verbatimjava.lang.StringIndexOutOfBoundsException: Range [13, 2) out of bounds for length 2
  [<java.lang.StringIndexOutOfBoundsException: Range [54, 9) out of bounds for length 64
    [ [  ], [ 0 ], [ 1 ], [ 2 ], [ 1, 1 ] ] ]
  !gapprompt@gap>B !gapinput@Display(last[1]);B
     |  1       2       3       4       5
  -------------------------------------------
   a | [ 2 ]   [ 2 ]   [ 2 ]   [ 3 ]   [ 3 ]   

   c | [ 4 ]\hyperdef{L{X8453836D83A63E54}}
  Initial state:    [ 1 ]
  Accepting states: [ 1, 2 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  !gapprompt@gap>B!gapinput@ B
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{SumAut}}
\logpage{[ 9, 3, 5 ]}\nobreak
\hyperdef{L}{X809340BA7C999E86}{}
{\noindent\textcolor{FuncColor\exttt{true if\texttt{perm} is  valid rank encoding of a permutation.
\label{SumAut}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
The automaton accepting the language $P_{sum}$.



 This automaton is based on the \texttt{GapAut} where the accept states are chosen by their gap sizes, namely if the total sum
of gap sizes equal to \texttt{sum}. 
\begin{Verbatim}[commandchars=!@B,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>B !gapinput@SumAut(2,3);B
  < non deterministic automaton on 3 letters with 5 states >
  !gapprompt@gap>B !gapinput@Display(last);B
     |  1       2       3       4       5
  -------------------------------------------
   a | [ 2 ]   [ 2 ]   [ 2 ]   [ 3 ]   [ 3 ]   
   b | [ 3 ]   [ 3 ]   [ 3 ]   [ 3 ]   [ 3 ]   
   c | [ 4 ]   [ 4 ]   [ 5 ]   [ 4 ]   [ 5 ]   
  Initial state:    [ 1 ]
  Accepting states: [ 4, 5 ]
  !gapprompt@gap>B !gapinput@ B
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{GapSumAut}}
\logpage{[ 9, 3, 6 ]}\nobreak
\hyperdef{L}{X83BD683B7A92D492}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{GapSumAut({\mdseries\slshape gap, sum, k})\index{GapSumAut@\texttt{GapSumAut}}
\label{GapSumAut}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
The automaton accepting the language $Q_{gap,sum}$.



 This automaton is based on the \texttt{GapAut} where the accept states are chosen by their gap sizes, namely if there is a
gap size \texttt{gap} and the gap sizes before have a total sum of \texttt{sum}. 
\begin{Verbatim}[commandchars=!@B,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>B !gapinput@GapSumAut(1,0,3);B
  < non deterministic automaton on 3 letters with 5 states >
  !gapprompt@gap>B !gapinput@Display(last);   B
     |  1       2       3       4       5
  -------------------------------------------
   a | [ 2 ]   [ 2 ]   [ 2 ]   [ 3 ]   [ 3 ]   
   b | [ 3 ]   [ 3 ]   [ 3 ]   [ 3 ]   [ 3 ]   
   c | [ 4 ]   [ 4 ]   [ 5 ]   [ 4 ]   [ 5 ]   
  Initial state:    [ 1 ]
  Accepting states: [ 3, 5 ]
  !gapprompt@gap>B !gapinput@ B
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{NonSimpleAut}}
\logpage{[ 9, 3, 7 ]}\nobreak
\hyperdef{L}{X867C42167E943F94}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{NonSimpleAut({\mdseries\slshape k})\index{NonSimpleAut@\texttt{NonSimpleAut}}
\label{NonSimpleAut}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
The automaton accepting all rank encoded non\texttt{\symbol{45}}simple
permutations with rank encoding \texttt{k}



 We find the language of all non\texttt{\symbol{45}}simple permutations of the
set of all $k$ rank encoded permutations $\Omega_{k}\begin{[=@,\fs,labelExample]
begin{[=@,fontsize\mall,frame=label=java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
  t
  < deterministic automaton on 3 letters with 9 states >
 !gapB !apinputDa;
|12  3  4  5  6  7  8  9  
  --------------------------------
   a |  1  3  1  5  3  1  6  3  3  
   b |  3  3  3  3  9  9  3  9  3  
   c |  2  2  2  2  4  4  2  7  4  
  Initial state:   [ 8 ]
  Accepting state: [ 1 ]
  !gapprompt@gap>B !gapinput@B
\end{Verbatim}
 }

 }

 
\section{\textcolor{Chapter }{ Simplicity }}\logpage{[ 9, 4, 0 ]}
\hyperdef{L}{X7B82346E7E2C330C}{}
{
  The set of simple permutations of a class is the complement set of the class
with the non\texttt{\symbol{45}}simple permutations. We are working in the
rank encoding and so in language terms our set of simple permutations $S_{k}$ will be the subset of $\Omega_{k}$ 
\[ E(S_{k}) = E(\Omega_{k}\setminus NS_{k}) = E(\Omega_{k}) \setminus E(NS_{k}) =
E(\Omega_{k}) \cap E(NS_{k})^{C} \]
 

\subsection{\textcolor{Chapter }{SimplePermAut}}
\logpage{[ 9, 4, 1 ]}\nobreak
\hyperdef{L}{X7C7F3B6680370860}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{SimplePermAut({\mdseries\slshape k})\index{SimplePermAut@\texttt{SimplePermAut}}
\label{SimplePermAut}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
The automaton accepting all rank encoded simple permutations with highest rank
encoding \texttt{k}.



 We find the language of all simple permutations of the set of all $k$ rank encoded permutations $\Omega_{k}$ using the above equation. 
\begin{Verbatim}[commandchars=!@B,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>B !gapinput@SimplePermAut(3);B
  < deterministic automaton on 3 letters with 8 states >
  !gapprompt@gap>B !gapinput@Display(last);B
     |  1  2  3  4  5  6  7  8  
  -----------------------------
   a |  2  2  1  1  7  2  1  6  
   b |  2  2  4  2  2  4  4  2  
   c |  2  2  8  5  2  5  5  2  
  Initial state:    [ 3 ]
  Accepting states: [ 1, 3 ]
  !gapprompt@gap>B !gapinput@B
\end{Verbatim}
 }

 }

 
\section{\textcolor{Chapter }{Exceptionality}}\logpage{[ 9, 5, 0 ]}
\hyperdef{L}{X82CA692F808FA08F}{}
{
 A permutation is said to be exceptional if it is of one of the following
forms, 
\[ 2 4 6 \ldots (2m) 1 3 5 \ldots (2m-1) \]
 
\[ (2m-1) (2m-3) \ldots 1 (2m) (2m-2) \ldots 2 \]
 
\[ (m+1) 1 (m+2) 2 (m+3) 3 \ldots (2m) m \]
 
\[ m (2m) (m-1) (2m-1) \ldots 1 (m+1) \]
 where $m \geq 2$ \cite{SimpPermsPoset}. 

\subsection{\textcolor{Chapter }{IsExceptionalPerm}}
\logpage{[ 9, 5, 1 ]}\nobreak
\hyperdef{L}{X820901F881D220EE}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{IsExceptionalPerm({\mdseries\slshape perm})\index{IsExceptionalPerm@\texttt{IsExceptionalPerm}}
\label{IsExceptionalPerm}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
\texttt{True} if  }



 The functions checks whether \texttt{perm}
\begin{Verbatim}[commandchars=!@|,
  !gapprompt@gap>| !gapinput@IsExceptionalPerm([1,2,5,3,4]);|
  false
\hyperdef{}X7A6836EC7E9CE3D8}}
  false
  !gapprompt@gap>| !gapinput@IsExceptionalPerm([2 In \ite{} it shown  one  get chainsof permutations  startingwith ajava.lang.StringIndexOutOfBoundsException: Index 102 out of bounds for length 102
  true
  !gapprompt@gap>| !gapinput@java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 31
 
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{ExceptionalBoundedAutomaton}}
\logpage{[ 9, 5, 2 ]}\nobreak
\hyperdef{L}{X7B0086217E986ADA}{}
{\noindent\textcolor{FuncColor}
label{ExceptionalBoundedAutomaton}
}hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
The automaton which accepts all     
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 20



 The language of java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
,frame=l=
 java.lang.StringIndexOutOfBoundsException: Range [16, 12) out of bounds for length 62
  noindenttextcolor{{\$\nspace\exttt{(\dseries\lshape )index{woPointDelete\TwoPointDelete}}
  !gapprompt@gap>| }hfill{scriptsize(unction)\
  [ 0, 2, 0, 2, 0, 4, 0, 4, 0, 2, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0 ]
  !gapprompt@gap>| !gapinput@ExceptionalBoundedAutomaton(5);|
  < deterministic automaton on 5 letters with 21 states >
  !gapprompt@gap>| !gapinput@Spectrum(last);|
  [ 0, 2, 0, 2, 0, 4, 0, 2, 0, 0, 0, 0, 0, 0, 0 ]
  !gappromptjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
endjava.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 14
 }

java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

 
\java.lang.StringIndexOutOfBoundsException: Range [0, 8) out of bounds for length 1
\hyperdef{L}{X8308D685809A4E2F}{}
{
 noindent\extcolor{uncColor}{\\tP(\s perm}\{@texttt{ointDeletion
relevant to some specific ongoing research questions. 
{ {Permutation  Set }l{[10 ,0]
L{}}
{
 This  textttPointDeletion}takes  simple permutation   matter   or not 
in between two permutations. \begin{Verbatim}[commandchars=!@|=small,rame=ingle,abel=]

\subsection{\textcolor{Chapter }{InbetweenPermAutomaton}}
{[10 ,  }nobreak
\hyperdef{L}{X7E83DB497CCB5CDC}{}
ntextcolor{}$triangleright$\enspacetexttt{nbetweenPermAutomaton{mdseries\perm1,perm2}\InbetweenPermAutomaton@\texttt{InbetweenPermAutomaton}}
label{InbetweenPermAutomaton}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
An automaton which accepts the encoded permutations between \texttt{perm1} and \texttt{perm2} where, \texttt{perm2} is the subpermutation.



 \texttt{InbetweenPermAutomaton} creates the intersection language between the language of all subpermutations
of \texttt{perm1} and the language of superpermutations of \texttt{perm2}.  
\begin{Verbatim}[commandchars=!@B,fontsize=\small,frame=single,label=Example]
   gap> InbetweenPermAutomaton([3,2,1,4,6,5],[1,2]);
   < deterministic automaton on 3 letters with 8 states >
   gap> Display(last);
      |  1  2  3  4  5  6  7  8
   -----------------------------
    a |  2  2  1  1  6  3  2  6
    b |  2  2  4  2  2  4  5  5
    c |  2  2  2  2  2  2  2  7
   Initial state:    [ 8 ]
   Accepting states: [ 1, 3 ]
   gap>  
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{InbetweenPermSet}}
\logpage{[ 10, 1, 2 ]}\nobreak
\hyperdef{L}{X7A07B52779B59271}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{InbetweenPermSet({\mdseries\slshape perm1, perm2})\index{InbetweenPermSet@\texttt{InbetweenPermSet}}
\label{InbetweenPermSet}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
A list which contains the permutations between \texttt{perm1} and \texttt{perm2} where, \texttt{perm2} is the subpermutation.



 Using \texttt{InbetweenPermAutomaton} we create the set of all permutations laying between the input permutations.  
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@InbetweenPermSet([3,2,1,4,6,5],[1,2]);|
  [ [ 1, 2 ], [ 1, 2, 3 ], [ 1, 3, 2 ], [ 2, 1, 3 ], [ 1, 2, 4, 3 ],
    [ 2, 1, 3, 4 ], [ 2, 1, 4, 3 ], [ 3, 2, 1, 4 ], [ 2, 1, 3, 5, 4 ],
    [ 3, 2, 1, 4, 5 ], [ 3, 2, 1, 5, 4 ], [ 3, 2, 1, 4, 6, 5 ] ]
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsSubPerm}}
\logpage{[ 10, 1, 3 ]}\nobreak
\hyperdef{L}{X876ABC5F7822D768}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{IsSubPerm({\mdseries\slshape perm1, perm2})\index{IsSubPerm@\texttt{IsSubPerm}}
\label{IsSubPerm}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
\texttt{true} if \texttt{perm2} is a subpermutation of \texttt{perm1}.



 Creates the automaton accepting all subpermutations of \texttt{perm1} of the same rank or less, and checks whether the automaton accepts the rank
encoding of \texttt{perm2}.  
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@IsSubPerm([2,4,6,8,1,3,5,7],[2,3,1]);|
  true
  !gapprompt@gap>| !gapinput@IsSubPerm([2,4,6,8,1,3,5,7],[3,2,1]);|
  false
  !gapprompt@gap>| !gapinput@|
\end{Verbatim}
 }

 }

 
\section{\textcolor{Chapter }{ Automaton Manipulation }}\\section{\textcolor{Chapter }{ Block\texttt{\symbol{45}}Decompositionlogpage{ 8,4,  ]}
\hyperdef{L}{X7A2B46957AB49125}{}
{
 

\subsection{\textcolor{Chapter }{LoopFreeAut}}
\logpage{[ 10, 2, 1 ]}\nobreak
\yperdef{L}{}{
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{LoopFreeAut({\mdseries\slshape aut})
LoopFreeAut}
h\scriptsizef}\java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
\textbf{\indent {\noindent\textcolor{FuncCo}$\$enspace\exttt{nflation(\\lshape {\extunderscore}{textunderscore}})indexI@\exttt{Inflation}}
An automaton without any \{nflation}



a   not containanyloops   1 except  the .  
\begin{Verbatim}[commandchars=!@B,fontsize=\small,frame=single,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
,3,3],4414,3,,,],1,2)B
  < deterministic automaton on 3 letters with 4 states >
  !gapprompt@gap>B !gapinput@Display(a);B
     |  1  2  3  4
  -----------------
a|   4 3  3
   b |  4  4  1  4
   c |  3  1  2  4
    !gappromptgap>|!gapinput@Inflation([[1,2],1],[4,,1,]]);java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
  Accepting state: [ 2 ]
  !gapprompt@gap>B !gapinput@b:=LoopFreeAut(a);B
  <  < 3, 2 10,8 9, 1 5, 7,4  ]
  !gapprompt@gap>B !gapinput@Display(b);B
     |  1  2  3  4  5
  --------------------
   a |  2  4  5  3  5
   b |  4  4  1  5  5
   c | 3  1 2    5  5
  Initial state:   [ 1 ]
  Accepting state: [ 2 ]
  !gapprompt@gap>B !gapinput@B
\end{Verbatim}
 }



\subsection{\textcolor{Chapter }{LoopVertexFreeAut}}
\logpage{[ 10, 2, 2 ]}\nobreak
hyperdef{L}{X8503A7707FA666C4}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{LoopVertexFreeAut({\mdseries\slshape aut})\index{LoopVertexFreeAut@\texttt{LoopVertexFreeAut}}
\label{LoopVertexFreeAutjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}\hfill{\scriptsize 
\textbf{\indent Returns:\ }
An automaton without any vertices that had loops of length 1.



 \texttt{LoopVertexFreeAut} builds the subautomaton that does not contain the vertices and transitions of
vertices in \texttt{aut} that have loops of lengthminustexttt{\symbol{45}}decomposable permutation is input, then the
automaton before returning it, which decomposition will not be the unique decom,by the definition of
,but  returned automaton is  to the subautomaton of \texttt{aut}.  
\begin{Verbatim}[commandchars=!@B,fontsize=\permutations  below.  
 !@gap> !apinput@a:=Automaton(det,4,3,[2,4,,3],4,4,14],[,1,,4],[1][])B
  < deterministic automaton on 3 letters with 4 states >
  !gapprompt@gap>B !gapinput@Display(a);B
     |1  2  3  4
  -----------------
   a |  2  4  3  3
   b |  4  4  1  4
   c |  3  1  2  4
  Initial state:   [ 1 ]
  Accepting state: [ 2 ]
  !gapprompt@gap>B !gapinput@b:=LoopVertexFreeAut(a);B
  < deterministic automaton on 3 letters with 3 states >
  !gapprompt@gap>B !gapinput@Display(b);B
     |  1  2  3
  --------------
   a |  2  2  1
   b |  2  2  2
   c |  3  2  2
  Initial state:   [ 3 ]
  Accepting state: [ 1 ]
  !gapprompt@gap>B !gapinput@B
\end{Verbatim}
 }

 }

 }

   {\nobreakspace} \def\bibname{References\logpage{[ "Bib", 0, 0 ]}
\hyperdef{L}{X7A6F98FD85F02BFE}{}
}

\bibliographystyle{alpha}
\bibliography{bibliography.bib}

\addcontentsline{toc}{chapter}{References}

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

\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{Index}


\printindex

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

Messung V0.5 in Prozent
C=100 H=93 G=96

¤ 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.0.490Bemerkung:  ¤

*Bot Zugriff






Wurzel

Suchen

PVS Prover

Isabelle Prover


Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

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 und die Messung sind noch experimentell.