summaryrefslogtreecommitdiffstats
path: root/figs
diff options
context:
space:
mode:
authorDavid A. Madore <david+git@madore.org>2017-03-17 17:19:37 +0100
committerDavid A. Madore <david+git@madore.org>2017-03-17 17:19:37 +0100
commit166e82b6033703f922d08911ff8e0da09ffd18fd (patch)
tree6d34b880427aa8e293089bcd192f2d38170a39c7 /figs
parentfd3971899dbc94325b09162e18e933568f4da719 (diff)
downloadinf105-166e82b6033703f922d08911ff8e0da09ffd18fd.tar.gz
inf105-166e82b6033703f922d08911ff8e0da09ffd18fd.tar.bz2
inf105-166e82b6033703f922d08911ff8e0da09ffd18fd.zip
Recovery exam: an exercise on finite automata.
Diffstat (limited to 'figs')
-rw-r--r--figs/cn2p1.dot33
-rw-r--r--figs/cn2p1b.dot17
-rw-r--r--figs/cn2p1c.dot7
3 files changed, 57 insertions, 0 deletions
diff --git a/figs/cn2p1.dot b/figs/cn2p1.dot
new file mode 100644
index 0000000..fd3c57e
--- /dev/null
+++ b/figs/cn2p1.dot
@@ -0,0 +1,33 @@
+digraph cn2p1 {
+ rankdir="LR";
+ node [texmode="math",shape="circle",style="state"];
+ q0 [style="state,initial",label="0"];
+ q1 [style="state",label="1"];
+ q2 [style="state",label="2"];
+ q3 [style="state",label="3"];
+ q4 [style="state",label="4"];
+ q5 [style="state",label="5"];
+ q6 [style="state",label="6"];
+ q7 [style="state",label="7"];
+ q8 [style="state",label="8"];
+ q9 [style="state",label="9"];
+ q10 [style="state",label="10"];
+ q11 [style="state,final",label="11"];
+ edge [texmode="math",lblstyle="auto"];
+ q0 -> q1 [label="e",texlbl="{}"];
+ q1 -> q2 [label="a"];
+ q2 -> q3 [label="e",texlbl="{}"];
+ q2 -> q1 [label="e",texlbl="{}"];
+ q0 -> q3 [label="e",texlbl="{}"];
+ q3 -> q4 [label="e",texlbl="{}"];
+ q4 -> q5 [label="e",texlbl="{}"];
+ q5 -> q6 [label="b"];
+ q6 -> q7 [label="e",texlbl="{}"];
+ q7 -> q8 [label="e",texlbl="{}"];
+ q8 -> q9 [label="a"];
+ q9 -> q10 [label="e",texlbl="{}"];
+ q10 -> q11 [label="e",texlbl="{}"];
+ q7 -> q10 [label="e",texlbl="{}"];
+ q10 -> q5 [label="e",texlbl="{}"];
+ q4 -> q11 [label="e",texlbl="{}"];
+}
diff --git a/figs/cn2p1b.dot b/figs/cn2p1b.dot
new file mode 100644
index 0000000..6600dfb
--- /dev/null
+++ b/figs/cn2p1b.dot
@@ -0,0 +1,17 @@
+digraph cn2p1b {
+ rankdir="LR";
+ node [texmode="math",shape="circle",style="state"];
+ q0 [style="state,initial,final,accepting below",label="0"];
+ q2 [style="state,final,accepting below",label="2"];
+ q6 [style="state,final,accepting below",label="6"];
+ q9 [style="state,final",label="9"];
+ edge [texmode="math",lblstyle="auto"];
+ q0 -> q2 [label="a"];
+ q2 -> q6 [label="b"];
+ q2 -> q2 [label="a",topath="loop above"];
+ q0 -> q6 [label="b"];
+ q6 -> q9 [label="a"];
+ q6 -> q6 [label="b",topath="loop above"];
+ q9 -> q6 [label="b"];
+ q9 -> q9 [label="a",topath="loop above"];
+}
diff --git a/figs/cn2p1c.dot b/figs/cn2p1c.dot
new file mode 100644
index 0000000..5e5a3e4
--- /dev/null
+++ b/figs/cn2p1c.dot
@@ -0,0 +1,7 @@
+digraph cn2p1c {
+ rankdir="LR";
+ node [texmode="math",shape="circle",style="state"];
+ q0 [style="state,initial,final",label="\top"];
+ edge [texmode="math",lblstyle="auto"];
+ q0 -> q0 [label="a,b",topath="loop above"];
+}