\documentclass[11pt]{article}
\usepackage{latexsym}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{hyperref}
\usepackage{algorithmic}
\usepackage{algorithm}
\usepackage{complexity}
\usepackage{graphicx}
\newcommand{\handout}[5]{
\noindent
\begin{center}
\framebox[\textwidth]{
\vbox{
\hbox to \textwidth { {\bf Algebra and Computation } \hfill Course Instructor: #2 }
\vspace{4mm}
\hbox to \textwidth { {\Large \hfill #5 \hfill} }
\vspace{2mm}
\hbox to \textwidth { {\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}[]{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
\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}}
\newcommand{\inrpdt}[2]{\left\langle{#1},{#2}\right\rangle}%\inrpdt{x}{y} is .
\newcommand{\pderiv}[2]{\frac{\partial #1}{\partial #2}}
% 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{\N}{\mathbb{N}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Z}{\mathbb{Z}}
%for algorithms
\renewcommand{\algorithmicrequire}{\textbf{Input:}}
% Problems we look at
\newcommand{\GIso}{\lang{Graph\text{-}Iso}} %Without \text, ugly minus instead of hyphen.
\newcommand{\GAut}{\lang{Graph\text{-}Aut}}
\newcommand{\SStab}{\lang{Set\text{-}Stab}}
\begin{document}
\lecture{16 and 17: Linear Diophantine Equations}{V. Arvind}{V.
Arvind}{Ramprasad Saptharishi}
\section{Overview}
Our route now is towards factorization of polynomials over $\Q.$ This
require a lot of machinery to be built and we shall do it over the
next few lectures.
In this class, we shall look at solving a system linear diophantine
equations and its connection to lattices.
\section{Linear Diophantine Equations}
A linear diophantine equation is of the form $a_1x_1 + a_2x_2 +
\cdots a_nx_n = b$ and we are interested in integer solutions
$\inbrace{x_i}.$ A system of linear diophantine equations is a bunch
of such equations. This can be written in a matrix notation as
follows:\\
Given a rational $m\times n$ matrix (matrix with rational entries) $A$, and a
rational $m$-vector $b$, we are looking for integral vectors $x$ that
satisfy $Ax = b.$ \\
We are looking for a polynomial time algorithm to give us all possible
solutions to this equation. Getting all solutions is simple once we
have a single solution $\hat{x}$. All we need to do get the solution
space $\mathcal{S}$ to $Ax = 0$ and and the solutions to the
diophantine system is just $\hat{x} + \mathcal{S}.$
Firstly, we can assume that $A$ is of full rank (row rank is equal to
$m$) since even otherwise we can drop the other rows since they are
linear combinations of the independent rows. Another thing we can
assume is that the entries are integral (we can just scale the matrix
up by the LCM of the denominators and rescale it in the end).
The {\em hermite normal form} is the key to finding solutions to the
diophantine equations.
\section{Hermite Normal Form}
A full rank matrix $A$ is said to be in {\em hermite normal form} if
\begin{itemize}
\item The matrix $A$ is of the form $\insquar{B\;\; 0}$ where $B$ is a
$m\times m$ matrix that is invertible.
\item $B$ is lower triangular.
\item The diagonal entries of $B$ are strictly greater than zero.
\item Other entries are non-negative.
\item For every row, the unique maximum of that row is attained at the
diagonal entry.
\end{itemize}
An example is the following:
$$
\insquar{
\begin{array}{ccccc}
2 & 0 & 0 & 0 & 0\\
1 & 3 & 0 & 0 & 0\\
2 & 1 & 3 & 0 & 0
\end{array}
}
$$
We will now see that every matrix can be converted into one in HNF
with simple operations.
\subsection{Converting to HNF}
We want to start with a full rank matrix $A$ and convert it to one in
HNF using simple operations called {\em modular column
operations}. These are operations of the form
\begin{itemize}
\item exchange two columns
\item multiply a column by $-1$
\item Replace a column $C_i$ by $C_i + kC_j$ where $j\neq i$ and $k\in \Z.$
\end{itemize}
Note that each of the above operation just amounts to post multiplying
by a matrix of determinant $\pm 1.$ And any sequence of of modular
column operations would just be multiplying $A$ by a single unitary
matrix $U.$
\begin{theorem}
Every full rank rational matrix can be converted into a matrix in
HNF using modular column operations
\end{theorem}
\begin{proof}
The proces will be row-wise. Assume we have got it to the form
$$
\insquar{\begin{array}{cc} B & 0 \\ C & D \end{array}}
$$
where $\insquar{B\;\;0}$ is already in HNF.
First, multiply the columns of $D$ by $-1$ to make the top row of
$D$ with just non-negative entries. Then, rearrange the columns to
make sure that the entries are non-decreasing down the row, that is,
$\delta_1 \geq \delta_2\geq \cdots \geq 0.$ Note that all of them
can't be zero since we have assumed that $A$ is of full rank (thus
forces $D$ to also be full rank).
Suppose the $\gcd$ of the $\delta_i$ was $d$, then implementing
euclid's algorithm using modular column operations, one of the
$\delta_i$ can be made equal to $d$. Once this is done, since every
other element is a multiple of $d$, they can be killed. Thus we can
make sure that $\delta_1 = d$ and $\delta_i = 0$ for all $i>1.$
Now to ensure the unique maximum property, let the first row of $C$
be $c_1, c_2, \cdots, c_k.$ Use the division algorithm to write $c_i
= md + r$ where $r