\documentclass[11pt]{article}

\usepackage{latexsym}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{hyperref}
\usepackage{algorithmic}
\usepackage{algorithm}

\newcommand{\handout}[5]{
  \noindent
  \begin{center}
    \framebox{
      \vbox{
        \hbox to 5.78in { {\bf Algebra and Computation } \hfill Course Instructor: #2 }
        \vspace{4mm}
        \hbox to 5.78in { {\Large \hfill #5  \hfill} }
        \vspace{2mm}
        \hbox to 5.78in { {\em #3 \hfill #4} }
      }
    }
  \end{center}
  \vspace*{4mm}
}

\newcommand{\lecture}[4]{\handout{#1}{#2}{Lecturer: #3}{Scribe: #4}{Lecture #1}}

\newtheorem{theorem}{Theorem}
\newtheorem{theorem*}{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{observation}[theorem]{Observation}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{fact}[theorem]{Fact}
\newtheorem{subclaim}[theorem]{Subclaim}

% my custom commands
\newcommand{\inparen}[1]{\left(#1\right)}             %\inparen{x+y}  is (x+y)
\newcommand{\inbrace}[1]{\left\{#1\right\}}           %\inbrace{x+y}  is {x+y}
\newcommand{\insquar}[1]{\left[#1\right]}             %\insquar{x+y}  is [x+y]
\newcommand{\inangle}[1]{\left\langle#1\right\rangle} %\inangle{A}    is <A>
\newcommand{\abs}[1]{\left|#1\right|}                 %\abs{x}        is |x|
\newcommand{\norm}[1]{\left\Vert#1\right\Vert}        %\norm{x}       is ||x||
\newcommand{\union}{\cup}
\newcommand{\Union}{\bigcup}
\newcommand{\intersection}{\cap}
\newcommand{\super}[2]{#1^{\inparen{#2}}}             %\super{G}{i-1} is G^{(i-1)}
\newcommand{\setdef}[2]{\inbrace{{#1}\ : \ {#2}}}
\newcommand{\inv}[1]{#1^{-1}}

% Commands specific to this file
% TODO: Find the right way to typeset group index
\DeclareMathOperator{\Sym}{Sym}
\newcommand{\gpidx}[2]{\insquar{#1 : #2}}             %\gpidx{H}{K}   is [H : K]
\newcommand{\gpigs}[2]{\gpidx{\super{G}{#1}}{\super{G}{#2}}} %Group index of g super ...
\newcommand{\llhd}{\!\!\lhd\!\!\lhd}

% \newcommand{\ceil}[1]{\lceil #1 \rceil}
\newcommand{\floor}[1]{\lfloor #1 \rfloor}
% \newcommand{\f}{\mathbb{F}}
% \newcommand{\R}{\mathbb{R}}

%for algorithms
\renewcommand{\algorithmicrequire}{\textbf{Input:}}

\begin{document}

\lecture{6,7: Special Cases of {\sc graph-iso}}{V. Arvind}{V.
  Arvind}{Ramprasad Saptharishi}

\section{Overview}

It is unlikely that we have an efficient algorithm for {\sc
  graph-iso}, but certain special cases of it can be solved in
polynomial time. In this lecture, we shall inspect two such cases,
coloured graphs with bounded colour classes and trivalent graph. 

\footnote{We also discussed a partial solution to the solvability
  exercise he gave in the last class, but I'm not putting it here}

\section{Bounded Colour Multiplicity {\sc graph-iso}: $BCGI_b$}

Instead of general graph isomorphism instances, $BCGI_b$ adds an extra
structure to the graphs by associating with each vertex a colour.
Further, assume that each colour class\footnote{set of vertices of a
  given colour} has its size bounded by a constant $b$. Given two
graphs $X_1$ and $X_2$ with such a promise, can check if they are
isomorphic efficiently?

\medskip

Without loss of generality, we can assume that $X_1$ and $X_2$ are
connected (otherwise consider their complements). Consider the graph
$(V,E) = X = X_1\union X_2$ and from our earlier lectures, checking
isomorphism can be reduced to checking the automorphism group of $X$.
The additional colour structure imposes the constraint that $Aut(X)
\leq \bigotimes \Sym(C_i)$ where $C_i$ is the colour class for colour
$i$. The idea is that we use the {\sc set-stab} reduction in this
scenario and show that we can compute the necessary stabilizer
efficiently. 

Let $E_i = E \intersection \binom{C_i}{2}$ for each colour $i$ (the
set of intercolour edges) and $E_{ij} = E\intersection
\inparen{C_i\times C_j}$ for colour pairs $i\neq j$ (cross edges).
Clearly, any $\pi \in \bigotimes \Sym(C_i)$ is a colour preserving
automorphism {\em if and only if} , $E_i^\pi = E_i$ and $E_{ij}^\pi =
E_{ij}$. Thus we now have got it to a {\sc set-stab} form. 

Let $G = \bigotimes \Sym{C_i} = \inangle{A}$, by choosing
transpositions as generators. Now define $\Omega = \inparen{\Union
  C_i} \union \inparen{\Union 2^{\binom{C_i}{2}}} \union
\inparen{\Union 2^{C_i \times C_j}}$, which is just identifying the
subsets $E_i$ and $E_{ij}$ as points.  The bound on the colour classes
tell us that $|\Omega| \leq n + r2^{\binom{b}{2}} +
\binom{r}{2}2^{b^2}$, if $r$ is the number of colour classes, and
since $b$ is a constant $|\Omega| = poly(n)$.

$G$ can be naturally extended to act on $\Omega$ (extension in the
most obvious sense, if $i$ is sent to something and $j$ is sent to
something, $E_ij$ should go to the right thing). And now, $Aut(X)$ is
just finding the subgroup that pointwise stabilizes the $E_i$ clusters
and the $E_{ij}$ cllusters and this can be done using our {\em
  strong generating set} tower discussed in lecture $3$. 
\smallskip

The running time is $poly(|\Omega|)$ and hence $poly(|X|)$. 

\section{Bounded Degree {\sc graph-iso}}

Another restriction that we can impose on graphs is the degree of each
vertex, suppose we are given the promise that the degree of each
vertex is bounded by a constant $d$, can we solve {\sc graph-iso}?

The case when $d=1$ is trivial, just a bunch of independant edges and
so is the case when $d=2$. The first interesting case is when $d=3$,
which is also called {\em trivalent graph isomorphism}. \medskip

We are given two graphs $X_1$ and $X_2$ with the promise that their
degrees are bounded by $3$, and we need to check if they are
isomorphic. Firstly note that we can assume that both of them are
connected, since if not we can just look at the connected components
and work with all possible pairs\footnote{note that the complement
  idea won't work since graph will no longer be trivalent}. Checking
if they are isomorphic is equivalent to computing their automorphism
group.

Further, suppose had a distinguished edge, and we are only intereseted
in automorphisms that fix that edge, is that good enough? Yes it
is. Fix some edge $e_{uv} \in X_1$, for each $e_{pq} \in X_2$, add a
new edge that 'connects' $e_{uv}$ and $e_{pq}$ (add the midpoints as
another vertex and join the two midpoints). Thus if an isomorphism
swapped $e_{uv}$ and $e_{pq}$, that isomorphism will fix $e$. And
since we are doing this over all edges $e_{pq}$, the two problem are
clearly equivalent. Hence we shall restrict ourselves to finding
$Aut_e(X)$ for some graph $X$ where $e$ is a distinguished edge we
want to fix. 

The algorithm works by building the automorphism groups by
approximations, $Aut_e(X_r)$ where each $X_r$ is a subgraph of
$X$. For each $r$, define $X_r$ to be the consisting of all vertices
and edges that appear in paths of length $\leq r$ passing through
$e$. This layers $X$ with respect to distance from $e$. \medskip

{\em picture needed}

\medskip

And clearly, since $e$ is a distinguished edge, any $\pi \in Aut_e(X)$
must preserve layers. And infact we have the following crucial theorem
by Tutte. 

\begin{theorem}[Tutte]
  If $X$ is a connected trivalent graph and $e$ is any edge in $X$,
  then $Aut_e(X)$ is a $2$-group (a group of order $2^m$). 
\end{theorem}
\begin{proof}
  The basic idea is that the automorphism groups are successive
  approximations and each expansion is through a $2$-group.

  The proof will be an induction on $i$, assume that $Aut_e(X_i)$ is a
  $2$-group.  Since any automorphism that preserves $e$ has to respect
  the layers, we have a natural homomorphism $\phi:Aut_e(X_{i+1})
  \longrightarrow Aut_e(X_i)$, which is just the projection function
  ($Aut_e(X_{i+1})$ preserves layers till $X_{i+1}$).

  Hence $|Aut_e(X_{i+1})| = |\phi(Aut_e(X_{i+1}))|\cdot |\ker{\phi}|$ and
  since $\phi(Aut_e(X_{i+1}))$ is a subgroup of $Aut_e(X_i)$, it is a
  $2$-group. Hence all that's left to do is to check that $\ker{\phi}$
  is a $2$-group as well.

  We are interested in counting $\pi \in Aut_e(X_{i+1})$ that fixes
  $X_i$ pointwise. If $V = V(X_{i+1}) \setminus V(X_i)$, then any
  non-trivial $\pi$ have to do something on $V$ alone. But note that
  the graph $X$ is trivalent, and hence any $u\in V(X_i)$ can be
  connected to atmost $2$ vertices in $V$ (since degree of $u$ is
  bounded by $3$) and hence any automorphism of $X_{i+1}$ that fixes
  $X_i$ can atmost swap the two neighbours of $u$. Thus any $\pi \in
  \ker{\phi}$ satisfies the constraint that $\pi^2 = id$ and hence
  $\ker{\phi}$ is also a $2$-group. 
\end{proof}

\subsection{A Road Map}

We want to compute $Aut_e(X)$, and we shall do it using the tower
induced by the different layers $X_r$. The general philosophy is the
following:

If $\phi:G\longrightarrow H$ is a group homomorphism and if we had a
generating set for $\ker \phi = \inbrace{k_1, k_2, \cdots, k_n}$ and
$\phi(H) = \inbrace{\phi(g_1), \phi(g_2), \cdots , \phi(g_m)}$, then
we can find a generating set for $G$ efficiently. \medskip

We are going to use the homomorphisms $\phi:Aut_e(X_{r+1})
\longrightarrow Aut_e(X_r)$ to ascend the tower and finally get to a
generating set for $Aut_e(X)$. We need to find 
\begin{enumerate}
\item A generating set for $\ker \phi$
\item A generating set for $\phi(Aut_e(X_{r-1}))$
\end{enumerate}

\subsection{A generating set for $\ker \phi$}

The proof of Tutte's theorem infact gave us the algorithm. Observe
that for every vertex $v\in X_r$ is attached to atmost two vertices of
$X_{r+1} \setminus X_r$ and an automorphism could possible swap these
two neighbours of $v$. 

When would this not be possible? Precisely when the neighbourhoods of
the two vertices are different! Thus if $w_1,w_2 \in X_{r+1} \setminus
X_r$ are neighbours of $v\in X_r$, a transposition $\inparen{w_1,
  w_2}$ would be a valid automorphism fixing $X_r$ {\em if and only
  if} $\Gamma(w_1) = \Gamma(w_2)$. And this can be easily checked by
inspection. Thus in linear time, we can infact get a generating set (a
set of disjoint transpositions) for $\ker \phi$. 

\subsection{A generating set for $\phi(Aut_e(X_{r+1}))$}

This is the harder part. Since we'll be referring to vertices of
$X_{r+1} \setminus X_r$, we shall refer to this set as $V_r$. Note
that every vertex $v\in V_r$ is connected to $1$ or $2$ or $3$
neighbours of $X_r$. Hence, let $A$ be the collection of all subsets
of $X_r$ of size $1$ or $2$ or $3$. Then we have the following
neighbourhood map $\Gamma_r: V_r\rightarrow A$ which takes each vertex
to the set of neighbours in the graph $X_{r+1}$. 

Note that for every automorphism $\sigma \in Aut_e(X_{r+1})$,
$\Gamma_r(\sigma(v)) = \sigma(\Gamma_r(v))$, and further if it were in
the kernel, then $\Gamma_r(v) = \sigma(\Gamma_r(v))$. Call two
vertices $v_1,v_2 \in V_r$ as {\em twins} if $\Gamma_r(v_1) =
\Gamma_r(v_2)$.

Hence, any $\sigma \in \phi(Aut_e(X_{r+1}))$ has to stabilize the
set of fathers with just 1 son. 
$$
A_1 = \setdef{a\in A}{a = \Gamma_r(v)\text{ for some unique }v\in V_r}
$$
$\sigma$ must also stabilize the set of fathers of twins, 
$$
A_2 = \setdef{a\in A}{a = \Gamma_r(v_1) = \Gamma_r(v_2), v_i\neq v_j}
$$
And apart from reaching out to vertices of $V_r$, the next layer also
induces edges between vertices of $X_r$, and any automorphism must
certainly preserve these as well. 
$$
A_3 = \setdef{\inbrace{w_1,w_2}\in A}{(w_1, w_2)\in X_{r+1}}
$$

Infact, these are all we need to ensure so that $\sigma \in
Aut_e(X_r)$ is infact in $\phi(Aut_e(X_{r+1}))$. 

\begin{claim}
The image is precisely those automorphisms $\sigma\in Aut_e(X_r)$
which stabilize the sets $A_1$, $A_2$ and $A_3$. 
\end{claim}
\begin{proof}
  We need to show that if $\sigma$ stabilizes the three sets, then we
  can extend it to an automorphism of $X_{r+1}$. The extension is
  built as follows:
  \begin{itemize}
  \item For each single child $v$, $\Gamma_r(v) \in A_1$, since
    $\sigma(\Gamma_r(v)) \in A_1$, map $v$ to the only child of
    $\sigma(\Gamma_r(v))$.
  \item For each pair of twins $v_1, v_2$, $\Gamma_r(v_1) =
    \Gamma_r(v_2) \in A_2$, since $\sigma(\Gamma_r(v))\in A_2$, map
    $\inbrace{v_1,v_2}$ to the sons of $\sigma(\Gamma_r(v_1))$ in any
    order.   
  \end{itemize}

  The constructions enforces that it respects edges between $X_r$ and
  $V_r$. And since it also stabilizes $A_3$, $\sigma$ also respects
  the edges between vertices of $X_r$ that were newly formed. Hence
  $\sigma$ is indeed can be extended to an automorphism of $X_{r+1}$. 
\end{proof}

Now we have reduced the isomorphism problem to a set-stabilizer
problem for $2$-groups. We shall discuss how to deal with it in the
next class. 

\end{document}





