summaryrefslogtreecommitdiffstats
path: root/figs
diff options
context:
space:
mode:
authorDavid A. Madore <david+git@madore.org>2016-11-30 15:31:16 (GMT)
committerDavid A. Madore <david+git@madore.org>2016-11-30 15:31:16 (GMT)
commit89e92ec19feb388823f66885a633351369c5e809 (patch)
tree6646b27c874a8275e94c2a8d54803b7ab92d3d58 /figs
parentda6ff34fb72f5dc7d3d1366d53efe81b31a811bc (diff)
downloadinf105-89e92ec19feb388823f66885a633351369c5e809.zip
inf105-89e92ec19feb388823f66885a633351369c5e809.tar.gz
inf105-89e92ec19feb388823f66885a633351369c5e809.tar.bz2
Exercise on determinizing and minimizing an automaton.
Diffstat (limited to 'figs')
-rw-r--r--figs/ex1p2a.dot23
-rw-r--r--figs/ex1p2b.dot19
-rw-r--r--figs/ex1p2c.dot36
-rw-r--r--figs/ex1p2d.dot17
4 files changed, 95 insertions, 0 deletions
diff --git a/figs/ex1p2a.dot b/figs/ex1p2a.dot
new file mode 100644
index 0000000..41870a1
--- /dev/null
+++ b/figs/ex1p2a.dot
@@ -0,0 +1,23 @@
+digraph ex1p2a {
+ 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,final",label="7"];
+ edge [texmode="math",lblstyle="auto"];
+ q0 -> q0 [label="a,b",topath="loop below"];
+ q0 -> q1 [label="e",texlbl="$\varepsilon$"];
+ q0 -> q4 [label="e",texlbl="$\varepsilon$"];
+ q1 -> q2 [label="a"];
+ q4 -> q5 [label="b"];
+ q2 -> q3 [label="a"];
+ q5 -> q6 [label="b"];
+ q3 -> q7 [label="e",texlbl="$\varepsilon$"];
+ q6 -> q7 [label="e",texlbl="$\varepsilon$"];
+ q7 -> q7 [label="a,b",topath="loop below"];
+}
diff --git a/figs/ex1p2b.dot b/figs/ex1p2b.dot
new file mode 100644
index 0000000..34ed531
--- /dev/null
+++ b/figs/ex1p2b.dot
@@ -0,0 +1,19 @@
+digraph ex1p2b {
+ rankdir="LR";
+ node [texmode="math",shape="circle",style="state"];
+ q0 [style="state,initial",label="0"];
+ q2 [style="state",label="2"];
+ q3 [style="state,final,accepting above",label="3"];
+ q5 [style="state",label="5"];
+ q6 [style="state,final,accepting below",label="6"];
+ q7 [style="state,final",label="7"];
+ edge [texmode="math",lblstyle="auto"];
+ q0 -> q0 [label="a,b",topath="loop below"];
+ q0 -> q2 [label="a"];
+ q0 -> q5 [label="b"];
+ q2 -> q3 [label="a"];
+ q5 -> q6 [label="b"];
+ q3 -> q7 [label="a,b"];
+ q6 -> q7 [label="a,b"];
+ q7 -> q7 [label="a,b",topath="loop below"];
+}
diff --git a/figs/ex1p2c.dot b/figs/ex1p2c.dot
new file mode 100644
index 0000000..84317c1
--- /dev/null
+++ b/figs/ex1p2c.dot
@@ -0,0 +1,36 @@
+digraph ex1p2c {
+ rankdir="LR";
+ node [texmode="math",shape="circle",style="state"];
+ q0 [style="state,initial",label="0"];
+ q05 [style="state",label="05"];
+ q056 [style="state,final,accepting below",label="056"];
+ q02 [style="state",label="02"];
+ q023 [style="state,final,accepting above",label="023"];
+ q057 [style="state,final",label="057"];
+ q0567 [style="state,final,accepting above",label="0567"];
+ q027 [style="state,final",label="027"];
+ q0237 [style="state,final,accepting below",label="0237"];
+ edge [texmode="math",lblstyle="auto"];
+ q0 -> q05 [label="b"];
+ q0 -> q02 [label="a"];
+ q05 -> q02 [label="a"];
+ q02 -> q05 [label="b"];
+ { rank="same"; q05; q02; }
+ q05 -> q056 [label="b"];
+ q02 -> q023 [label="a"];
+ q056 -> q0567 [label="b"];
+ q056 -> q027 [label="a"];
+ q023 -> q0237 [label="a"];
+ q023 -> q057 [label="b"];
+ { rank="same"; q056; q023; }
+ q0567 -> q027 [label="a",lblstyle="auto,below"];
+ q027 -> q057 [label="b"];
+ q057 -> q0237 [label="a"];
+ q0237 -> q057 [label="b"];
+ q057 -> q027 [label="a"];
+ q027 -> q0567 [label="b",lblstyle="auto,above"];
+ { rank="same"; q057; q027; }
+ { rank="same"; q0567; q0237; }
+ q0237 -> q0237 [label="a",topath="loop above"];
+ q0567 -> q0567 [label="b",topath="loop below"];
+}
diff --git a/figs/ex1p2d.dot b/figs/ex1p2d.dot
new file mode 100644
index 0000000..7dd540c
--- /dev/null
+++ b/figs/ex1p2d.dot
@@ -0,0 +1,17 @@
+digraph ex1p2d {
+ rankdir="LR";
+ node [texmode="math",shape="circle",style="state"];
+ q0 [style="state,initial",label="0"];
+ q05 [style="state",label="05"];
+ q02 [style="state",label="02"];
+ qA [style="state,final",label="A"];
+ edge [texmode="math",lblstyle="auto"];
+ q0 -> q05 [label="b"];
+ q0 -> q02 [label="a"];
+ q05 -> q02 [label="a"];
+ q02 -> q05 [label="b"];
+ { rank="same"; q05; q02; }
+ q05 -> qA [label="b",lblstyle="auto,below"];
+ q02 -> qA [label="a"];
+ qA -> qA [label="a,b",topath="loop below"];
+}