aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCamil Staps2015-08-30 21:47:43 +0200
committerCamil Staps2015-08-30 21:47:43 +0200
commit27914510eb1cad054e54578d301e51a3e85e670e (patch)
treef7651bd9b090879d2dd51aa87805e72bc577e85b
parentInitial commit (diff)
Ex 9.1 start
-rw-r--r--ex9-1.tex13
-rw-r--r--exercises.tex39
2 files changed, 52 insertions, 0 deletions
diff --git a/ex9-1.tex b/ex9-1.tex
new file mode 100644
index 0000000..c416fdb
--- /dev/null
+++ b/ex9-1.tex
@@ -0,0 +1,13 @@
+\begin{solution}{1}
+ \begin{enumerate}
+ \item \begin{align*}
+ & q_0BaabcaB \\\vdash& Bq_1aabcaB \\\vdash& Baq_1abcaB \\\vdash& Baaq_1bcaB \\\vdash& Baacq_1caB \\\vdash& Baaccq_1aB \\\vdash& Baaccaq_1B \\\vdash& Baaccq_2aB \\\vdash& Baacq_2ccB \\\vdash& Baaq_2cbcB \\\vdash& Baq_2abbcB \\\vdash& Bq_2acbbcB \\\vdash& q_2BccbbcB.
+ \end{align*}
+ \item \begin{align*}
+ & q_0BbcbcB \\\vdash& Bq_1bcbcB \\\vdash& Bcq_1cbcB \\\vdash& Bccq_1bcB \\\vdash& Bcccq_1cB \\\vdash& Bccccq_1B \\\vdash& Bcccq_2cB \\\vdash& Bccq_2cbB \\\vdash& Bcq_2cbbB \\\vdash& Bq_2cbbbB \\\vdash& q_2BbbbbB.
+ \end{align*}
+ \item Todo %todo
+ \item All $b$s in the input string are replaced by $c$s. All $c$s are replace by $b$s. All $b$s are left intact. The machine terminates in a normal fashion with the tape head on position $0$.
+ \end{enumerate}
+\end{solution}
+
diff --git a/exercises.tex b/exercises.tex
new file mode 100644
index 0000000..ce25ccd
--- /dev/null
+++ b/exercises.tex
@@ -0,0 +1,39 @@
+\documentclass[10pt,a4paper,twocolumn]{article}
+
+\usepackage[margin=2cm]{geometry}
+\usepackage{fourier}
+
+\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}
+
+\usepackage{amsmath}
+
+% Solution environment
+\newenvironment{solution}[1]{\medskip\noindent{\textbf{Exercise \thesection.#1}\rm\par}{\medskip}}
+
+\parindent0pt
+
+\title{Solutions to selected exercises from Thomas Sudkamp, \textit{Languages and Machines} (second edition)}
+\author{Camil Staps}
+
+\begin{document}
+
+\maketitle
+
+\setcounter{section}{8}
+\section{Turing machines}
+\input{ex9-1.tex}
+
+\end{document}
+