slides/slides03.tex
changeset 573 711bbc480998
parent 572 4a1739f256fd
child 574 bd4f144326c7
--- a/slides/slides03.tex	Fri Oct 05 11:07:57 2018 +0100
+++ b/slides/slides03.tex	Mon Oct 08 11:35:04 2018 +0100
@@ -290,14 +290,14 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\begin{frame}[c]
+\begin{frame}[t]
 \frametitle{Automata}
 
 A \alert{\bf deterministic finite automaton}, DFA, consists of:
 
 \begin{itemize}
 \item an alphabet \bl{$\varSigma$}  
-\item a set of states \bl{$Q$}
+\item a set of states \bl{$\mbox{Q}$}
 \item one of these states is the start state \bl{$\mbox{Q}_0$}
 \item some states are accepting states \bl{$F$}, and
 \item there is transition function \bl{$\delta$}\bigskip 
@@ -320,7 +320,8 @@
 
 \begin{center}
 \begin{tikzpicture}[>=stealth',very thick,auto,
-                             every state/.style={minimum size=0pt,inner sep=2pt,draw=blue!50,very thick,fill=blue!20},]
+  every state/.style={minimum size=0pt,inner sep=2pt,
+    draw=blue!50,very thick,fill=blue!20},]
 \node[state,initial]  (Q_0)  {$\mbox{Q}_0$};
 \node[state] (Q_1) [right=of Q_0] {$\mbox{Q}_1$};
 \node[state] (Q_2) [below right=of Q_0] {$\mbox{Q}_2$};
@@ -338,39 +339,14 @@
 \end{tikzpicture}
 \end{center}
 
-
+\mbox{}\\[-14mm]
+\only<1>{
 \begin{itemize}
 \item the start state can be an accepting state
 \item it is possible that there is no accepting state
 \item all states might be accepting (but this does not necessarily mean all strings are accepted)
-\end{itemize}
-
-\end{frame}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\begin{frame}[c]
-
-\begin{center}
-\begin{tikzpicture}[>=stealth',very thick,auto,
-                             every state/.style={minimum size=0pt,inner sep=2pt,draw=blue!50,very thick,fill=blue!20},]
-\node[state,initial]  (Q_0)  {$\mbox{Q}_0$};
-\node[state] (Q_1) [right=of Q_0] {$\mbox{Q}_1$};
-\node[state] (Q_2) [below right=of Q_0] {$\mbox{Q}_2$};
-\node[state] (Q_3) [right=of Q_2] {$\mbox{Q}_3$};
-\node[state, accepting] (Q_4) [right=of Q_1] {$\mbox{Q}_4$};
-\path[->] (Q_0) edge node [above]  {\alert{$a$}} (Q_1);
-\path[->] (Q_1) edge node [above]  {\alert{$a$}} (Q_4);
-\path[->] (Q_4) edge [loop right] node  {\alert{$a, b$}} ();
-\path[->] (Q_3) edge node [right]  {\alert{$a$}} (Q_4);
-\path[->] (Q_2) edge node [above]  {\alert{$a$}} (Q_3);
-\path[->] (Q_1) edge node [right]  {\alert{$b$}} (Q_2);
-\path[->] (Q_0) edge node [above]  {\alert{$b$}} (Q_2);
-\path[->] (Q_2) edge [loop left] node  {\alert{$b$}} ();
-\path[->] (Q_3) edge [bend left=95, looseness=1.3] node [below]  {\alert{$b$}} (Q_0);
-\end{tikzpicture}
-\end{center}
-
+\end{itemize}}
+\only<2>{
 for this automaton \bl{$\delta$} is the function\\
 
 \begin{center}
@@ -380,11 +356,13 @@
   \bl{$(\mbox{Q}_0, b) \rightarrow \mbox{Q}_2$} & \bl{$(\mbox{Q}_1, b) \rightarrow \mbox{Q}_2$} &
   \bl{$(\mbox{Q}_4, b) \rightarrow \mbox{Q}_4$}\\
 \end{tabular}\ldots
-\end{center}
+\end{center}  
+}  
 
 \end{frame}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \begin{frame}[t]
 \frametitle{Accepting a String}
@@ -1069,7 +1047,7 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \begin{frame}[c]
 \frametitle{Alternatives}
-\mbox{}\\[-17mm]\mbox{}
+\mbox{}\\[-14mm]\mbox{}
 
 \begin{center}
 \begin{tikzpicture}[>=stealth',very thick,auto,
@@ -1108,11 +1086,11 @@
 
 \small
 \begin{itemize}
-\item<2-> exchange initial / accepting states\\[-2mm]
-\item<3-> reverse all edges\\[-2mm]
-\item<4-> subset construction $\Rightarrow$ DFA\\[-2mm]
-\item<5-> remove dead states\\[-2mm]
-\item<6-> repeat once more 
+\item<1-> exchange initial / accepting states\\[-2mm]
+\item<2-> reverse all edges\\[-2mm]
+\item<3-> subset construction $\Rightarrow$ DFA\\[-2mm]
+\item<4-> remove dead states\\[-2mm]
+\item<5-> repeat once more 
           \onslide<6->{$\Rightarrow$ minimal DFA}
 \end{itemize}