\documentclass[11pt]{article}
\usepackage{handout}
\usepackage{graphicx}
\input{mymargins}
\begin{document}
\handout{11}{3}{Homework Assignment 2 \\
Due February 12 2013 at 3:30pm\\
Total points: 85
}
The answers to the homework assignment should be your own individual work. Please hand in a hard copy of your solutions in class on the due date.
\noindent
\begin{enumerate}
\item (15 points, 5 points each) A solution to a \textbf{graph coloring} problem is an assignment of colors to vertices such that no two adjacent vertices have the same color. Formally, a finite graph $G = \langle V, E\rangle$ consists of vertices $V = \{v_1 , \cdots , v_n \}$ and edges $E = \{ \langle v_{i1} , w_{i1}\rangle , \cdots , \langle v_{ik} , w_{ik}\rangle \}$. The finite set of colors is given by $C = \{c_1 , \cdots , c_m \}$. A problem instance is given by a graph and a set of colors: the problem is to assign each vertex $v \in V$ a color$(v) \in C$ such that for every edge $\langle v, w\rangle \in E$, color$(v) \neq $ color$(w)$. Clearly, not all instances have solutions.
Show how to encode an instance of a graph coloring problem into a PL formula $F$. $F$ should be satisfiable iff a graph coloring exists.
(a) Describe a set of constraints in PL asserting that every vertex is colored. Since the sets of vertices, edges, and colors are all finite, use notation such as ``color$(v) = c$'' to indicate that vertex $v$ has color $c$. Realize that such can assertion is encodeable as a single propositional variable $P_{v}^{c}$.\\
(b) Describe a set of constraints in PL asserting that every vertex has at most one color.\\
(c) Describe a set of constraints in PL asserting that no two connected vertices have the same color.
\item (15 points) Describe the execution of the basic version of the DPLL algorithm (as covered in slide
36 of Lecture 2) on the following formula.
\[(p \vee q \vee r) \wedge (\neg p \vee \neg q \vee \neg r) \wedge (\neg p \vee q \vee r) \wedge
(\neg q \vee r) \wedge (q \vee \neg r)\]
\item (20 points) Consider the following set of clauses:
\[
\begin{array}{cc}
c_1: & (x_5 \lor \neg x_1 \lor x_3) \\
c_2: & (\neg x_1 \lor \neg x_5) \\
c_3: & (\neg x_3 \lor \neg x_4) \\
c_4: & (x_1 \lor x_4) \\
c_5: & (x_1 \lor \neg x_4) \\
c_6: & (\neg x_1 \lor x_5) \\
\end{array}
\]
Show how a DPLL-based modern SAT solver decides the satisfiability of these clauses as we discussed in Lecture 3 on
modern SAT solvers.
For choosing the next assignment in the Decide step, use the dynamic largest individual sum (DLIS) heuristic, and in the case of a tie, favor variable $x_i$ with the lowest index $i$. If there is a tie between $x_i$ and $\neg x_i$, pick $x_i$. For deriving conflict clauses, use the latter strategy we discussed in class using first unique implication points, and backtrack to the second highest decision level in the derived conflict clause. Show the implication graph at each decision level, and keep all conflict clauses derived in AnalyzeConflict.
\item (15 points) Show how to construct the BDD for the formula
\[
\neg (x_1 \lor (x_2 \land \neg x_3))
\]
using variable order $x_1, x_2, x_3$, and starting with an ordered binary decision tree.
\item (20 points) Consider the BDDs for formulas $\phi_1$ and $\phi_2$ shown below:
\vspace{0.2in}
\begin{center}
\includegraphics[scale=0.25]{bdd1.pdf}
\end{center}
\begin{enumerate}
\item (3 points) Show the BDD for $\neg \phi_1$.
\item (3 points) Show the BDD for $\neg \phi_1 \downarrow x_1$
\item (3 points) Show the BDD for $\neg \phi_1 \downarrow \neg x_1$
\item (11 points) Show how to construct the BDD for $\neg \phi_1 \land \phi_2 $ using the Apply procedure and using
your BDDs from parts (a)-(c). Use the variable order $x_1 < x_2$. Your solution must clearly show the final BDD representing
$\neg \phi_1 \land \phi_2$.
\end{enumerate}
\end{enumerate}
\end{document}