exercises/solutions/sol02.tex
changeset 7 77de69aef70e
parent 6 536889e989c3
     1.1 --- a/exercises/solutions/sol02.tex	Wed May 09 04:07:59 2012 +0200
     1.2 +++ b/exercises/solutions/sol02.tex	Wed May 09 15:13:41 2012 +0200
     1.3 @@ -57,10 +57,14 @@
     1.4    \item $E_2 = \{\{v_i,v_j\} \mid \{v_i,v_j\} \notin E\}$
     1.5    \item $k_2 = |V| - k$
     1.6  \end{itemize}
     1.7 +If there is a vertex cover $V_2'$ of size $\leq k_2$, i.e. $\forall{e \in E}: \exists{v \in V_2'}: v \in e$ then it follows that there must be a clique of at least size $|V|-k_2$ in the complementary graph and vice versa, because for each disconnected vertex pair in one graph, there is a connected pair in the other.\\
     1.8 +The construction takes linear time, hence it follows that $VertexCover \in NP$-$complete$. \qed\\\\
     1.9  (b) $Dominating Set \in NP$ because by guessing the vertex set $V'$, we can iterate over all $v \in V$ and check if $v \in V'$ or $\exists{v' \in V}: \{v,v'\} \in E$ holds in polynomial time.\\
    1.10  We show $Vertex Cover \le_P DominatingSet$. Given an undirected graph $G = \langle V, E \rangle$ and $k \in N$ we build a graph $G_2 = \langle V_2, E_2 \rangle$ so that there is a vertex cover $V' \subseteq V$ with $|V'| \leq k$ iff there is a dominating set $V_2' \subseteq V_2$ with $|V_2| \leq k$ given following construction:
    1.11  \begin{itemize}
    1.12    \item $V_2 = V \cup \{v_e \mid e \in E\}$
    1.13    \item $E_2 = E \cup \{\{v,v_e\} \mid v,v_e \in V_2$ and $e \in E\}$
    1.14  \end{itemize}
    1.15 +By introducing the additional nodes for all vertices in $G$, we make sure that the dominating set $V_2'$, by covering all vertices in $G_2$, implicitely covers all edges in $G$. The other direction follows analogously, if a vertex cover $V'$ covers all edges in $G$ it follows that the same set covers all vertices in $G_2$.\\
    1.16 +The construction takes linear time, hence it follows that $DominatingSet \in NP$-$complete$. \qed
    1.17  \end{document}