updated
authorChristian Urban <urbanc@in.tum.de>
Wed, 28 Jun 2017 12:46:23 +0100
changeset 497 c498cb53a9a8
parent 496 5c9de27a5b30
child 498 ea47c3b8f35f
updated
handouts/graphs.pdf
handouts/graphs.tex
handouts/ho03.tex
Binary file handouts/graphs.pdf has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/handouts/graphs.tex	Wed Jun 28 12:46:23 2017 +0100
@@ -0,0 +1,130 @@
+\documentclass{article}
+\usepackage{../style}
+\usepackage{../langs}
+\usepackage{../graphics}
+\usepackage{../data}
+
+
+\begin{document}
+
+
+\section*{Benchmarks for $(a^*)^* b$ and $a^{?\{n\}} a^{\{n\}}$}
+
+\mbox{}\bigskip
+
+\begin{center}
+$(a^*)^* \cdot b$ and strings $\underbrace{a\ldots a}_{n}$\medskip\\
+\begin{tabular}{@{}cc@{}}
+\raisebox{5mm}{
+\begin{tikzpicture}
+\begin{axis}[
+    xlabel={$n$},
+    x label style={at={(1.05,0.0)}},
+    ylabel={time in secs},
+    enlargelimits=false,
+    xtick={0,5,...,30},
+    xmax=33,
+    ymax=35,
+    ytick={0,5,...,30},
+    scaled ticks=false,
+    axis lines=left,
+    width=5cm,
+    height=5cm, 
+    legend entries={Java, Python},  
+    legend pos=north west,
+    legend cell align=left]
+\addplot[blue,mark=*, mark options={fill=white}] table {re-python2.data};
+\addplot[cyan,mark=*, mark options={fill=white}] table {re-java.data};
+\end{axis}
+\end{tikzpicture}}
+&
+\begin{tikzpicture}
+  \begin{axis}[
+    xlabel={$n$},
+    x label style={at={(1.1,0.0)}},
+    %%xtick={0,1000000,...,5000000}, 
+    ylabel={time in secs},
+    enlargelimits=false,
+    ymax=35,
+    ytick={0,5,...,30},
+    axis lines=left,
+    %scaled ticks=false,
+    width=6.5cm,
+    height=5cm,
+    legend entries={Derivative matcher},  
+    legend pos=north east,
+    legend cell align=left]
+%\addplot[green,mark=square*,mark options={fill=white}] table {re2a.data};    
+\addplot[black,mark=square*,mark options={fill=white}] table {re3a.data};
+\end{axis}
+\end{tikzpicture}
+\end{tabular}
+\end{center}\bigskip
+
+\begin{center}
+$a^{?\{n\}} \cdot a^{\{n\}}$ and strings $\underbrace{a\ldots a}_{n}$\medskip\\
+\begin{tabular}{@{}cc@{}}
+\begin{tikzpicture}
+\begin{axis}[
+    xlabel={$n$},
+    x label style={at={(1.05,0.0)}},
+    ylabel={\small time in secs},
+    enlargelimits=false,
+    xtick={0,5,...,30},
+    xmax=33,
+    ymax=35,
+    ytick={0,5,...,30},
+    scaled ticks=false,
+    axis lines=left,
+    width=5cm,
+    height=5cm, 
+    legend entries={Python,Ruby},  
+    legend pos=north west,
+    legend cell align=left]
+\addplot[blue,mark=*, mark options={fill=white}] table {re-python.data};
+\addplot[brown,mark=triangle*, mark options={fill=white}] table {re-ruby.data};  
+\end{axis}
+\end{tikzpicture}
+&
+\begin{tikzpicture}
+  \begin{axis}[
+    xlabel={$n$},
+    x label style={at={(1.1,0.05)}},
+    ylabel={\small time in secs},
+    enlargelimits=false,
+    xtick={0,2500,...,11000},
+    xmax=12000,
+    ymax=35,
+    ytick={0,5,...,30},
+    scaled ticks=false,
+    axis lines=left,
+    width=6.5cm,
+    height=5cm,
+    legend entries={Derivative matcher},  
+    legend pos=north east,
+    legend cell align=left]
+%\addplot[green,mark=square*,mark options={fill=white}] table {re2.data};
+\addplot[black,mark=square*,mark options={fill=white}] table {re3.data};
+\end{axis}
+\end{tikzpicture}
+\end{tabular}
+\end{center}
+
+
+\subsubsection*{Sources}
+
+
+\url{http://talisker.inf.kcl.ac.uk/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/catastrophic.java}\medskip
+
+\noindent
+\url{http://talisker.inf.kcl.ac.uk/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/catastrophic.py}
+
+\end{document}
+
+
+
+
+%%% Local Variables: 
+%%% mode: latex
+%%% TeX-master: t
+%%% End: 
--- a/handouts/ho03.tex	Mon Jun 19 10:44:28 2017 +0100
+++ b/handouts/ho03.tex	Wed Jun 28 12:46:23 2017 +0100
@@ -186,7 +186,8 @@
 \end{lstlisting}}  
 
 \noindent I let you think what the corresponding DFA looks like in the
-graph notation.
+graph notation. Also, I suggest you to tinker with the Scala code in
+order to define the DFA that does not accept any string at all. 
 
 Finally, I let you ponder whether this is a good implementation of
 DFAs or not. In doing so I hope you notice that the $\varSigma$ and