From 881e7a215b63584d0bfc02c4e378692c9bb1d0e1 Mon Sep 17 00:00:00 2001
From: Camil Staps
Date: Mon, 31 Aug 2015 13:37:51 +0200
Subject: Ex 9.4

---
 ex9-4.tex | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 ex9-4.tex

(limited to 'ex9-4.tex')

diff --git a/ex9-4.tex b/ex9-4.tex
new file mode 100644
index 0000000..6c33eef
--- /dev/null
+++ b/ex9-4.tex
@@ -0,0 +1,29 @@
+\begin{solution}{4}
+    See figure \ref{fig:9.4}.
+
+    \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$};
+            \node[state] (q3) [right=of q2] {$q_3$};
+            \node[state] (q4) [right=of q3] {$q_4$};
+            \node[state] (q5) [right=of q4] {$q_5$};
+            \draw (q0) -- node[above] {$B/B,R$} ++ (q1);
+            \draw (q1) -- node[above] {$a/a,R$} ++ (q2);
+            \draw (q2) -- node[above] {$a/a,R$} ++ (q3);
+            \draw (q3) -- node[above] {$a/a,R$} ++ (q4);
+            \draw (q4) -- node[above] {$c/c,L$} ++ (q5);
+            \draw (q1) edge[loop above] node[above,align=left] {$B/B,R$\\$b/b,R$\\$c/c,R$} (q1);
+            \draw (q2) edge[bend left] node[below,align=left] {$B/B,R$\\$b/b,R$\\$c/c,R$} (q1);
+            \draw (q3) edge[bend right] node[above,align=left] {$B/B,R$\\$b/b,R$\\$c/c,R$} (q1);
+            \draw (q4) edge[bend left] node[below,align=left] {$B/B,R$\\$b/b,R$} (q1);
+            \draw (q4) edge[loop above] node[above,align=left] {$a/a,R$} (q4);
+            \draw (q5) edge[loop above] node[above,align=left] {$a/a,L$\\$b/b,L$\\$c/c,L$} (q5);
+        \end{tikzpicture}
+        \caption{The state machine of exercise 9.4.}
+        \label{fig:9.4}
+    \end{figure*}
+\end{solution}
+
-- 
cgit v1.2.3

