
\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 { {\em CS 262: Computational Complexity}
                        \hfill {\em Instructor: Sandy Irani} }
       \vspace{4mm}
       \hbox to 6.28in { \hfill {\Large Homework 2} \hfill
               }
       \vspace{2mm}
       \hbox to 6.28in { \hfill  {\bf Due: January  29, 2010} }
      \vspace{2mm}}
   }
   \end{center}
   \vspace*{4mm}

\begin{enumerate}
\item
In class, we showed that {\sc NP} can be defined to be the class of languages
$L$ such that there exists a polynomial-time decidable language $R$ where
$$L = \{ x \mid  \exists y, |y| \le |x|^{k}, (x,y) \in R \}.$$
Is it possible to define an analogous definition of  the class {\sc NEXP}
that does not use the notion of a non-deterministic Turing Machine?
Why or why not?

\item
Show that if $f(n)$ and $g(n) \ge n$ are proper complexity functions
then $ {\sc TIME}( f(n) ) = {\sc NTIME}( f(n) ) $ implies that
 $ {\sc TIME}( f(g(n)) ) = {\sc NTIME}( f(g(n)) ) $.

\item
Deine a {\em coding} $\kappa$ to be a mapping from $\Sigma$ to $\Sigma$.
Note that $\kappa$ need not be one-to-one. 
If $x = \sigma_1 \ldots \sigma_n$, where each $\sigma_i \in \Sigma$,
then we define $\kappa(x) = \kappa(\sigma_1)\ldots\kappa(\sigma_n)$.
If $L$ is a language, then $\kappa(L)$ is defined to be
$\{ \kappa(x)| x\in L \}$.
\begin{enumerate}
\item
Prove that {\sc NP} is closed under codings. That is,
show that if $L \in {\sc NP}$ and $\kappa$ is a mapping defined on
the alphabet of $L$, then $\kappa(L) \in {\sc NP}$.
\item We expect that {\sc P} is not closed under mappings, but
we can not prove this without establishing that ${\sc P} \neq {\sc NP}$.
Instead, show that {\sc P} is closed under mappings if and only if
${\sc P} = {\sc NP}$.
\end{enumerate}
\end{enumerate}


\end{document}
