\documentclass{article} \input{preamble.tex} \newcommand{\TIME}[1]{\ensuremath{\mbox{TIME}(#1)}} \newcommand{\SPACE}[1]{\ensuremath{\mbox{SPACE}(#1)}} \newcommand{\setof}[1]{\ensuremath{\left\{ #1\right\}}} \newcommand{\sizeof}[1]{\ensuremath{\left| #1\right|}} \newcommand{\Sizeof}[1]{\ensuremath{\Big| #1 \Big|}} \newcommand{\NP}{\mathrm{NP}} \newcommand{\EQBF}{\exists\mathrm{QBF}} \newcommand{\coNP}{\mathrm{coNP}} \newcommand{\Pt}{\mathrm{P}} \renewcommand{\bigO}{\mathrm{O}} \newcommand{\Ppoly}{\mathrm{P/poly}} \newcommand{\SAT}{\mathrm{SAT}} \newcommand{\GOOD}{\mathrm{GOOD}} \renewcommand{\FOR}{\textbf{for}} \newcommand{\FORALL}{\textbf{for all}} \newcommand{\CHOOSE}{\textbf{choose}} \renewcommand{\TO}{\textbf{to}} \renewcommand{\DO}{\textbf{do}} \renewcommand{\WHILE}{\textbf{while}} \renewcommand{\AND}{\textbf{and}} \renewcommand{\IF}{\textbf{if}} \renewcommand{\THEN}{\textbf{then}} \renewcommand{\ELSE}{\textbf{else}} \newcommand{\ACCEPT}{\textbf{accept}} \newcommand{\REJECT}{\textbf{reject}} \newcommand{\settabs}{\hspace{0.25 in}\= \hspace{0.25 in}\=\hspace{0.25 in}\= \ hspace{0.25 in}\= \hspace{0.25 in}\= \hspace{0.25 in}\= \hspace{0.25 in}\= \hspace{0.25 in}\= \hspace{0.25 in}\= \hspace{0.25 in}\= \hspace{0.25 in}\= \kill} \begin{document} \lecture{6}{February 23, 1998}{Daniel A. Spielman}{Matthew Secor} \section*{NP and P/poly} The major result that we will show here is that if $\NP$ is contained within $\Ppoly$, then the polynomial hierarchy collapses. We will prove that if $\NP \subseteq \Ppoly$ then $\Sigma_2 P = \Pi_2 P$. Before we prove this, let's review what this all means. Recall the definition of $\Ppoly$: \begin{eqnarray*} \Ppoly = \{L&:& \exists k>0, A\in P\textrm{ and a sequence of strings } \{S_n\}_{n=1}^{\infty} \textrm{ such that } \\&&|S_n| = \bigO(n^k) \textrm{ and } \forall w, w\in L \Longleftrightarrow (w,S_{|w|})\in A \} \end{eqnarray*} Using this definition, we know the following, which will be useful later: \begin{proposition} \begin{eqnarray*} \NP \subseteq \Ppoly \Longrightarrow \SAT \in \Ppoly &\Longrightarrow& \exists k>0, A\in P, \{S_n\}_{n=1}^{\infty} \textrm{ such that } \\&&|S_n| \le (k n)^k \textrm{ and } \forall \phi, \phi\in \SAT \Longleftrightarrow (\phi,S_{|\phi|})\in A\ . \end{eqnarray*} \label{Prop:SATinPpoly} \end{proposition} We can think of the sequence of strings $\{S_n\}_{n=1}^\infty$ as advice strings which, in conjunction with the original input to $\SAT$, allow us to decide $\SAT$ in polynomial time. For the following definitions, we will assume that $\NP \subseteq \Ppoly$ and thus $\SAT \in \Ppoly$. We begin with a definition: \begin{definition} A sequence of strings $(a_1, \dots, a_\ell)$ is {\em good} if $|a_i| \le (ki)^k$ and for all $|\phi|\le \ell$, $$ \phi \in \SAT \Longleftrightarrow (\phi,a_{|\phi|}) \in A, $$ where $A$ is defined as the machine in Proposition \ref{Prop:SATinPpoly}. \end{definition} Note that these good strings are not necessarily the same as the sequence of strings $\{S_n\}_{n=1}^{\infty}$ in Proposition \ref{Prop:SATinPpoly}. There could be many different good sequences of length $\ell$, although the sequence $\{S_n\}_{n=1}^\ell$ is, by definition, good. \begin{definition} $\GOOD$ is the language consisting of all of the good sequences of strings. \end{definition} \begin{proposition} $\GOOD \in \Pi_2^\Pt$ \end{proposition} \begin{proof} Given a candidate sequence, $(a_1, \dots, a_\ell)$, we must show two things. First, we need to check that the size constraint is met ($|a_i|\le(ki)^k$ for some $k$). This is easy. Second, we must show that the check to see if some sequence of strings is good can be done with a $\Pi_2^\Pt$ machine. In order to see this, consider the verification that needs to be done for the input $(a_1, \dots, a_\ell)$. The following property must hold: $$ \forall \phi, |\phi|\le \ell: \phi \in \SAT \Longleftrightarrow (\phi,a_{|\phi|}) \in A \ . $$ If we can show that $\GOOD$ is in $\coNP^\SAT$, we are done because $\coNP^\SAT \subseteq \Pi_2^\Pt$. We can show this by noting that checking for $\phi \in \SAT$ takes a single call to a $\SAT$ oracle, and checking $(\phi,a_{|\phi|})\in A$ requires polynomial time. So, for each $\phi$ that we check, we require polynomial time with a call to a $\SAT$ oracle, and we can use a $\forall$ state to perform the computation over each possible $\phi$, giving rise to a $\coNP^\SAT$ machine. \end{proof}\\ Now, we will introduce the concept of self-reducibility, needed to prove a stricter containment of $\GOOD$. \begin{definition} A language $L$ is {\em self-reducible} if there exists a polynomial time oracle Turing machine $M^L$ such that \begin{itemize} \item[(i)] $M^L$ accepts $L$, and \item[(ii)] $M^L$ can only ask oracle about strings of length strictly less than the length of its input. \end{itemize} \end{definition} According to this definition, almost all of the languages we have seen are self-reducible.\footnote{There are languages in $\Ppoly$ that are not self-reducible. Also, it is possible to choose languages in $\NP$ which are not self-reducible.} In particular, $\SAT$ is self-reducible. \begin{proposition} $\SAT$ is self-reducible. \end{proposition} \begin{proof} In order to show this, we need to find out how to tell whether $\phi(x_1, \dots, x_n)$ is satisfiable, if we only have access to an oracle that can tell us about formulas shorter than $\phi$. Consider the following two formulas: \begin{eqnarray*} \phi_0(x_2, \dots, x_n) &=& \phi(0, x_2, \dots, x_n)\ \mathrm{, and}\\ \phi_1(x_2, \dots, x_n) &=& \phi(1, x_2, \dots, x_n)\ . \end{eqnarray*} Given $\phi$, we can build $\phi_0$ and $\phi_1$ in polynomial time, and we also know that $|\phi_0|$ and $|\phi_1|$ are less than $|\phi|$. So, in order to check whether $\phi \in \SAT$, we only need to check if either $\phi_0$ or $\phi_1$ are in $\SAT$, and accept if either is. Thus, we can construct a machine $M^\SAT$ which computes $\phi_0$ and $\phi_1$ and accepts only if one of them is satisfiable (determined with two calls to the $\SAT$ oracle). \end{proof}\\ We now use this definition of self-reducibility to show that $\GOOD\in\Pi_1^\Pt$, which will allow us to construct a $\Sigma_2^\Pt$ machine that decides $\EQBF_3$ if $\SAT\in\Ppoly$. \begin{lemma} $\GOOD \in \Pi_1^\Pt$ \end{lemma} \begin{proof} We start by defining a Turing machine $M_\GOOD$, then we show that it accepts $\GOOD$ and that it is in $\Pi_1^\Pt$. Essentially, $M_\GOOD$ is trying to verify the following property for every $\phi$ such that $|\phi|\le\ell$: \begin{equation} \phi \in \SAT \Longleftrightarrow (\phi,a_{|\phi|}) \in A \ . \label{Eq:GOOD} \end{equation} $M_\GOOD$ performs the following algorithm on each input $(a_1,\dots,a_n)$: {\sffamily \begin{tabbing} \settabs \textbf{Algorithm:}\\ I\>\FORALL\ $\phi$ such that $|\phi|\le\ell$ (using a $\forall$ state)\\ II\>\>check if $(\phi,a_{|\phi|}) \in A$\\ III\>\>\IF\ $|\phi|=1$, verify Property (\ref{Eq:GOOD}) directly,\\ \>\>\>\ACCEPT\ if the property is satisfied\\ \>\>\>\REJECT\ otherwise\\ IV\>\>\IF\ $(\phi,a_{|\phi|})\not\in A$,\\ \>\>\>\ACCEPT\ if no assignment satisfies $\phi$ (using $\forall$ state to try all possible assignments)\\ \>\>\>\REJECT\ otherwise\\ V\>\>\IF\ $(\phi,a_{|\phi|})\in A$, self-reduce $\phi$ to get $\phi_0$ and $\phi_1$ and\\ \>\>\>\ACCEPT\ if $(\phi_0,a_{|\phi_0|})\in A$ or $(\phi_1,a_{|\phi_1|})\in A$ \\ \>\>\>\REJECT\ otherwise\\ \end{tabbing} } Step \textsf{V} requires some explanation. In order to show that $\phi\in\SAT$, by self-reducibility, it suffices to show that $\phi_0\in\SAT$ or $\phi_1\in\SAT$. If we know the algorithm works for shorter formulas, then checking that $(\phi_0, a_{|\phi_0|})\in A$ is equivalent to checking whether $\phi_0\in\SAT$. So, by an inductive argument, we can show that this will work for a formula of a certain length once we know it works for all shorter lengths. Now, we need to prove this algorithm accepts $\GOOD$. (i) and (ii) will establish this. \begin{itemize} \item[(i)] If the input $(a_1, \dots, a_\ell)$ is good, then the program accepts. This is clear from the definition of the algorithm. \item[(ii)] If the program accepts, then the input is good. Assume (for contradiction) that it accepts, but the input is not good. Let $\phi$ have minimal length such that \begin{itemize} \item[(a)] $(\phi,a_{|\phi|})\in A$ but $\phi\not\in\SAT$, or \item[(b)] $(\phi,a_{|\phi|})\not\in A$ but $\phi\in\SAT$. \end{itemize} Then, if (b) were the case, we would reach step \textsf{IV}, but we would reject because a satisfying assignment would be found. If (a) were the case, we would reach step \textsf{V}, and produce $\phi_0$ and $\phi_1$ that must both not be satisfiable because $\phi$ has minimal length such that the program accepts incorrectly, so we would reject. The final case is for $|\phi|=1$. In this case, step \textsf{III} provides the correct behavior. Also, note that we only used $\forall$ states in the construction of $M_\GOOD$ and the computation required is polynomial in the input length, so that $M_\GOOD$ is in $\Pi_1^\Pt$. \end{itemize} \end{proof} \begin{theorem}[Karp and Lipton] $\SAT\in\Ppoly\Longrightarrow\Sigma_3^\Pt=\Sigma_2^\Pt$ \label{Thm:KarpLipton} \end{theorem} \begin{proof} We will show that if $\SAT\in\Ppoly$ then $\EQBF_3\in\Sigma_2^\Pt$. If this is true, then because $\EQBF_3$ is $\Sigma_3^\Pt$-complete, $\Sigma_3^\Pt=\Sigma_2^\Pt$. Remember that strings in $\EQBF_3$ are true statements of the form $$ \exists x \forall y \exists z \;:\; \phi(x,y,z)\textrm{ is satisfiable} $$ We can determine whether a statement of this form is in $\EQBF_3$ using a Turing machine which implements the following algorithm: {\sffamily \begin{tabbing} \settabs \textbf{Algorithm:}\\ \>\CHOOSE\ $x_0$ (using $\exists$ state)\\ \>\CHOOSE\ $(a_1, \dots, a_{|\phi|})$, $|a_i|\le(ki)^k$ (using $\exists$ state)\\ \>\FORALL\ $y_0$ (using $\forall$ state)\\ \>\>check that $(a_1, \dots, a_{|\phi|})$ is good (using $M_\GOOD$ from above which only has $\forall$ states)\\ \>\>compute $\hat\phi(z) = \phi(x_0, y_0, z)$\\ \>\>\ACCEPT\ if $(\hat\phi(z),a_{|\hat\phi(z)|})\in A$\\ \>\>\REJECT\ otherwise\\ \end{tabbing} } The basic idea is to choose $x$ and $y$ using $\exists$ and $\forall$ states, as well as a good sequence $(a_1, \dots, a_{|\phi|})$. Then, we just have to check whether the simpler $\hat\phi(z)$ is in $\SAT$ in order to answer whether the overall statement is in $\EQBF_3$. To do this, we can use the definition of a good sequence which tells us that $$ \hat\phi(z)\in\SAT\Longleftrightarrow (\hat\phi(z),a_{|\hat\phi(z)|})\in A $$ To show that this algorithm is correct, observe that if $\SAT\in\Ppoly$, then there exists a good $(a_1, \dots, a_{|\phi|})$; in particular, $\{S_n\}_{n=1}^{|\phi|} = (S_1, \dots, S_{|\phi|})$ is good. In any accepting computation, you obtain such a string so the algorithm accepts if and only if the statement ``$\exists x \forall y \exists z : \phi(x,y,z)$ is satisfiable'' is true. We have described a Turing machine that starts with $\exists$ states, and switches only once to $\forall$ states, so the language decided by the machine is in $\Sigma_2^\Pt$. \end{proof}\\ Finally, we can prove our original statement. \begin{theorem} $\NP\subseteq\Ppoly\Longrightarrow\Sigma_2^\Pt=\Pi_2^\Pt$ \end{theorem} \begin{proof} Theorem \ref{Thm:KarpLipton} tells us that $\Sigma_3^\Pt=\Sigma_2^\Pt$ if $\NP\subseteq\Ppoly$. We also know then that $\Pi_3^\Pt=\Pi_2^\Pt$ because $\Pi_k^\Pt = \mathrm{co}\Sigma_k^\Pt$. From this we have that \begin{eqnarray*} \Pi_2^\Pt\subseteq\Sigma_3^\Pt =\Sigma_2^\Pt \end{eqnarray*} and \begin{eqnarray*} \Sigma_2^\Pt\subseteq\Pi_3^\Pt =\Pi_2^\Pt\ , \end{eqnarray*} Which leads to $\Sigma_2^\Pt = \Pi_2^\Pt$ and a collapse of the polynomial hierarchy. \end{proof} \end{document}