# HG changeset patch # User Christian Urban # Date 1381499471 -3600 # Node ID b98a0a49c4327dcf2d85b5024cba10548784b977 # Parent 69cec773736b8b406cf8cf1fb6ad1ffb2d7303d8 added slides diff -r 69cec773736b -r b98a0a49c432 slides/slides03.pdf Binary file slides/slides03.pdf has changed diff -r 69cec773736b -r b98a0a49c432 slides/slides03.tex --- a/slides/slides03.tex Fri Oct 11 14:02:35 2013 +0100 +++ b/slides/slides03.tex Fri Oct 11 14:51:11 2013 +0100 @@ -703,13 +703,40 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \mode{ \begin{frame}[c] -\frametitle{Rexp to NFA} +\frametitle{Case $r^*$} + +\onslide<1>{By recursion we are given an automaton for $r$:\smallskip} -\begin{center} -\begin{tabular}[b]{ll} -\bl{r$^*$} & \includegraphics[scale=0.7]{pics/star.jpg}\\ -\end{tabular} -\end{center}\pause\bigskip +\begin{tikzpicture}[node distance=3mm, + >=stealth',very thick, every state/.style={minimum size=3pt,draw=blue!50,very thick,fill=blue!20},] +\onslide<1>{\node at (0,0) (1) {$\mbox{}$};} +\onslide<2>{\node at (0,0) [state, initial,accepting] (1) {$\mbox{}$};} +\only<1>{\node[state, initial] (2) [right=16mm of 1] {$\mbox{}$};} +\only<2>{\node[state] (2) [right=16mm of 1] {$\mbox{}$};} +\node (a) [right=of 2] {$\ldots$}; +\only<1>{ +\node[state, accepting] (a1) [right=of a] {$\mbox{}$}; +\node[state, accepting] (a2) [above=of a1] {$\mbox{}$}; +\node[state, accepting] (a3) [below=of a1] {$\mbox{}$};} +\only<2>{ +\node[state] (a1) [right=of a] {$\mbox{}$}; +\node[state] (a2) [above=of a1] {$\mbox{}$}; +\node[state] (a3) [below=of a1] {$\mbox{}$};} +\only<2>{ +\path[->] (1) edge node [above] {\alert{$\epsilon$}} (2); +\path[->] (a1) edge [bend left=45] node [above] {\alert{$\epsilon$}} (1); +\path[->] (a2) edge [bend right] node [below] {\alert{$\epsilon$}} (1); +\path[->] (a3) edge [bend left=45] node [below] {\alert{$\epsilon$}} (1); + +} +\begin{pgfonlayer}{background} +\only<1>{\node (1) [rounded corners, inner sep=1mm, thick, draw=black!60, fill=black!20, fit= (2) (a1) (a2) (a3)] {};} +\only<2>{\node (2) [rounded corners, inner sep=1mm, thick, draw=black!60, fill=black!20, fit= (1) (a2) (a3)] {};} +\only<1>{\node [yshift=3mm] at (1.north) {\bl{$r$}};} +\only<2>{\node [yshift=3mm] at (2.north) {\bl{$r^*$}};} +\end{pgfonlayer} +\end{tikzpicture} + Why can't we just have an epsilon transition from the accepting states to the starting state?