\documentstyle[11pt]{article}

\setlength{\oddsidemargin}{0pt}
\setlength{\evensidemargin}{0pt}
% \setlength{\parindent}{0pt}
\setlength{\parskip}{7pt plus 1pt}
\setlength{\marginparwidth}{0pt}
\setlength{\marginparsep}{0pt}
\setlength{\topmargin}{-.5in}
\setlength{\textwidth}{6.5in}
\setlength{\textheight}{8.5 in}
\begin{document}

\pagestyle{empty}

\vspace{.1in}

\section{Basic Complexity Theory}\label{}

\emph{Definition}: {\bf P} = the set of all languages L that have a
deterministic worst case polynomial time algorithm, $A$ such that for
all $x \in \Sigma^{*}$:
\begin{itemize}
\item if $x \in L$, $A(x)$ accepts
\item if $x \in \bar{L}$, $A(x)$ rejects
\end{itemize}

\emph{Definition}: {\bf NP} = set of all languages L that have a
deterministic worst case polynomial time algorithm, $A$, such that for
all $x \in \Sigma^{*}$:
\begin{itemize}
\item if $x \in L$, there exists a string $y$ such that $A(x,y)$
accepts and $|y|$ is bounded by a polynomial in $|x|$
\item if $x \in \bar{L}$, for any string $y \in \Sigma^{*}$, $A(x,y)$ rejects
\end{itemize}


\emph{Definition} For any complexity class $C$, we define ${\bf Co}-C =
\{L | \bar{L} \in C \}$

\subsection{co-C Examples}

\emph{Definition}: {\bf co-P} = the set of all
languages L such that there exists a deterministic algorithm, $A$
running in worst case polynomial time such that for all $x \in \Sigma^{*}$:
\begin{itemize}
\item if $x \in \bar{L}$, $A(x)$ accepts
\item if $x \in L$, $A(x)$ rejects
\end{itemize}

\emph{Note that $P=co-P$}

\emph{Definition}: {\bf co-NP} = the set of all
languages L such that there exists a deterministic algorithm, $A$
running in worst case polynomial time such that for all $x \in \Sigma^{*}$:
\begin{itemize}
\item if $x \in \bar{L}$, there exists a string $y$ such that $A(x,y)$
accepts and $|y|$ is bounded by a polynomial in $|x|$
\item if $x \in L$, for any string $y \in \Sigma^{*}$, $A(x,y)$ rejects
\end{itemize}

\subsection{Language Examples}\label{}
\begin{itemize}

\item Let $L_{1}$ include only those strings $(G,x)$ where the minimum cut
size of $G$ is $x$

\item Let $L_{2}$ include only those strings $(G,x)$ where $G$ has a TSP
tour of length $x$

\item Let $L_{3}$ include only those strings $(G,x)$ where $G$ has no
TSP tour of length $x$
\end{itemize}
 
\begin{itemize}
\item $L_{1} \in P$
\item $L_{2} \in NP$
\item $L_{3} \in co-NP$
\end{itemize}

Questions:
\begin{itemize}
\item $L_{1} \in NP$?
\item $L_{1} \in co-NP$?
\item $L_{2} \in P$?
\item $L_{3} \in P$?
\end{itemize}

\section{Randomized Complexity Theory}

\subsection{RP and ZPP}


\emph{Definition}: {\bf RP} = the set of all languages L that have a
worst case polynomial time randomized algorithm, $A$, such that for
all $x \in \Sigma^{*}$:
\begin{itemize}
\item if $x \in L$, $A(x)$ accepts with probability at least $1/2$
\item if $x \in \bar{L}$, $A(x)$ rejects
\end{itemize}

\emph{Definition}: {\bf co-RP} = the set of all languages L that have
a worst case polynomial time randomized algorithm, $A$, such that for
all $x \in \Sigma^{*}$:
\begin{itemize}
\item if $x \in \bar{L}$, $A(x)$ accepts with probability at least
$1/2$
\item if $x \in L$, $A(x)$ rejects
\end{itemize}


\emph{Definition}: {\bf ZPP} = the set of all languages L that have an
expected polynomial time algorithm, $A$, such that for all $x \in
\Sigma^{*}$:
\begin{itemize}
\item if $x \in L$, $A(x)$ accepts
\item if $x \in \bar{L}$, $A(x)$ rejects
\end{itemize}

Question: Does ZPP = co-ZPP?

Claim: $ZPP = \textrm{RP} \bigcap \textrm{co-RP}$

Question: How to show this?

\subsection{BPP}

\emph{Definition}: {\bf PP} = the set of all languages L that have a
worst case randomized polynomial time algorithm, $A$, such that for
all $x \in \Sigma^{*}$:
\begin{itemize}
\item if $x \in L$, $A(x)$ accepts with probability greater than $1/2$
\item if $x \in \bar{L}$, $A(x)$ accepts with probability less than $1/2$
\end{itemize}

Note: this class is weak: we can not easily reduce the error
probability with repetitions of the algorithm.  The following class is
more useful.

\emph{Definition}: {\bf BPP} = the set of all languages L that have a
worst case randomized polynomial time algorithm, $A$, such that for
all $x \in \Sigma^{*}$:
\begin{itemize}
\item if $x \in L$, $A(x)$ accepts with probability at least $3/4$
\item if $x \in \bar{L}$, $A(x)$ accepts with probability no more than $1/4$
\end{itemize}

\end{document}
