summaryrefslogtreecommitdiffstats
path: root/figs
diff options
context:
space:
mode:
authorDavid A. Madore <david+git@madore.org>2017-01-27 18:36:19 +0100
committerDavid A. Madore <david+git@madore.org>2017-01-27 18:36:19 +0100
commit16db49ec807cca5e201243d35b16eed028d03ae8 (patch)
tree838f7478ab7532e5065d9d08d48bc76b6ae1a494 /figs
parent64deabcf51fe764a0787d200512a0e5c59c68140 (diff)
downloadinf105-16db49ec807cca5e201243d35b16eed028d03ae8.tar.gz
inf105-16db49ec807cca5e201243d35b16eed028d03ae8.tar.bz2
inf105-16db49ec807cca5e201243d35b16eed028d03ae8.zip
An exercise on finite automata.
Diffstat (limited to 'figs')
-rw-r--r--figs/ex3p1.dot38
-rw-r--r--figs/ex3p1b.dot19
-rw-r--r--figs/ex3p1c.dot13
3 files changed, 70 insertions, 0 deletions
diff --git a/figs/ex3p1.dot b/figs/ex3p1.dot
new file mode 100644
index 0000000..2246f6f
--- /dev/null
+++ b/figs/ex3p1.dot
@@ -0,0 +1,38 @@
+digraph ex3p1 {
+ 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",label="11"];
+ q12 [style="state",label="12"];
+ q13 [style="state,final",label="13"];
+ 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="a"];
+ q8 -> q9 [label="e",texlbl="{}"];
+ q9 -> q10 [label="e",texlbl="{}"];
+ q10 -> q11 [label="a"];
+ q11 -> q12 [label="e",texlbl="{}"];
+ q11 -> q10 [label="e",texlbl="{}"];
+ q9 -> q12 [label="e",texlbl="{}"];
+ q12 -> q13 [label="e",texlbl="{}"];
+ q12 -> q5 [label="e",texlbl="{}"];
+ q4 -> q13 [label="e",texlbl="{}"];
+}
diff --git a/figs/ex3p1b.dot b/figs/ex3p1b.dot
new file mode 100644
index 0000000..cce02d8
--- /dev/null
+++ b/figs/ex3p1b.dot
@@ -0,0 +1,19 @@
+digraph ex3p1b {
+ rankdir="LR";
+ node [texmode="math",shape="circle",style="state"];
+ q0 [style="state,initial,final,accepting below",label="0"];
+ q2 [style="state,final",label="2"];
+ q6 [style="state",label="6"];
+ q8 [style="state,final,accepting above",label="8"];
+ q11 [style="state,final,accepting below",label="11"];
+ edge [texmode="math",lblstyle="auto"];
+ q0 -> q2 [label="a"];
+ q2 -> q2 [label="a",topath="loop above"];
+ q2 -> q6 [label="b"];
+ q0 -> q6 [label="b",lblstyle="auto,below"];
+ q6 -> q8 [label="a"];
+ q8 -> q11 [label="a"];
+ q11 -> q11 [label="a",topath="loop above"];
+ q8 -> q6 [label="b",lblstyle="auto,near start"];
+ q11 -> q6 [label="b",lblstyle="auto,near start"];
+}
diff --git a/figs/ex3p1c.dot b/figs/ex3p1c.dot
new file mode 100644
index 0000000..c86eee0
--- /dev/null
+++ b/figs/ex3p1c.dot
@@ -0,0 +1,13 @@
+digraph ex3p1c {
+ rankdir="LR";
+ node [texmode="math",shape="circle",style="state"];
+ qF [style="state,initial,final,accepting below",label="F"];
+ q6 [style="state",label="6"];
+ qbot [style="state",label="X",texlbl="$\bot$"];
+ edge [texmode="math",lblstyle="auto"];
+ qF -> q6 [label="b"];
+ qF -> qF [label="a",topath="loop above"];
+ q6 -> qF [label="a"];
+ q6 -> qbot [label="b"];
+ qbot -> qbot [label="a,b",topath="loop above"];
+}