\documentclass{article}
\usepackage{amsmath}
\input{preamble.tex}

\newcommand{\p}{{\rm P}}
\newcommand{\pspace}{{\rm PSPACE}}
\newcommand{\exptime}{{\rm EXPTIME}}
\newcommand{\ppoly}{{\rm P/poly}}
\newcommand{\plog}{{\rm P/log}}
\newcommand{\np}{{\rm NP}}
\newcommand{\sat}{{\rm SAT}}
\newcommand{\good}{{\rm GOOD}}
\newcommand{\true}{{\rm TRUE}}
\newcommand{\false}{{\rm FALSE}}
\newcommand{\conp}{{\rm coNP}}

\begin{document}

\lecture{5}{February 15, 2000}{Dan Spielman}{abhi shelat}

In this lecture, we will prove a major theorem in Complexity 
Theory which states that if $\np$ is contained in $\mbox{P/poly}$, 
then the polynomial hierarchy collapses.  This leads us to believe 
that NP problems cannot be solved with polynomial sized circuits.   
The proof of the theorem will  illustrate  some interesting techniques 
in Complexity theory.  

%In the original paper \cite{kls}, the same techniques were used
%to show the following results:
%\begin{enumerate}
%\item $\pspace \subseteq \p/poly \implies \pspace = \Sigma_2^P \cap \Pi_2^P$
%\item $\pspace \subseteq \p/log \iff \pspace = \p$
%\item $\exptime \subseteq \pspace/poly \iff \exptime = \pspace$
%\item $\np \subseteq \p/log \iff \p=\np$
%\item $\exptime \subseteq \p/poly \implies \exptime = \Sigma_2^P \implies \p \neq \np$
%\end{enumerate}

Towards the end of the lecture, we will consider some general
results in circuit complexity starting with Claude Shannon's initial
result on the number of hard functions.

\begin{section}{NP and P/poly }\end{section} 

For a sketch of the proof, recall the definition of $P/poly$ :
\begin{eqnarray*}
\mbox{P/poly} = \{ \mbox{ all languages, $L$, where } \exists k>0, A \in P, \mbox{ and a sequence of strings } \\
\{s_n\}_{n \in {\cal N}} \mbox{ such that } |s_n|=O(n^k) \mbox{ and }
w \in L \iff (w,s_{|w|}) \in A \}
\end{eqnarray*}

The $s_n$ strings can be thought of as input-size dependent advice given
to a Turing machine.  We will start by assuming that the canonical 
$NP$-complete problem, $\mbox{SAT} \in P/poly$, and then define what it
means to for a sequence of strings to be a {\em good} sequence of advice
strings for SAT.  In turn, we will define the language, $\good$, of 
good advice sequences, and then we will show that 
$\good \in \conp$.   This allows us to construct a
$\Sigma_2 P$ TM that can guess a {\em good} sequence, then verify that the
sequence is good, and finally use the sequence to decide complete 
problems for $\Sigma_3 P$.  Therein lies the collapse of PH.

\begin{theorem}[Karp, Lipton, Sipser]If $\np \subset \mbox{P/poly}$ then $\Sigma_3 P \subset \Sigma_2 P$ (PH collapses)\end{theorem}

Take the $\np$ complete problem $\sat$.
Since $\sat \in \mbox{P/poly}$, then there is some constant $k$, 
some polynomial language, $A\in P$, and a sequence of strings $\{s_n\}_{n \in {\cal N}}$ such that $|s_n| < {(ki)}^{k}$ and $ w\in SAT \iff (w,s_{|w|}) \in A$.  We fix the language $A$ for the rest of this lecture.
 
\begin{definition}  The sequence of strings $(g_1,...,g_l)$ is a good sequence if
\begin{enumerate}
\item $\forall i |g_i| < {(ki)}^k$
\item $\forall \phi, |\phi|<l, \phi \in SAT \iff (\phi,g_{|\phi|}) \in A$
\end{enumerate} 
\end{definition}

\begin{definition} 
$\good = \{ (s_1,...,s_l) | (s_1,...,s_l) \mbox{ is a good sequence } \}$
\end{definition}

It is easy to see that $\good \in \Pi_2 P$ by exploiting an earlier
definition that $\Pi_2 P = \mbox{co-Np}^{SAT}$.  Consider the following ATM: 
\begin{enumerate}
\item On input $(s_1,...,s_l)$, first check to make sure that 
$|s_i| < (ki)^k$ for $1\leq i \leq l$.
\item Next, use the $\forall$
states to choose a boolean formula $\phi$ such that $|\phi|<l$.  

\item Let $a$ be a boolean variable.  Use the polynomial TM to compute 
$a \leftarrow (\phi, s_{|\phi|}) \stackrel{?}{\in} A$.  
\item Ask the $SAT$ oracle whether $\phi \in SAT$.  
\item Accept if $a \iff \phi \in SAT$.
Otherwise, reject.
\end{enumerate}

However, we can prove an even better containment, $\good \in \conp$,
by understanding the notion of self-reducibility.

\begin{definition} A language $L$ is self-reducible if there exists a 
polynomial time Oracle Turing Machine (OTM) $M$ such that 
\begin{enumerate}
\item $M^L$ accepts $L$
\item on inputs of length $n$, $M$ only queries the oracle about
words of length $<n$.
\end{enumerate}
\end{definition}

One can think about self-reducible languages as those accepted by
some sort of dynamic programming Turing machine that can look up answers
to smaller problems.  All $NP-complete$ languages are self-reducible
as is shown in the next lemma.

\begin{lemma}$SAT$ is self-reducible. \end{lemma}
\begin{proof} 
Consider a boolean formula $\phi$ of $n$ variables, $\phi(x_1,...,x_n)$.
We can fix $x_1=TRUE$ and $x_1=FALSE$ and evaluate the formula
$\phi$ with those assignments.  The resulting formulas 
\begin{eqnarray*}
	\phi_0  &= \phi(0,x_2,...,x_n) \\ 
	\phi_1 &= \phi(1,x_2,...,x_n)
\end{eqnarray*}
will be smaller formulas, and moreover, $\phi \in SAT$ iff $\phi_i \in SAT$
for either $i=0$ or $i=1$.
\end{proof}

\begin{lemma}$\good \in \Pi_1 P (\mbox{ i.e. } \conp)$\end{lemma}
\begin{proof-of-lemma} Consider the following Turing machine that decides $\good$:
\begin{enumerate}
\item On input $(s_1,...,s_l)$, check the length requirement as before
\item As before, use $\forall$ states to choose $\phi$ such that $|\phi|<l$.  
\item As before, $a \leftarrow (\phi, s_{|\phi|}) \stackrel{?}{\in} A$.  
\item If $\phi$ contains no bound variables,
then evaluate $\phi$ and accept only if $a \iff \phi \in SAT$.
\item Otherwise, use self-reduction to construct $\phi_0, \phi_1$.
\item Compute $a_i \leftarrow (\phi_i,  s_{|\phi_i|}) \stackrel{?}{\in} A, i=\{0,1\}$
\item Accept only if $a \iff a_0 \vee a_1$ or $\neg a \iff \neg a_0 \wedge \neg a_1$.
\end{enumerate}

Note that we only use $\forall$ states, so this TM is in $\conp$.
To show correctness, observe that sequences can fail to be good in 
two ways:
\begin{enumerate}
\item   A sequence might cause $A$ to reject an otherwise 
satisfiable formula.   In this case, at step (3), the boolean
variable $a$ will be $false$.  If $\phi$ is trivial, then we
will evaluate it and notice that it in fact is $\in SAT$.  Therefore,
our machine will reject the sequence.  

If $\phi$ is not trivial,
then we will compute $a_i$ in step (6).  Observe that since the sequence
$(s_1,...,s_l)$ is a bad sequence, then there is some minimal length 
satisfiable formula $\theta$ on which $(s_1,...,s_l)$ convinces 
$A$ to reject.   We can assume that our $\forall$ states will find 
this $\theta$.  However,  since $\theta_0,\theta_1$ are smaller formulas, 
then $(s_1,...,s_l)$ will offer the correct advice on these strings.
In particular, since $\theta$ was satisfiable, either $a_0=true$ or
$a_1=true$.  Therefore, our machine will reject in step $7$.

\item  The sequence might convince $A$ to accept a formula that is
not satisfiable.  At step (3), the boolean variable $a$ will be set
to $true$.  Like before, the base case in (4) will reject the sequence 
immediately if $\phi$ evaluates to false.

Otherwise, we will compute $a_i$ as before.  The same argument about
minimal $\theta$ applies in this case.  There is some minimal
length unsatisfiable formula $\theta$ on which $(s_1,...,s_l)$ convinces 
$A$ to accept.  Since $\theta_i$ are smaller formulas, then the
sequence will advise $A$ to reject both of them since neither are satisfiable.
Hence, our machine will reject in step 7.
\end{enumerate}

The key idea is to understand that if the sequence {\em ever} deceives
us, then there must be some minimal length formula on which it deceives
us.  Our $\forall$ states are guaranteed to find this minimal length case.
By using self-reduction, this minimal length case can be transformed into
two smaller questions on which the sequence must act correctly.  In this
way, we can detect the deception and reject.  Remember that one rejecting
branch of a $\conp$ computation tree suffices to reject altogether.

\end{proof-of-lemma}

\begin{proof}
To complete the proof of the theorem, we present a Turing machine that
decides the $\Sigma_3 P$-complete problem $TQBF_3^{\exists}$.  Consider
$TM_{{\rm TQBF}_3^{\exists}}$ that
\begin{enumerate}
\item On input $\exists x \forall y \exists z (\phi(x,y,z))$, use $\exists$ states to guess an $x$ and a good sequence of strings $(s_1,...,s_l)$.  
\item Use $\forall$ states to guess $y$.  Continue to use $\forall$ states to test if $(s_1,...s_l) \in \good$ using the
lemma above.  If not, we reject.  
\item Use the good sequence $(s_1,...,s_l)$ to decide whether  $(\exists z \phi(x,y,z), s_{|\exists z \phi(x,y,z)|}) \in A$.  Accept if $A$ accepts, else reject.  
\end{enumerate}
The machine alternates between $\exists$ and $\forall$ states only once, and so it is in $\Sigma_2 P$. 
\end{proof}

\begin{section}{Circuit Complexity}\end{section}

\begin{theorem}[Claude Shannon]  For most functions $f:\{0.1\}^n \rightarrow \{0,1\}$,
the circuit complexity, $C(f) = \Omega(\frac{2^n}{n})$.
\end{theorem}
\begin{proof}
This is a simple counting argument.  There are $2^{2^n}$ functions from
$\{0,1\}^n \rightarrow \{0,1\}$.  To show this, consider each function as
a table of ones and zeroes for each $n$-bit number.  Hence, each function can
be represented as a $2^n$ bit string, and there are a total of $2^{2^n}$ different $2^n$ bit strings.  Consider the number of circuits that consist of $g$ 
and/or/not gates.  There are $3^g$ different sets of gates we can use, and
there are $<(g+n)^{2g}$ different input configurations for the gates.
Hence, there are at most $3^g(g+n)^{2g}$ different boolean circuits of
$g$ gates.  Consider the set of functions such that $C(f)<g$.  This implies
that $2^{2^n} < 3^g(g+n)^{2g}$.  Taking logs, we have $2^n < 2g(\log(g+n+3/2))$
which implies that $g>\frac{2^n}{2n}$.  There are some more complicated 
methods to eliminate the $2$ in the denominator.
\end{proof}

Lupanov and Lenore Blum have more results in this field.

%\begin{thebibliography}{99}
%\bibitem{kls} Richard M. Karp and Richard J. Lipton. Some connections between nonuniform and uniform complexity classes. In {\em Conference Proceedings of the Twelfth Annual ACM Symposium on Theory of Computing}, pages 302-309, Los
%     Angeles, California, 28-30 April 1980.
%\end{thebibliography}

\end{document}

