% \documentclass{article} \documentstyle{article} % \usepackage{myMac} \input{/home/yap/bks/complexity/mac/newcmd} \input{/home/yap/bks/complexity/mac/layout} \input{../../mac/lmac} \draftdim \newcommand{\ans}[2]{#1} \begin{document} \begin{center} Honors Theory, Spring 2002, Yap\\ Homework 4\\ \end{center} Exercises on machines models (Turing, Pointer). Note that you do not need to hand in problems that has 0 points. This is due on Monday March 18. But for any problem that you hand in BEFORE the midterm, I will give you the solution to that problem. \begin{enumerate} \item (0 Points) In the lecture notes and in class, we show that for any $c\in\NN$ and any $k$-tape $M$, we can construct a $(k+1)$-tape $M'$ with the following property: (i) each tape symbol of $M'$ encodes $c$ consecutive tape symbols of $M$, (ii) $M'$ begins by converting the input word into this compressed from on its extra tape (so that it can now read $c$ input symbols at a time), and (iii) $M'$ simulates $c$ steps of $N$ using only $6$ steps. Can you reduce the number ``$6$''? \\ (i) Improve the number $6$ in case $k=1$. \\ (ii) When $k>1$, can you improve $6$ to $5$? \ans{}{ } \item (5+15 Points) Construct a pointer machine PM that adds two dyadic numbers. \\ (i) Describe the dyadic algorithm for addition. Is it simpler or more complex than binary addition? \ans{}{ We need to consider 7 possibilities: 0+0=1, 0+1=00, 1+1=01, 0+0+0=00, 0+0+1=01, 0+1+1=10, 1+1+1=11 } \\ (ii) We need some I/O conventions for pointer machines (PM's). Let $\Delta$ be the \dt{alphabet} for the PM, and $G$ be the computation graph of the PM. If $w\in \Delta^*$, let $[w]_G$ denote the node in $G$ represented by $w$. For instance, the empty string $\eps$ represents the center $[\eps]$. Assume a special symbol $\beta\in\Delta$ that denotes the \dt{bit value} of any node $w\in\Delta^*$ in the following sense: if $[w.\beta] = [\eps]$, then we say that the node $[w]$ stores the $1$ bit, else it stores tbe $0$ bit. How do we represent a list of nodes? Assume a special ``next symbol'' $\nu\in\Delta$ such that $[w.\nu]$ represents the next node after $[w]$, provided $[w,\nu]\neq [\eps]$; otherwise we say there is no next node. Define the list headed by $w$ to be the sequence $$L(w) \as ([w], [w\nu], [w\nu^2]\dd [w\nu^{n-1}]),$$ terminated by the first $n$ such that $[w\nu^n]=[\eps]$. The list $L(w)$ may be infinite (in the case of a loop). The binary string represented by $w$ is simply the sequence of bit string stored in $L(w)$. Input are indicated by two linear lists $L(\alpha)$ and $L(\alpha^2)$, where $\alpha\in\Delta$ is a special ``input symbol''. When the computation ends, we want the output string to stored in the list $L(\alpha^3)$. \item (30 Points) Verify the Polynomial Simulation Thesis (L), for Turing machines and Pointer machines. We want to verify two main cases, depending on the mode $\mu$ and resource $\rho$: we want you to verify: \\ (i) $(\mu,\rho)$ = (Fundamental Mode, Time). More precisely, $\dtime(n^{O(1)}) = \dtime_{PM}(n^{O(1)})$. The latter class is the class of languages accepted by PM's in deterministic polynomial time. \\ (ii) $(\mu,\rho)$ = (Nondeterministic Mode, Space). That is $\nspace(n^{O(1)}) = \nspace_{PM}(n^{O(1)})$. Please only sketch the simulations, at a fairly high level (but you should give details when necessary). Try not to write more than 4 pages for this problem. [Remember the words of the wise speaker, ``if I have more time, I would have given a shorter speech''.] \item (10x3 Points) % Problem 2.16 There are three possible responses to the following statements: True, False or Perhaps. ``Perhaps'' reflects the uncertainty that only assume the results in chapter 2. If your answer is True or False, you must give brief reasons in order to obtain full credit. % \\ (a) T/F/P: $\nspace(n)\ib \dtime(O(1)^n)$. % ANS: T: $NSPACE(n)\ib DTIME(n^3 O(1)^n)=DTIME(O(1)^n)$ \\ (b) T/F/P: $\ntime(n)\ib \dtime(2^n)$. % ANS: P: unknown. \\ (c) T/F/P: $\nrev(n)\ib \drev(O(1)^n)$. % ANS: F: $DREV(2)=RE$. % \end{enumerate} \end{document}