
diff -r c4cbf19866b3 -r 9f72ba296485 exercises/solutions/sol05.tex
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/exercises/solutions/sol05.tex	Sat Jun 09 23:45:57 2012 +0200
@@ -0,0 +1,85 @@
+\documentclass[a4paper, 10pt, pagesize, smallheadings]{article}
+\usepackage{graphicx}
+%\usepackage[latin1]{inputenc}
+\usepackage{amsmath, amsthm, amssymb}
+\usepackage{typearea}
+\usepackage{algorithm}
+\usepackage{algorithmic}
+\usepackage{fullpage}
+\usepackage{mathtools}
+\usepackage[all]{xy}
+\usepackage{tikz}
+\usepackage{tikz-qtree}
+\usetikzlibrary{decorations.pathmorphing} % noisy shapes
+\usetikzlibrary{fit}					% fitting shapes to coordinates
+\usetikzlibrary{backgrounds}	% drawin
+\usetikzlibrary{shapes,snakes}
+\addtolength{\voffset}{-20pt}
+\title{CSP Exercise 05 Solution}
+\author{Eugen Sawin}
+\renewcommand{\familydefault}{\sfdefault}
+\newcommand{\R}{\mathcal{R}}
+\newcommand{\N}{\mathbb{N}}
+\newcommand{\C}{\mathcal{C}}
+\newcommand{\bo}{\mathcal{O}}
+
+%\include{pythonlisting}
+
+\pagestyle{empty}
+\begin{document}
+\maketitle
+%
+\section*{Exercise 5.1}
+(a) The following table shows the states during the iterations.\\\\
+\begin{tabular}{r l l l}
+Iteration & Queue & Revise & Domains\\\hline
+      $0$ & $\{(v_1,v_2),(v_2,v_1),
+               (v_2,v_3),(v_3,v_2),
+               (v_1,v_3),(v_3,v_1)\}$
+          & $$ 
+          & $(\{1,2,3,4,5\},
+              \{1,2,3,4,5\},
+              \{1,2,3,4,5\})$\\
+      $1$ & $\{(v_1,v_2),(v_2,v_1),
+               (v_2,v_3),(v_3,v_2),
+               (v_1,v_3)\}$
+          & $(v_3,v_1)$
+          & $(\{1,2,3,4,5\},
+              \{1,2,3,4,5\},
+              \{1,2,3,4,5\})$\\
+      $2$ & $\{(v_1,v_2),(v_2,v_1),
+               (v_2,v_3),(v_3,v_2)
+               \}$
+          & $(v_1,v_3)$
+          & $(\{1,2,3,4,5\},
+              \{1,2,3,4,5\},
+              \{1,2,3,4,5\})$\\
+      $3$ & $\{(v_1,v_2),(v_2,v_1),
+            (v_2,v_3)\}\cup\{(v_1,v_3)\}$
+          & $(v_3,v_2)$
+          & $(\{1,2,3,4,5\},
+              \{1,2,3,4,5\},
+              \{1,2\})$\\
+      $4$ & $\{(v_1,v_2),(v_2,v_1),
+            (v_2,v_3)\}\cup\{\}$
+          & $(v_1,v_3)$
+          & $(\{1,2\},
+              \{1,2,3,4,5\},
+              \{1,2\})$\\
+      $5$ & $\{(v_1,v_2),(v_2,v_1)\}$
+          & $(v_2,v_3)$
+          & $(\{1,2\},
+              \{1,2\},
+              \{1,2\})$\\
+      $6$ & $\{(v_1,v_2)\}$
+          & $(v_2,v_1)$
+          & $(\{1,2\},
+              \{1,2\},
+              \{1,2\})$\\
+      $7$ & $\{\}$
+          & $(v_1,v_2)$
+          & $(\{1,2\},
+              \{1,2\},
+              \{1,2\})$\\
+\end{tabular}
+\end{document}




