\documentstyle[12pt,twoside,amssymb]{article}
\input{defs-6045}

\newcommand{\poly}{{\Bbb P}}
\newcommand{\RP}{{\Bbb RP}}
\newcommand{\nat}{{\Bbb N}}
\newcommand{\fa}{\forall}
\newcommand{\sig}{\Sigma}
\newcommand{\arr}{\rightarrow}
\newcommand{\pless}{\leq_{\poly}}


\begin{document}

\handout{ps9}{Homework Assignment 9}{April 17, 1992}
\due{Friday, April 24}

\medskip

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



Remember to write up problems 1 through 5 in such a way that each of
these problems can be turned in separately.  Put your name on each
problem, with your last name clearly written in CAPITAL LETTERS, and
with your section and the NAME of your recitation instructor (e.g.
RIVEST/LYNCH, W1) also in capital letters. Try to always provide clear
(this is not in contradiction with short!) justifications to your
constructions.  

\paragraph{Problems.} 

\begin{enumerate} 

\item[1.] (24 points)

   Exercise from page 10 of Handout~33: Prove that 
$$ \fa \epsilon >0\mbox{ }\  {\Bbb P} \psubset\TIME(2^{n^\epsilon})\ .$$

({\em Hint:} The only thing to prove is that the inclusion is 
{\em strict}. For this, you may think of writing 
 ${n^\epsilon} = (n^{\epsilon/2})^2$ and remark that
 it is also true that 
 $\poly \subseteq \TIME(2^{n^{\epsilon/2}})$. Try to be as 
 precise as you can in your argument!)

\item[2.] (14 points)
    Show that an algorithm that makes at most a constant number of
    calls to polynomial-time subroutines runs in polynomial time,
    but that a polynomial number of calls to 
    polynomial-time subroutines may result in a non polynomial-time algorithm.
    (Actually it might even result  in a non exponential-time algorithm. But you
    do not need prove this last fact.)

({\em Hint:} The subroutines do not all run in the same time.)

\item[3.] (24 points)
    It is claimed in Handout 33 (page 9) that the step counting functions
    are closed under
  	\begin{enumerate} 
	\item  addition
	\item  multiplication
        \item  exponentiation
	\item  composition: more precisely, if $f$ and $g$ are counting functions
              such that $g(n) = \Omega(n)$, then the function $g(f(n))$ is also a step 
              counting function.
	\end{enumerate} 
    Prove these results.  

({\em Hint:} Get a feeling of how these operations work in the unary representation
 by investigating  the following examples:
\begin{itemize}
\item addition: $ 111 + 11$ (i.e. $3+2$ in the decimal representation),
\item multiplication: $111\cdot  11$ (i.e. $3\cdot2$ in the decimal representation),
\item exponentiation: ${1111}^{111}$  (i.e. $4^3$ in the decimal representation).
See how you can reduce exponentiation to multiplication.
\item composition: which operations do you perform in order to compute $g(f(n))$?~)
\end{itemize}

\item[4.] (14 points)
    Call a CFG ``ordered'' if there is an order to the nonterminals:
	$A_0, A_1, A_2, \ldots, A_t$
    where the start symbol is $A_0$, such  that, for every rule of the grammar
	$A_i \rightarrow w$
    and every nonterminal $A_j$ appearing in $w$, we have $j > i$.  (Note that
    this is $j>i$, not even $j\geq i$, so that recursion is not allowed and
    an ordered CFG can only generate a finite language.)

    Define the problem NEOCFG (Not Everything from an Ordered CFG) as follows:
\begin{center}
\begin{tabbing} 
	Input: \=  an ordered CFG $G$.\\
	Decide: \> \ Is $L(G) \ne \Sigma^*$?
\end{tabbing}
\end{center}

    Prove that
	 NEOCFG can be solved in double exponential time.

\item[5.] (24 points)
   Let GSAT$_C$ denote the problem of checking the satisfiability of
    a boolean formula, where the logical connectives are drawn from the
    set $C$. For any two boolean predicates $X$ and $Y$ we let
    $X$~NOR~$Y$ denote the predicate that is true when none of $X$ and
    $Y$ is true, and 
    $X$~EQ~$Y$  the predicate that is true when  $X$ and
    $Y$ are both true or false at the same time.

Consider the sets:

	$C_1 = \{$ AND, OR, NOT $\}$, \ 
	$C_2 = \{$ AND, NOR $\}$, \
	$C_3 = \{$ AND, OR, NOT, EQ $\}$, and
	$C_4 = \{$ AND, NOR, EQ $\}$ \

\begin{enumerate}
\item
    Prove that 
	GSAT$_{C_2} \le_\poly$ GSAT$_{C_1}$.

    What are the difficulties that you encounter while attempting
    to prove the converse reduction 	GSAT$_{C_1} \le_\poly$ GSAT$_{C_2}$ ?
\item
    Prove that 
	GSAT$_{C_3} \equiv_\poly$ GSAT$_{C_1}$ i.e., that
	GSAT$_{C_3} \le_\poly$ GSAT$_{C_4}$ and that
	GSAT~$_{C_4} \le_\poly$ GSAT$_{C_3}$.

({\em Hint:} You can introduce new variables if that fits you.)

\end{enumerate}

\end{enumerate} 

\end{document}
