aboutsummaryrefslogtreecommitdiff
path: root/ex9-1.tex
diff options
context:
space:
mode:
authorCamil Staps2015-08-31 13:08:36 +0200
committerCamil Staps2015-08-31 13:08:36 +0200
commit62f414468abf4e2112ab0836038797ca40338b0d (patch)
treecca5ce1f9472805306963ff447a28a86e987f06b /ex9-1.tex
parentEx 9.1 start (diff)
Ex 9.1 / 9.2
Diffstat (limited to 'ex9-1.tex')
-rw-r--r--ex9-1.tex23
1 files changed, 19 insertions, 4 deletions
diff --git a/ex9-1.tex b/ex9-1.tex
index c416fdb..c06f4f0 100644
--- a/ex9-1.tex
+++ b/ex9-1.tex
@@ -1,13 +1,28 @@
\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.
+ & 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.
+ & 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$.
+ \item See figure \ref{fig:9.1c}.
+
+ \begin{figure*}[t]
+ \centering
+ \begin{tikzpicture}[->, node distance=2cm]
+ \node[state,initial] (q0) {$q_0$};
+ \node[state] (q1) [right=of q0] {$q_1$};
+ \node[state] (q2) [right=of q1] {$q_2$};
+ \draw (q0) -- node[above] {$B/B,R$} ++ (q1);
+ \draw (q1) edge[loop above] node[above,align=left] {$c/c,R$\\$b/c,R$\\$a/a,R$} (q1);
+ \draw (q1) -- node[above] {$B/B,L$} ++ (q2);
+ \draw (q2) edge[loop above] node[above,align=left] {$c/b,L$\\$a/c,L$} (q2);
+ \end{tikzpicture}
+ \caption{The state machine of exercise 9.1c.}
+ \label{fig:9.1c}
+ \end{figure*}
+ \item All $a$s in the input string are replaced by $c$s. All $c$s are replaced 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}