\documentclass[12pt]{article} \usepackage{amsmath} \usepackage{comment} \newcommand{\NP}{{\rm NP}} \renewcommand{\P}{{\rm P}} \newcommand{\IS}{{\rm ISAAC}} \newcommand{\lf}{\left\lfloor} \newcommand{\rf}{\right\rfloor} \newcommand{\lc}{\left\lceil} \newcommand{\rc}{\right\rceil} \newcommand{\Ceil}[1]{\left\lceil {#1}\right\rceil} \newcommand{\ceil}[1]{\left\lceil {#1}\right\rceil} \newcommand{\floor}[1]{\left\lfloor{#1}\right\rfloor} \newcommand{\goes}{\rightarrow} \newcommand{\nth}{n^{th}} \newcommand{\N}{\sf{N}} \newcommand{\Q}{\sf{Q}} \newcommand{\R}{\sf{R}} \newcommand{\C}{\sf{C}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcommand{\es}{\emptyset} \newcommand{\st}{\mathrel{:}} \newcommand{\e}{\varepsilon} \usepackage{tikz} \usetikzlibrary{automata,positioning,arrows} \begin{document} \centerline{\bf Homework 8 Morally Due April 16 at 3:30PM} \begin{enumerate} \item (30 points) Show that NP is closed under intersection. \newpage \item (40 points) In this problem we will look at instructions a Turing Machine could have and how they would be modeled by Boolean Formulas (by modifying the proof of the Cook-Levin Theorem) We will DO one such problem and then assign two others. \begin{enumerate} \item (0 points- I give the answer so that you can do the other parts more easily) Assume that a Turing Machine has an instruction of the following type: $$\delta(q,a) = (p,RR)$$ which means that if the head is looking at the symbol $a$, and the state is $q$, then the head of the Turing Machine moves TWO steps to the right and the state changes to $p$. Nothing on the tape changes, though the configuration will change since the head has moved. Give the formula that models this instruction. ANSWER: We first look at what happens if the configuration is $(q,a)bb$? Here is the sequence of parts of the configurations. \[ \begin{array}{|c|c|c|} \hline (q,a) & b & b \cr \hline a & b & (p,b) \cr \hline \end{array} \] The formula is $$ (z_{i,j,(q,a)} \wedge z_{i,j+1,b} \wedge z_{i,j+2,b}) \rightarrow (z_{i+1,j,a} \wedge z_{i+1,j+1,b} \wedge z_{i+1,j+2,(p,b)})$$ This is NOT the final answer since the configuration could have other symbols where I have the $bb$. Here is what happens if the config is $(q,a)\sigma_1\sigma_2$. \[ \begin{array}{|c|c|c|} \hline (q,a) & \sigma_1 & \sigma_2 \cr \hline a & \sigma_1 & (p,\sigma_2) \cr \hline \end{array} \] Hence the formula is $$\bigwedge_{(\sigma_1,\sigma_2)\in\Sigma\times\Sigma}$$ $$(z_{i,j,(q,a)} \wedge z_{i,j+1,\sigma_1}\wedge z_{i,j+2,\sigma_2}) \rightarrow (z_{i+1,j,a} \wedge z_{i+1,j+1,\sigma_1} \wedge z_{i+1,j+2,(p,\sigma_2)})$$ When you answer the questions below you NEED to have both a diagram like this one: \[ \begin{array}{|c|c|c|} \hline (q,a) & \sigma_1 & \sigma_2 \cr \hline a & \sigma_1 & (p,\sigma_2) \cr \hline \end{array} \] and the formula like this one: $$\bigwedge_{(\sigma_1,\sigma_2)\in\Sigma\times\Sigma}$$ $$(z_{i,j,(q,a)} \wedge z_{i,j+1,\sigma_1} \wedge (z_{i,j+2,\sigma_2}) \rightarrow (z_{i+1,j,a} \wedge z_{i+1,j+1,\sigma_1} \wedge z_{i+1,j+2,(p,\sigma_2)})$$ And NOW for the problems YOU need to do. \item (20 points) Do what I did above for the transition $\delta(q,a)=(p,b,L)$ which means that if the head is looking at an $a$ and the machine is in state $q$ then it will overwrite the $a$ it is looking with by a $b$ {\bf AND} change state to $p$ {\bf AND} move Left. \item (20 points) Do what I did above for the transition $\delta(q,a)=(p,L,b)$ which means that if the head is looking at an $a$ and the machine is in state $q$ then it will move Left {\bf AND THEN} write a $b$ in the square (overwriting whatever was there) {\bf AND THEN} change state to $p$. \end{enumerate} \newpage \item (30 points) Let $a,b\in\N$, $a,b\ge 2$. Let $B$ be solvable in time $2^{n^b}$ time where $n$ is the length of the input to $B$. (NOTE- in this problem the input to $B$ will be an ordered pair $(x,y)$ where $|x|=n$ and $|y|=n^a$ (as you will see soon). since $n \ll n^a$ we will consider the length of the input to $B$ to be $O(n^a)$.) Let $$A = \{ x \st (\exists y, |y|=|x|^a)[(x,y)\in B].$$ Give an algorithm that determines if $x\in A$. Give $T(n)$, the time bound on the algorithm for inputs of length $n$. $T(n)$ should be of the form $2^{O(n^c)}$ for a $c$ that depends on $a,b$. \end{enumerate} \end{document}