\documentclass[12pt,ifthen]{article} \usepackage{url} \usepackage{comment} \newif{\ifshowsoln} % \showsolntrue \newcommand{\und}{\_\_\_\_\_\_\_\_\_} \renewcommand{\P}{{\rm P}} \newcommand{\into}{{\rightarrow}} \newcommand{\HAMPATH}{{\rm HAMPATH}} \newcommand{\HAMCYCLE}{{\rm HAMCYCLE}} \newcommand{\FHAMCYCLE}{{\rm FHAMCYCLE}} \newcommand{\NP}{{\rm NP}} \newcommand{\FP}{{\rm FP}} \newcommand{\VC}{{\rm VC}} \newcommand{\DS}{{\rm DS}} \newcommand{\FVC}{\rm FVC} \newcommand{\COL}{\rm COL} \newcommand{\N}{\mathbb{N}} \newcommand{\Z}{\mathbb{Z}} \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} \usepackage{amsmath} \usepackage{amssymb} % for \nmid \begin{document} \centerline{\bf HW 12 CMSC 452} \centerline{\bf Morally Due TUES April 29 11:00AM} \centerline{\bf Dead-Cat Due THU May 1 11:00AM} \begin{enumerate} \item (40 points) Recall that a Turing Machine had a $\delta$ function $\delta \colon Q-\{h\} \times \Sigma \into Q \times (\Sigma \cup \{R,L\})$. A Leo-Turing-Machine has a $\delta$ function $\delta \colon Q-\{h\} \times \Sigma \into Q \times \{L,R,S\} \times \Sigma$. The interpret is that $L$ is Left, $R$ is Right, $S$ is STAY PUT. The last $\Sigma$ is for writing a character. So for Leo-Turing-Machines each step is a move AND a write (unlike our Turing Machines where each step s a move OR a write). For example: $$\delta(q,a) = (p, R, b)$$ means that if the machine is in state $q$ and the head is looking at an $a$ then the machine will \begin{itemize} \item write a $b$, then \item Move $R$, then \item write a $b$. \end{itemize} We want to prove the Cook-Levin Theorem for Leo-Turing machines. Give the part of the formula that corresponds to $\delta(q,a) = (p, R, b).$ We'll help you begin: the formula begins $$(z_{i,j,\sigma_1} \wedge z_{i,j+1,(a,q)} \wedge z_{i,j+2,\sigma_2}) \goes$$ YOU FILL IN THE REST. \newpage \item (40 points) Let A {\it Hamiltonian Path} is a path in a graph that hits every vertex exactly once. A {\it Hamiltonian Cycle } is a cycle in a graph that hits every vertex exactly once. A {\it Hamiltonian Musical } is a a musical about either {\it Alexander Hamilton} or {\it William Rowan Hamilton} (I know which one I'd want to see). \begin{itemize} \item $\HAMPATH =$ $\{ (G,a,b) \colon G \hbox{ has a Ham Path that starts at $a$ and ends at $b$ } \}$. \item $\HAMCYCLE =$ $ \{ G \colon G \hbox{ has a Hamiltonian Cycle} \}$ \item $\FHAMCYCLE$ is the function that, on input a graph $G$, either outputs NO there is no Ham Cycle, or YES, there is one, and HERE IT IS: (then outputs a Ham cycle). (There may be many Ham cycles, this function outputs one of them.) \end{itemize} \begin{enumerate} \item Show that $\HAMPATH \le \HAMCYCLE$. \item Is the following problem known to be in P? NP-complete? $\{ (G,a,b) \colon $ $G \hbox{ has a Ham Path that starts at $a$ and ends at $b$ AND }$ $\hbox{ every vertex in $G$ has degree $\le 2$} \}$. \smallskip If you think it is in P then give the algorithm. If you think it is NPC then give a reference (which can be on the web). \item Is the following problem known to be in P? NP-complete? $\{ (G,a,b) \colon $ $G \hbox{ has a Ham Path that starts at $a$ and ends at $b$ AND }$ $\hbox{ every vertex in $G$ has degree $\le 3$} \}$. \smallskip If you think it is in P then give the algorithm. If you think it is NPC then give a reference (which can be on the web). \end{enumerate} \newpage \item (20 points) (You are encouraged to go to the web for this one) Recall that in class we showed that (or will show that, depending on when I do it) FACTORING is probably NOT NP-complete. So are there ANY problems whose inputs are natural numbers that are NP-complete? FIND ONE on the web and state it. \end{enumerate} \end{document}