
\documentstyle[12pt]{article}
\setlength{\oddsidemargin}{0.0in}
\setlength{\textwidth}{6.5in}
\setlength{\textheight}{8.8in}
\setlength{\topmargin}{-0.4in}

%\usepackage{amsfonts} 



\newcommand{\ket}[1]{|#1\rangle}
\newcommand{\bra}[1]{\langle#1|}
\newcommand{\ontop}[2]{{\begin{array}{l} {#1} \\ {#2} \end{array}}}
\newcommand{\stackket}[2]{{\Big | \hskip -5pt \ontop{#1}{#2} \hskip -3pt  \Big \rangle}}
\newcommand{\stackbra}[2]{{\Big \langle \hskip -5pt \ontop{#1}{#2} \hskip -3pt  \Big |}}
\newcommand{\stackketbra}[2]{{ \stackket{#1}{#2} \stackbra{#1}{#2} }}
\newcommand{\ra}{\rangle}
\newcommand{\la}{\langle}
\newcommand{\ketbra}[2]{|#1\rangle\langle#2|}
\newcommand{\braket}[2]{\langle {#1} | {#2} \rangle}


\begin{document}

   \pagestyle{myheadings}
   \thispagestyle{plain}
   \newpage
   \noindent
   \begin{center}
   \framebox{
      \vbox{\vspace{2mm}
    \hbox to 6.28in { {\bf CS 262: Computational Complexity
                        \hfill Due: February 26, 2010} }
       \vspace{4mm}
       \hbox to 6.28in { \hfill {\Large Homework 5} \hfill
               }
       \vspace{2mm}
       \hbox to 6.28in { {\it Instructor: Sandy Irani} \hfill }
      \vspace{2mm}}
   }
   \end{center}
   \vspace*{4mm}

Do three of the following five  problems:

\begin{enumerate}

\item
Show that the class ${\bf ZPP}={\bf RP} \cap {\bf co-RP}$.

\item
Describe a {\em decidable} language that is in {\bf P/poly} but not in {\bf P}.

\item We have been careful to have gates with bounded {\em fan-in} (that is, they
each take at most two inputs). However, we have allowed unbounded {\em fan-out}
in that each gate can feed into an arbitrary number of gates. 
Show that any circuit can be transformed into another with fan-out two with
only a linear increase in the size. 

\item
The language {\bf USAT} is the set of boolean formulae that have  a unique satisfying assignment.
In class we proved the Valiant-Vazirani theorem which says that that there exists a 
polynomial-time algorithm $f$ such that for every $n$-variable boolean formula, $\phi$
$$\phi \in {~SAT~} \Rightarrow Pr[f(\phi)\in ~USAT~] \ge \frac{1}{8n}$$
$$\phi \not\in {~SAT~} \Rightarrow Pr[f(\phi)\in ~USAT~] =0 .$$
Now suppose we have a polynomial time algorithm that given a boolean formula $\phi$,
will answer "yes" if $\phi \in {~USAT~}$, will answer "no" if $\phi \not\in {~SAT~}$
and will answer arbitrarily otherwise. Prove that this would imply that ${\bf RP} = {\bf NP}$.


\item A language $L \subseteq \{0,1\}^*$ is {\em sparse} if there is a polynomial $p$
such that $| L \cap \{0,1\}^n| \le p(n)$ for all $n$. Show that every sparse language is
in {\bf P/poly}.
\end{enumerate}

\end{document}
