
\documentclass[10pt]{article}
\usepackage{amsmath,amsfonts,amssymb,mathtools}

%\newtheorem{define}{Definition}

\newcommand{\prob}{\textit{Pr}}
%\newcommand{\Z}{{\mathbb{Z}}}
%\usepackage{psfig}

\oddsidemargin=0.15in
\evensidemargin=0.15in
\topmargin=-.5in
\textheight=9in
\textwidth=6.25in


\begin{document}

\input{preamble.tex}

%{lecture number}{lecture date}{Ronitt Rubinfeld}{Your name}
\lecture{3}{September 11, 2017}{Ronitt Rubinfeld}{Albert Cheu}

%%%% body goes in here %%%%
\section{Introduction}
In this lecture, we complete the Moser-Tardos algorithm. Specifically, we prove the following:

\begin{theorem}\label{thm:Moser-Tardos}
Suppose we have set system $S_1,S_2,S_3\ldots S_m \subset S$ where for any $i$, $|S_i|=\ell$ and $S_i$ intersects at most $d$ other sets. If $ce(d+1)\leq 2^{\ell-1}$ for constant $c>1$, then Moser-Tardos finds a coloring of $S$ without a monochromatic $S_i$ in expected time $poly(m,d,|S|)$.
\end{theorem}

We will use the ``log of execution'' and ``witness tree'' terminology defined in the prior lecture notes. We note that a node of a witness tree can be written as a log element $(time, T)\in \mathbb{Z}\times \{S_1\ldots S_m\}$.

We will make reference to ``(fair) coins'' which will be the sources of randomness of each event.

\section{Proof}
\subsection{The $\tau$-check and associated facts}
% To prove \Cref{thm:Moser-Tardos}, we begin by establishing the fact the nodes of a witness tree describe mutually independent events.

% \begin{lemma}
% \label{lem:independent}
% In witness tree $\tau$ of size $s$ with nodes $(time_1,T_1), (time_2,T_2), \ldots (time_s,T_s)$, let $M_i$ denote the event that $T_i$ is monochromatic after the recoloring at $time_i$. For $i\neq j$, $\prob(M_i\cap M_j)=\prob(M_i)\cdot \prob(M_j)$.
% \end{lemma}
% \begin{proof}
% There are two cases:
% \begin{itemize}
% \item In one, the nodes corresponding to the events are in the same level. Assume without loss of generality that $(time_j,T_j)$ is added to $\tau$ later than $(time_i,T_i)$. $T_i,T_j$ share no elements; the alternative would mean that $(time_j,T_j)$ should have been deeper, by construction of witness trees. Because $T_i,T_j$ share no nodes, colorings are independent.

% \item In the other case, they are in different levels. Assume without loss of generality that $(time_j,T_j)$ is beneath $(time_i,T_i)$; this means $time_j<time_i$. The recoloring at $time_i$ uses different coins than the prior recoloring at $time_j$.
% \end{itemize}
% \end{proof}

We define a procedure that will not be executed but will be useful for analysis, in much the same way witness trees are useful abstractions.

\begin{definition}\label{def:tau-check}
Suppose tree $\tau$ has nodes that each correspond to a log element $(t, S[t])\in \mathbb{Z}\times \{S_1\ldots S_m\}$. For our purposes, we assume the elements of $S$ are initially uncolored. The $\tau$-\textnormal{check procedure} is the following:
\begin{enumerate}
\item Traverse $\tau$ reverse BFS order: For each $S[t]$\ldots
\begin{enumerate}
\item Use fair and new coins to color uncolored elements of $S[t]$.
\item Assign $mono_t$ to 1 if the set is monochromatic, 0 otherwise.
\item Use fair and new coins to recolor $S[t]$
\end{enumerate}
\item Pass if all $mono_t$ are 1, fail otherwise.
\end{enumerate}
\end{definition}

In $\tau$, let $M_t$ be the event that $mono_t=1$.

\begin{claim}
\label{clm:independence}
All $M_t$ are independent of one another.
\end{claim}
\begin{proof}
Consider some $t,S[t]$. $M_t$ is independent of all $M_{t'}$ where $S[t]\cap S[t']=\emptyset$; the argument below is therefore ``interesting'' for overlapping sets.

$mono_t=1$ if and only if all of $S[t]$'s elements are the same color at the beginning of step $t$.

If some of the elements are uncolored going into step $t$, the coloring that happens in (a) is independent of any other coloring: the coins are new and independent of any prior flips.

If some of the elements have already been colored, the colors will be from some prior execution of step (c). That uses coins independent of any prior flips.

We showed that $mono_t=1$ is independent of prior flips. The coloring that (c) will ``overwrite'' the colors of $S[t]$ so $mono_t=$ is independent of future flips.
\end{proof}

\begin{claim}
\label{clm:odds-pass}
When $\tau$ has size $s$, $\prob(\tau\textnormal{-check passes})=2^{-s(\ell-1)}$
\end{claim}
\begin{proof}
This follows immediately from Claim \ref{clm:independence} and the fact that $|S_i|=\ell$ for all given $S_i$.
\end{proof}

\begin{claim}
\label{clm:tau-check-bound}
$\prob(\tau\ \textnormal{is a witness tree})\leq \prob(\tau\textnormal{-check passes})$
\end{claim}
\begin{proof}
Record onto list $C$ the coin flips from a run of Moser-Tardos that has witness tree $\tau$. Let $(t,S[t])$ be a node in that tree.

Consider a $\tau$-check procedure where instead of flipping new coins, we read off from $C$ in the following manner. In step (a), the coin for an uncolored element $u$ come from the most recent $t'<t$ where $u\in S[t']$. In step (c), we look at the coins used to recolor $S[t]$ at the end of round $t$ of Moser-Tardos.

$\tau$ consists of log elements. We log $(t,S[t])$ only when $S[t]$ is monochromatic just before the recoloring at time $t$. Thus each $mono_i=1$ and the $\tau$-check passes.

Because the number of coin assignments that make the $\tau$-check pass is at least the number of coin assignments that make $\tau$ a witness tree, $\prob(\tau\ \textnormal{is a witness tree})\leq \prob(\tau\textnormal{-check passes})$.
\end{proof}

\subsection{Other facts}

\begin{lemma}\label{lem:count-witness}
The number of potential witness trees $\tau$ with root $S_i$ and size $|\tau|=s$ is at most $\binom{s(d+1)}{s-1}$
\end{lemma}
\begin{proof}
Note: Taken from scribe notes of Spring '14.

For every given $S_j$, fix an order of the sets that intersect with $S_j$ including itself. The order is denoted $S_j^1\ldots S_j^{k[j]}$. By assumption, the degree bound is $d$ so $k[j]\leq d+1$.

Every parent-child pair in $\tau$ shares at least one element.

No child is duplicated; the second instance to be added to $\tau$ ought to be at a lower level.

Run BFS from the root $S_i$ with queuing order $S_j^1\ldots S_j^{k[j]}$. Let $S_{v(1)}\ldots S_{v(s)}$ denote the sequence of sets visited.

Define table $T_\tau$ with $s$ rows and $d+1$ columns. The bit in row $x$ and column $y$ will indicate whether $S_{v(x)}^y$ is a child of $S_{v(x)}$ in $\tau$. Because there are $k[v(x)]$ possible children, cells in row $x$ beyond column $y=k[v(x)]$ are set to 0.

There are $s-1$ edges in a tree with $s$ nodes, so there are $s-1$ 1-bits. Because no two witness trees have the same table, the number of witness trees is at most the number of such tables.
\end{proof}

\begin{observation}
As a consequence of the witness tree construction rules, no witness tree is duplicated.
\end{observation}

\begin{observation}
From the above, a bound on the expected number of distinct witness trees is equal to the expected log length.
\end{observation}

\subsection{Bound on expected log length}
From the above,
\begin{align*}
\textnormal{Expected log length} &= \sum_{S_i} \sum_{\substack{\tau \textnormal{with}\\ \textnormal{root} S_i}} E[\textnormal{no. of times $\tau$ is a witness tree}]
\shortintertext{From Claims \ref{clm:odds-pass} and \ref{clm:tau-check-bound},}
&\leq m \sum_{s=1}^\infty \sum_{\substack{\tau \textnormal{with}\\ \textnormal{root} S_i\\ |\tau|=s}} 2^{-s(\ell-1)}\\
\shortintertext{From Lemma \ref{lem:count-witness},}
&\leq m \sum_{s=1}^\infty \binom{s(d+1)}{s-1} 2^{-s(\ell-1)}\\
&\leq m \sum_{s=1}^\infty (e(d+1))^s 2^{-s(\ell-1)}
\shortintertext{By the assumption in Theorem \ref{thm:Moser-Tardos}, this is a geometric sequence so}
&= \bigO(m)
\end{align*}

Each step of the log corresponds to a recoloring which takes $poly(m,d,|S|)$ time. Thus, in expectation, the running time is polynomial.

\end{document}
