# HG changeset patch # User Eugen Sawin # Date 1311013045 -7200 # Node ID becb48258245290aae6e63f83339fbd4f731f15b # Parent 847768226d252ad06a9daa1bf0e20d10ba30b5e6 First part of ex 9. diff -r 847768226d25 -r becb48258245 tex/theory1_ex9.tex --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tex/theory1_ex9.tex Mon Jul 18 20:17:25 2011 +0200 @@ -0,0 +1,46 @@ +\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} +\title{Theory I, Sheet 9 Solution} +\author{Eugen Sawin} +\renewcommand{\familydefault}{\sfdefault} +\newcommand{\Pos}{\mathcal{P}os} +\newcommand{\E}{\mathcal{E}} +\newcommand{\D}{\mathcal{D}} +\newcommand{\J}{\mathcal{J}} +\include{pythonlisting} + +\pagestyle{empty} +\begin{document} +\maketitle + +\section*{Exercise 9.1.3} +\begin{align*} +ADT_{bool} = &(\Sigma_{bool}, \E)\\ +\Sigma_{bool} = &\{true^{(0)}, false^{(0)}, not^{(1)}, and^{(2)}, or^{(2)}\}\\ +\E = &\{true \approx not(false),\\ +& false \approx not(true),\\ +& not(not(x)) \approx x\\ +& and(x, y) \approx not(or(not(x), not(y))),\\ +& or(x, y) \approx not(and(not(x), not(y)))\}\\ +\end{align*} + +\section*{Exercise 9.1.4} +\begin{align*} +\D_{bool} &= (M, \J)\\ +M &= \{0, 1\}\\ +\J(true) &= 1\\ +\J(false) &= 0\\ +\J(not)(x) &= 1 - x\\ +\J(and)(x, y) &= min(x, y)\\ +\J(or)(x, y) &= max(x, y)\\ +\end{align*} + +\end{document}