aboutsummaryrefslogtreecommitdiff
path: root/exercises.tex
blob: 0b7158421ace0cb14b91aae32eca1522662c92ec (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
\documentclass[10pt,a4paper,twocolumn]{article}

\usepackage[margin=2cm]{geometry}

\PassOptionsToPackage{hyphens}{url}
\usepackage[hidelinks]{hyperref}

\usepackage{enumitem}
\setenumerate[1]{label=\alph*)}

% textcomp package is not available everywhere, and we only need the Copyright symbol
% taken from http://tex.stackexchange.com/a/1677/23992
\DeclareTextCommandDefault{\textregistered}{\textcircled{\check@mathfonts\fontsize\sf@size\z@\math@fontsfalse\selectfont R}}

\usepackage{fancyhdr}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancyhead{}
\fancyfoot[C]{Copyright {\textcopyright} 2015 Camil Staps}
\pagestyle{fancy}

% Solution environment
\newenvironment{solution}[1]{\medskip\noindent{\textbf{Exercise \thesection.#1}\rm\par}{\medskip}}

% Note command
\usepackage[usenames,dvipsnames,svgnames]{xcolor}
\newcommand{\note}[1]{%
    \colorbox{AntiqueWhite}{\parbox[t]{\linewidth}{%
        \vspace{.5\baselineskip}\setlength{\leftskip}{.5\baselineskip}\setlength{\rightskip}{\leftskip}%
        #1\par%
        \vspace{.5\baselineskip}\setlength{\leftskip}{0pt}\setlength{\rightskip}{0pt}%
    }}%
}

\usepackage{minted}
\definecolor{mintedbg}{rgb}{0.9,0.9,0.9}
%Todo write a pygments lexer for Clean

\usepackage{tikz}
\usetikzlibrary{positioning,arrows,automata}

\usepackage{amsmath}

\parindent0pt

\title{Solutions to selected exercises from Thomas Sudkamp, \textit{Languages and Machines} (second edition)}
\author{Camil Staps}

\begin{document}

\maketitle
\thispagestyle{fancy}

\setcounter{section}{8}
\section{Turing machines}

\note{A Clean\footnotemark{} implementation of Turing machines may be found at \url{https://github.com/camilstaps/CleanTuringMachines} for testing purposes.}
\footnotetext{\url{http://clean.cs.ru.nl}}

\input{ex9-1.tex}
\input{ex9-2.tex}
\input{ex9-3.tex}
\input{ex9-4.tex}
\input{ex9-5.tex}
\input{ex9-6.tex}

\end{document}