summaryrefslogtreecommitdiff
path: root/part2.tex
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2017-01-16 04:51:23 +0100
committerPeter Wu <peter@lekensteyn.nl>2017-01-16 04:51:23 +0100
commit995b06c4e9617c44429cc4d0ae3d0518384d6471 (patch)
treeb92f687f4f84116afb3ae8ebb7352f9189578edd /part2.tex
parent66dad01dd33494a885b5577d92dc4bc619c36cf9 (diff)
download2IMF25-AR-995b06c4e9617c44429cc4d0ae3d0518384d6471.tar.gz
NFA: initial solution
Python code is not cleaned up, it is working now... Generated LaTeX code was not positioned correctly, so just use GraphViz then.
Diffstat (limited to 'part2.tex')
-rw-r--r--part2.tex43
1 files changed, 43 insertions, 0 deletions
diff --git a/part2.tex b/part2.tex
index c30489c..9d925ed 100644
--- a/part2.tex
+++ b/part2.tex
@@ -8,6 +8,7 @@
\usepackage[table]{xcolor}
\usepackage{listings}
\usepackage{tikz}
+\usetikzlibrary{automata,positioning}
\usepackage{hyperref}
\usepackage{float}
\usepackage{enumitem}
@@ -290,6 +291,48 @@ $aba$, $baa$, $abab$, $babb$ and $bbba$.
\subsection*{Solution:}
+\begin{figure}[H]
+\centering
+\begin{tikzpicture}[>=latex,line join=bevel,scale=.8]
+%%
+\node (q1) at (349.84bp,107.75bp) [draw,circle] {q1};
+ \node (q0) at (63.348bp,142.75bp) [draw,circle] {q0};
+ \node (q3) at (250.34bp,26.748bp) [draw,circle, double] {q3};
+ \node (q2) at (349.84bp,192.75bp) [draw,circle, double] {q2};
+ \node (q5) at (449.33bp,192.75bp) [draw,circle, double] {q5};
+ \node (q4) at (154.84bp,196.75bp) [draw,circle] {q4};
+ \node (q7) at (250.34bp,196.75bp) [draw,circle] {q7};
+ \node (q6) at (154.84bp,111.75bp) [draw,circle] {q6};
+ \node (qi) at (1.8bp,142.75bp) [draw,circle, fill] {};
+ \draw [->] (q4) ..controls (187.8bp,216.1bp) and (206.11bp,224.89bp) .. (223.59bp,228.75bp) .. controls (289.99bp,243.41bp) and (310.37bp,244.23bp) .. (376.58bp,228.75bp) .. controls (390.8bp,225.42bp) and (405.42bp,218.89bp) .. (q5);
+ \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
+ \pgfsetstrokecolor{strokecol}
+ \draw (300.09bp,247.25bp) node {a};
+ \draw [->] (q6) ..controls (183.11bp,118.1bp) and (189.56bp,119.16bp) .. (195.59bp,119.75bp) .. controls (220.94bp,122.21bp) and (121.7bp,141.89bp) .. (305.09bp,118.75bp) .. controls (309.28bp,118.22bp) and (313.66bp,117.44bp) .. (q1);
+ \draw (250.34bp,136.25bp) node {a};
+ \draw [->] (q3) ..controls (283.88bp,45.478bp) and (295.45bp,52.911bp) .. (305.09bp,60.748bp) .. controls (313.05bp,67.222bp) and (321.01bp,75.037bp) .. (q1);
+ \draw (300.09bp,68.248bp) node {b};
+ \draw [->] (q4) ..controls (189.69bp,196.75bp) and (204.15bp,196.75bp) .. (q7);
+ \draw (200.59bp,204.25bp) node {b};
+ \draw [->] (q0) ..controls (96.456bp,131.53bp) and (110.68bp,126.71bp) .. (q6);
+ \draw (109.1bp,136.25bp) node {b};
+ \draw [->] (q1) ..controls (301.72bp,103.92bp) and (259.71bp,101.65bp) .. (223.59bp,103.75bp) .. controls (211.74bp,104.44bp) and (198.81bp,105.78bp) .. (q6);
+ \draw (250.34bp,111.25bp) node {b};
+ \draw [->] (q7) ..controls (285.1bp,195.35bp) and (299.58bp,194.77bp) .. (q2);
+ \draw (300.09bp,203.25bp) node {a};
+ \draw [->] (q0) ..controls (95.791bp,161.9bp) and (112.28bp,171.63bp) .. (q4);
+ \draw (109.1bp,179.25bp) node {a};
+ \draw [->] (q1) ..controls (382.04bp,135.26bp) and (403.75bp,153.81bp) .. (q5);
+ \draw (399.58bp,161.25bp) node {a};
+ \draw [->] (qi) ..controls (8.2235bp,142.75bp) and (19.002bp,142.75bp) .. (q0);
+ \draw [->] (q2) ..controls (387.71bp,192.75bp) and (400.54bp,192.75bp) .. (q5);
+ \draw (399.58bp,200.25bp) node {b};
+ \draw [->] (q6) ..controls (175.2bp,82.337bp) and (185.08bp,70.08bp) .. (195.59bp,60.748bp) .. controls (202.27bp,54.82bp) and (210.1bp,49.285bp) .. (q3);
+ \draw (200.59bp,68.248bp) node {b};
+%
+\end{tikzpicture}
+\end{figure}
+
\section*{Problem: }
The goal of this problem is to exploit the power of the recommended tools rather