exercises/solutions/sol05.tex
author Eugen Sawin <sawine@me73.com>
Sat, 09 Jun 2012 23:45:57 +0200
changeset 19 9f72ba296485
child 20 93fd38efa60f
permissions -rw-r--r--
Added first version of sol05.
     1 \documentclass[a4paper, 10pt, pagesize, smallheadings]{article}
     2 \usepackage{graphicx}
     3 %\usepackage[latin1]{inputenc}
     4 \usepackage{amsmath, amsthm, amssymb}
     5 \usepackage{typearea}
     6 \usepackage{algorithm}
     7 \usepackage{algorithmic}
     8 \usepackage{fullpage}
     9 \usepackage{mathtools}
    10 \usepackage[all]{xy}
    11 \usepackage{tikz}
    12 \usepackage{tikz-qtree}
    13 \usetikzlibrary{decorations.pathmorphing} % noisy shapes
    14 \usetikzlibrary{fit}					% fitting shapes to coordinates
    15 \usetikzlibrary{backgrounds}	% drawin
    16 \usetikzlibrary{shapes,snakes}
    17 \addtolength{\voffset}{-20pt}
    18 \title{CSP Exercise 05 Solution}
    19 \author{Eugen Sawin}
    20 \renewcommand{\familydefault}{\sfdefault}
    21 \newcommand{\R}{\mathcal{R}}
    22 \newcommand{\N}{\mathbb{N}}
    23 \newcommand{\C}{\mathcal{C}}
    24 \newcommand{\bo}{\mathcal{O}}
    25 
    26 %\include{pythonlisting}
    27 
    28 \pagestyle{empty}
    29 \begin{document}
    30 \maketitle
    31 %
    32 \section*{Exercise 5.1}
    33 (a) The following table shows the states during the iterations.\\\\
    34 \begin{tabular}{r l l l}
    35 Iteration & Queue & Revise & Domains\\\hline
    36       $0$ & $\{(v_1,v_2),(v_2,v_1),
    37                (v_2,v_3),(v_3,v_2),
    38                (v_1,v_3),(v_3,v_1)\}$
    39           & $$ 
    40           & $(\{1,2,3,4,5\},
    41               \{1,2,3,4,5\},
    42               \{1,2,3,4,5\})$\\
    43       $1$ & $\{(v_1,v_2),(v_2,v_1),
    44                (v_2,v_3),(v_3,v_2),
    45                (v_1,v_3)\}$
    46           & $(v_3,v_1)$
    47           & $(\{1,2,3,4,5\},
    48               \{1,2,3,4,5\},
    49               \{1,2,3,4,5\})$\\
    50       $2$ & $\{(v_1,v_2),(v_2,v_1),
    51                (v_2,v_3),(v_3,v_2)
    52                \}$
    53           & $(v_1,v_3)$
    54           & $(\{1,2,3,4,5\},
    55               \{1,2,3,4,5\},
    56               \{1,2,3,4,5\})$\\
    57       $3$ & $\{(v_1,v_2),(v_2,v_1),
    58             (v_2,v_3)\}\cup\{(v_1,v_3)\}$
    59           & $(v_3,v_2)$
    60           & $(\{1,2,3,4,5\},
    61               \{1,2,3,4,5\},
    62               \{1,2\})$\\
    63       $4$ & $\{(v_1,v_2),(v_2,v_1),
    64             (v_2,v_3)\}\cup\{\}$
    65           & $(v_1,v_3)$
    66           & $(\{1,2\},
    67               \{1,2,3,4,5\},
    68               \{1,2\})$\\
    69       $5$ & $\{(v_1,v_2),(v_2,v_1)\}$
    70           & $(v_2,v_3)$
    71           & $(\{1,2\},
    72               \{1,2\},
    73               \{1,2\})$\\
    74       $6$ & $\{(v_1,v_2)\}$
    75           & $(v_2,v_1)$
    76           & $(\{1,2\},
    77               \{1,2\},
    78               \{1,2\})$\\
    79       $7$ & $\{\}$
    80           & $(v_1,v_2)$
    81           & $(\{1,2\},
    82               \{1,2\},
    83               \{1,2\})$\\
    84 \end{tabular}
    85 \end{document}