\section{Reductions}

\definition{Independent Sets}
An \textit{independent set} is a set of vertices\footnotemark{} in which no two are connected. $\{B, C, D, E\}$ form an independent set in the following graph:

\footnotetext{\say{Node} and \say{Vertex} are synonyms in graph theory.}


\begin{center}
	\begin{tikzpicture}[
		node distance = 12mm
	]
		% Nodes
		\begin{scope}[layer = nodes]
			\node[main] (A) {$A$};


			% Patterns are transparent.
			% Fill nodes first so paths don't show through
			\node[main, draw = white] (B1) [above left of = A] {$\phantom{B}$};
			\node[main, draw = white] (C1) [below left of = A] {$\phantom{C}$};
			\node[main, draw = white] (D1) [below right of = A] {$\phantom{D}$};
			\node[main, draw = white] (E1) [above right of = A] {$\phantom{E}$};

			\node[main, hatch] (B) [above left of = A] {$B$};
			\node[main, hatch] (C) [below left of = A] {$C$};
			\node[main, hatch] (D) [below right of = A] {$D$};
			\node[main, hatch] (E) [above right of = A] {$E$};
		\end{scope}

		% Edges
		\draw
			(A) edge (B)
			(A) edge (C)
			(A) edge (D)
			(A) edge (E)
		;
	\end{tikzpicture}
\end{center}


\definition{Vertex Covers}
A \textit{vertex cover} is a set of vertices that includes at least one endpoint of each edge. $B$ and $D$ form a vertex cover of the following graph:

\begin{center}
	\begin{tikzpicture}[
		node distance = 12mm
	]
		% Nodes
		\begin{scope}[layer = nodes]
			\node[main] (A) {$A$};

			% Patterns are transparent.
			% Fill nodes first so paths don't show through
			\node[main, draw = white] (B1) [right of = A] {$\phantom{B}$};
			\node[main, hatch] (B) [right of = A] {$B$};
			\node[main, draw = white] (D1) [below of = B] {$\phantom{D}$};
			\node[main, hatch] (D) [below of = B] {$D$};

			\node[main] (C) [right of = B] {$C$};
			\node[main] (E) [right of = D] {$E$};
		\end{scope}

		% Edges
		\draw
			(A) edge (B)
			(B) edge (C)
			(B) edge (D)
			(D) edge (E)
		;

		% Flow
		\draw[path]
			(B) -- (A)
			(B) -- (C)
			(B) -- (D)
			(D) -- (E)
		;
	\end{tikzpicture}
\end{center}

\vfill
\pagebreak

\problem{}<IndepCover>
Let $G$ be a graph with a set of vertices $V$. \\

Show that $S \subset V$ is an independent set iff $(V - S)$ is a vertex cover. \\

\hint{$(V - S)$ is the set of elements in $V$ that are not in $S$.}

\begin{solution}
	Suppose $S$ is an independent set.
	\begin{itemize}
		\item [$\implies$] All edges are in $(V - S)$ or connect $(V - S)$ and $S$.
		\item [$\implies$] $(V - S)$ is a vertex cover.
	\end{itemize}

	\linehack{}

	Suppose $S$ is a vertex cover.
	\begin{itemize}
		\item [$\implies$] There are no edges with both endpoints in $(V - S)$.
		\item [$\implies$] $(V - S)$ is an independent set.
	\end{itemize}
\end{solution}

\vfill

\problem{}
Consider the following two problems:
\begin{itemize}
	\item Given a graph $G$, determine if it has an independent set of size $\geq k$.
	\item Given a graph $G$, determine if it has a vertex cover of size $\leq k$.
\end{itemize}
Show that these are equivalent. In other words, show that an algorithm that solves one can be used to solve the other.

\begin{solution}
	This is a direct consequence of \ref{IndepCover}. You'll need to show that the size constraints are satisfied, but that's fairly easy to do.
\end{solution}

\vfill
\pagebreak