Skip to content

Commit

Permalink
Made more explicit the fact that we generate the data in such a way t…
Browse files Browse the repository at this point in the history
…hat the columns are sorted.
  • Loading branch information
stefano-maggiolo committed Nov 22, 2010
1 parent cb960e5 commit 8b66da2
Showing 1 changed file with 78 additions and 53 deletions.
131 changes: 78 additions & 53 deletions doc/ProofOfGeneration.tex
Original file line number Diff line number Diff line change
Expand Up @@ -203,42 +203,80 @@ \section{How the program generates graphs}
To take into account the second principle, we will deduce from the
conditions of Definition~\ref{def:stable graph} some other necessary
conditions that can be checked before the graph is defined in its
entirety. For the first principle, we generalize the following idea:
to generate a vector for every class of vectors of length $K$ modulo
permutations, the simplest way is to generate vectors whose entries
are increasing.

Therefore, the program fills the data in the order
\begin{align*}
& g_0, \dots, g_{K-1}, \\
& \qquad \qquad n_0, \dots, n_{K-1}, \\
& \qquad \qquad \qquad \qquad l_0, \dots, l_{K-1}, \\
& \qquad \qquad \qquad \qquad \qquad \qquad a_{0,1}, \dots, a_{0,
K-1}, a_{1, 2}, \dots, a_{1, K-1}, \dots, a_{K-2, K-1}\text{.}
\end{align*}

It is enough to generate the strict upper triangle of the matrix $a$
because the matrix is symmetric, and the diagonal elements have
already been generated in the vector $l$.

Every single datum is assigned trying all the possibilities within a
range that depends upon the values of $G$ and $N$, and upon the values
of the data that have already been filled.

% TODO explain better that division is a way to enforce lexicographic
% order on the column of the matrix composed by g,n,l,a
entirety. More precisely, every single datum is assigned trying all
the possibilities within a range that depends upon the values of $G$
and $N$, and upon the values of the data that have already been
filled. The range is computed in such a way that assigning a value
outside the range would not generate any stable graph; moreover, we
tried to minimize the situations in which assigning a value inside the
range would not generate any stable graph. We will describe in details the ranges in Section~\ref{sec:ranges}.

For the first principle, we generalize the following idea: to generate
a vector for every class of vectors of length $K$ modulo permutations,
the simplest way is to generate vectors whose entries are
increasing. The program fills the data in the order shown in the matrix
\begin{equation}\label{eq:big matrix}
\begin{pmatrix}
g_0 & g_1 & \cdots & g_{K-1}\\
n_0 & n_1 & \cdots & n_{K-1}\\
l_0 & l_1 & \cdots & l_{K-1}\\
\hline
\bullet & a_{0,1} & \cdots & a_{0,K-1}\\
a_{1,0} & \bullet & \ddots & \vdots\\
\vdots & \ddots & \bullet & a_{K-2,K-1}\\
a_{K-1,0} & \cdots & a_{K-1,K-2} & \bullet
\end{pmatrix}\text{,}
\end{equation}
and generates only matrices whose columns are sorted. This requires a
bit of care, for two reasons:
\begin{itemize}
\item the first is that the matrix $a$ needs to be symmetric; in the
program we generate only the strictly upper triangular part;
\item the diagonal of $a$ need not to be considered when deciding if a
column is greater or equal than the previous one.
\end{itemize}
So, for example, denote with $c_j$ and $c_{j+1}$ two adjacent columns
of the matrix~\ref{eq:big matrix}. They are said to be equal if
$c_{j,i} = c_{j+1,i}$ for any $i \not in \{j, j+1\}$; if they are not
equal, denote with $i_0$ the minimum index such that $i_0 \not in \{
j+3, j+1+3\}$ and $c_{j,i_0} \neq c_{j+1,i_0}$. Then $c_j < c_{j+1}$
if and only if $c_{j,i_0} < c_{j+1,i_0}$. We do not define the
relation for non-adjacent columns.

The main ingredient to decide the lower endpoint of the range is the
concept of \emph{division\/} before an index $i$. We start filling
the genus vector $g$ in a non decreasing way: every time we assign a
value $g_i$ strictly greater than $g_{i-1}$ we put a division before
$i$. Then we start filling the vector $n$ in such a way that, within
two division ranges, it is non decreasing. Again we introduce a
division before $i$ every time we assign a value $n_i$ strictly bigger
than $n_{i-1}$. We follow this procedure also for the vector
$l$. Finally, we start filling the rows of the matrix $a$.
\begin{remark}
We cannot conclude immediately that this procedure gives us all
possible data up to permutations as in the case of a single
vector. This is because the transformation that the matrix undergo
when a permutation is applied is more complicated: for the first
three rows, it just permute the columns, but for the remaining rows,
it permutes both rows and columns. Indeed, to prove that generating
only sorted columns does not miss some stable graph we need to prove
Proposition~\ref{prop:main}, thing that we do in
Section~\ref{sec:proof}.
\end{remark}

The value of $a_{i,j}$ is assigned starting from:
To ensure that the columns are sorted (in the sense we explained
before), the program keeps track of \emph{divisions}. We start filling
the genus vector $g$ in a non decreasing way, and every time we assign
a value $g_i$ strictly greater than $g_{i-1}$ we put a division before
$i$. This means that when we decide the value of a datum regarding
index $i$, we can ignore the value of that datum for the index $i-1$,
because the column $c_i$ is already bigger than the column
$c_{i-1}$. Otherwise, if there is not a division before $i$, we would
have been forced to put a value which is bigger or equal than the one
in position $i-1$.

Indeed, after completing $g$, we start filling the vector $n$ in such
a way that, within two divisions, it is non decreasing. Again we
introduce a division before $i$ every time we assign a value $n_i$
strictly bigger than $n_{i-1}$. We follow this procedure also for the
vector $l$.

Finally, we start filling the rows of the matrix $a$. Here the
procedure is a bit different, because, even if we fill only the upper
triangular part, the conditions that the columns must be sorted
involves also the lower triangular part. A small computation gives
that the value of $a_{i,j}$ is assigned starting from:
\[
\begin{cases}
0 & \text{if there are divisions before $i$ and $j$}\\
Expand All @@ -247,31 +285,18 @@ \section{How the program generates graphs}
a_{i-1,j} & \text{if there is a division before $j$ but not before
$i$}\\
\max\{a_{i,j-1}, a_{i-1,j}\} & \text{if there are no divisions
before $i$ or $j$.}
before $i$ or $j$,}
\end{cases}
\]
We put a division before $i$ if $a_{i,j} > a_{i-1,j}$ and a division
and we put a division before $i$ if $a_{i,j} > a_{i-1,j}$ and a division
before $j$ if $a_{i,j} > a_{i,j-1}$.

Once the divisions are fixed, for each datum we fix the range of
possibilities within it can vary. The range we introduce for each
element to be chosen is more refined than the one induced by the
divisions, and it is explained in the following section. For each
datum to be filled, the range depends upon $G$, $N$ and the data that
have already been filled. The ranges are defined in such a way that
the conditions of Definition~\ref{def:stable graph} are checked as
early as possible.

% Finally, at the end of the $i$-th row of the matrix, we test that
% the $i$-th vertex is connected to at least another vertex. If $g_i$
% equals zero we also check the stability of the $i$-th vertex.

Finally, when all data are fully filled, we test that all the
Finally, when the matrix is fully filled, we test that all the
conditions of Definition~\ref{def:stable graph} hold, in particular
that the graph is actually connected. Then we use the program Nauty
\cite{nauty} to check if this graph is isomorphic to a previously
generated graph. If this is the case, we add the graph to the list of
graphs of genus $G$ with $N$ marked points.
generated graph. If this is not the case, we add the graph to the list
of graphs of genus $G$ with $N$ marked points.



Expand Down Expand Up @@ -505,7 +530,7 @@ \subsection{Range for $a_{i,j}$}



\section{The program generates all graphs}
\section{The program generates all graphs}\label{sec:proof}

We want to prove the following result.

Expand Down

0 comments on commit 8b66da2

Please sign in to comment.