\documentclass[12pt,ifthen]{article} \usepackage{url} \usepackage{comment} \newif{\ifshowsoln} % \showsolntrue \newcommand{\und}{\_\_\_\_\_\_\_\_\_} \renewcommand{\P}{{\rm P}} \newcommand{\NP}{{\rm NP}} \newcommand{\VC}{{\rm VC}} \newcommand{\DS}{{\rm DS}} \newcommand{\FVC}{\rm FVC} \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 10 CMSC 452} \centerline{\bf Morally Due TUES April 15 11:00AM} \centerline{\bf Dead-Cat Due THU April 17 11:00AM} \begin{enumerate} \item (50 points) { \it Def} Let $G=(V,E)$ be a graph. A {\it vertex cover for $G$ of size $k$} is a set $U\subseteq V$ such that \begin{itemize} \item $|U|=k$, and \item For every $(a,b)\in E$ either $a\in U$ or $b\in U$ (or both). \end{itemize} \smallskip $\VC = \{ (G,k) \colon \hbox{$G$ has a Vertex Cover of size $\le k$} \}.$ \smallskip It is known that $\VC$ is NP-complete. \begin{enumerate} \item (10 points) Give a connected graph $G$ on 1000 vertices that has a vertex cover of size 1. \item (10 points) Give a connected graph $G$ on 1000 vertices so that the smallest vertex cover for it has size 999. \item (10 points) Give a connected graph $G$ on 1000 vertices so that the following are true. \begin{itemize} \item $G$ has a vertex cover of size 500. \item $G$ does not have a vertex cover of size 499. \end{itemize} \item (20 points) Let $\VC_{1000} = \{ G \colon \hbox{$G$ has a Vertex Cover of size $1000$} \}.$ Show that $\VC_{1000}\in\P$. \item (0 points) Think about: Your algorithm in Part d ran in time $O(n^d)$ for some $d$. Do you think there is an algorithm with a substantially lower value of $d$? \item (0 points) Think about but do not hand in: Consider the greedy algorithm to find a Vertex Cover: Remove the vertex of highest degree put it in set $X$. When you remove the vertex also remove the edges attached to it (obviously). Repeat: remove the vertex of highest degree put it in set $X$. Keep doing this until the graph no longer has any edges. $X$ is a vertex cover. Find a graph where this algorithm DOES NOT give the min sized vertex cover. \end{enumerate} \newpage \item (50 points) { \it Def} Let $G=(V,E)$ be a graph. A {\it dominating set for $G$ of size $k$} is a set $D\subseteq V$ such that \begin{itemize} \item $|D|=k$, and \item For every $v\in V$ either $v\in D$ or some neighbor of $v$ is in $D$. \end{itemize} \smallskip $\DS = \{ (G,k) \colon \hbox{$G$ has a Dominating Set of size $k$} \}.$ \smallskip It is known that $\DS$ is NP-complete. \begin{enumerate} \item (10 points) Give a connected graph $G$ on 1000 vertices that has a dom set of size 1. \item (10 points) Give a graph $G$ on 1000 vertices so that the smallest dom set for it has size 1000. (Hint: It will NOT be connected.) \item (10 points) Give a graph $G$ on 1000 vertices so that the following are true. \begin{itemize} \item $G$ has a dom set of size 500. \item $G$ does not have a dom set of size 499. \end{itemize} (Hint: It will NOT be connected.) \item (20 points) Let $\DS_{1000} = \{ G \colon \hbox{$G$ has a Dominating Set of size $1000$} \}.$ Show that $\DS_{1000}\in\P$. \item (0 points) Think about: Your algorithm in Part d ran in time $O(n^d)$ for some $d$. Do you think there is an algorithm with a substantially lower value of $d$? \item (0 points) Think about but do not hand in: Consider the greedy algorithm to find a Dom Set: Remove the vertex of highest degree put it in set $X$. When you remove the vertex also remove the edges attached to it (obviously) AND the vertices on those edges. Repeat: remove the vertex of highest degree put it in set $X$. Keep doing this until the graph no longer has any edges. $X$ is a dom set. Find a graph where this algorithm DOES NOT give the min sized dom set. \end{enumerate} \end{enumerate} \end{document}