added slides
authorChristian Urban <christian dot urban at kcl dot ac dot uk>
Fri, 11 Oct 2013 14:51:11 +0100
changeset 138 b98a0a49c432
parent 137 69cec773736b
child 139 6e7c3db9023d
added slides
slides/slides03.pdf
slides/slides03.tex
Binary file slides/slides03.pdf has changed
--- 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<presentation>{
 \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?