tex/theory1_ex9.tex
author Eugen Sawin <sawine@me73.com>
Mon, 18 Jul 2011 20:17:25 +0200
changeset 13 becb48258245
child 14 11c55592ac33
permissions -rw-r--r--
First part of ex 9.
     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 \title{Theory I, Sheet 9 Solution}
    12 \author{Eugen Sawin}
    13 \renewcommand{\familydefault}{\sfdefault}
    14 \newcommand{\Pos}{\mathcal{P}os}
    15 \newcommand{\E}{\mathcal{E}}
    16 \newcommand{\D}{\mathcal{D}}
    17 \newcommand{\J}{\mathcal{J}}
    18 \include{pythonlisting}
    19 
    20 \pagestyle{empty}
    21 \begin{document}
    22 \maketitle
    23 
    24 \section*{Exercise 9.1.3}
    25 \begin{align*}
    26 ADT_{bool} = &(\Sigma_{bool}, \E)\\
    27 \Sigma_{bool} = &\{true^{(0)}, false^{(0)}, not^{(1)}, and^{(2)}, or^{(2)}\}\\
    28 \E = &\{true \approx not(false),\\
    29 & false \approx not(true),\\
    30 & not(not(x)) \approx x\\
    31 & and(x, y) \approx not(or(not(x), not(y))),\\
    32 & or(x, y) \approx not(and(not(x), not(y)))\}\\
    33 \end{align*}
    34 
    35 \section*{Exercise 9.1.4}
    36 \begin{align*}
    37 \D_{bool} &= (M, \J)\\
    38 M &= \{0, 1\}\\
    39 \J(true) &= 1\\
    40 \J(false) &= 0\\
    41 \J(not)(x) &= 1 - x\\
    42 \J(and)(x, y) &= min(x, y)\\
    43 \J(or)(x, y) &= max(x, y)\\
    44 \end{align*}
    45 
    46 \end{document}