slides/slides03.tex
changeset 143 e3fd4c5995ef
parent 139 6e7c3db9023d
child 215 828303e8e4af
equal deleted inserted replaced
142:1aa28135a2da 143:e3fd4c5995ef
   518 
   518 
   519 you can define
   519 you can define
   520 
   520 
   521 \begin{center}
   521 \begin{center}
   522 \begin{tabular}{l}
   522 \begin{tabular}{l}
   523 \bl{$\hat{\delta}(q, \texttt{""}) = q$}\\
   523 \bl{$\hat{\delta}(q, \texttt{""}) \dn q$}\\
   524 \bl{$\hat{\delta}(q, c::s) = \hat{\delta}(\delta(q, c), s)$}\\
   524 \bl{$\hat{\delta}(q, c::s) \dn \hat{\delta}(\delta(q, c), s)$}\\
   525 \end{tabular}
   525 \end{tabular}
   526 \end{center}\pause
   526 \end{center}\pause
   527 
   527 
   528 Whether a string \bl{$s$} is accepted by \bl{$A$}?
   528 Whether a string \bl{$s$} is accepted by \bl{$A$}?
   529 
   529 
   563 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   563 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   564 
   564 
   565 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   565 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   566 \mode<presentation>{
   566 \mode<presentation>{
   567 \begin{frame}[c]
   567 \begin{frame}[c]
   568 \frametitle{An NFA Example}
   568 \frametitle{Two NFA Examples}
   569 
   569 
   570 \begin{center}
   570 \begin{center}
       
   571 \begin{tabular}[t]{c@{\hspace{9mm}}c}
   571 \begin{tikzpicture}[scale=0.7,>=stealth',very thick,
   572 \begin{tikzpicture}[scale=0.7,>=stealth',very thick,
   572                              every state/.style={minimum size=0pt,draw=blue!50,very thick,fill=blue!20},]
   573                              every state/.style={minimum size=0pt,draw=blue!50,very thick,fill=blue!20},]
   573 \node[state,initial]  (q_0)  {$q_0$};
   574 \node[state,initial]  (q_0)  {$q_0$};
   574 \node[state] (q_1) [above=of q_0] {$q_1$};
   575 \node[state] (q_1) [above=of q_0] {$q_1$};
   575 \node[state, accepting] (q_2) [below=of q_0] {$q_2$};
   576 \node[state, accepting] (q_2) [below=of q_0] {$q_2$};
   576 \path[->] (q_0) edge node [left]  {\alert{$\epsilon$}} (q_1);
   577 \path[->] (q_0) edge node [left]  {\alert{$\epsilon$}} (q_1);
   577 \path[->] (q_0) edge node [left]  {\alert{$\epsilon$}} (q_2);
   578 \path[->] (q_0) edge node [left]  {\alert{$\epsilon$}} (q_2);
   578 \path[->] (q_0) edge [loop right] node  {\alert{$a$}} ();
   579 \path[->] (q_0) edge [loop right] node  {\alert{$a$}} ();
   579 \path[->] (q_1) edge [loop above] node  {\alert{$a$}} ();
   580 \path[->] (q_1) edge [loop above] node  {\alert{$a$}} ();
   580 \path[->] (q_2) edge [loop below] node  {\alert{$b$}} ();
   581 \path[->] (q_2) edge [loop below] node  {\alert{$b$}} ();
   581 \end{tikzpicture}
   582 \end{tikzpicture} &
       
   583 
       
   584 \raisebox{20mm}{
       
   585 \begin{tikzpicture}[scale=0.7,>=stealth',very thick,
       
   586                              every state/.style={minimum size=0pt,draw=blue!50,very thick,fill=blue!20},]
       
   587 \node[state,initial]  (r_1)  {$r_1$};
       
   588 \node[state] (r_2) [above=of r_1] {$r_2$};
       
   589 \node[state, accepting] (r_3) [right=of r_1] {$r_3$};
       
   590 \path[->] (r_1) edge node [below]  {\alert{$b$}} (r_3);
       
   591 \path[->] (r_2) edge [bend left] node [above]  {\alert{$a$}} (r_3);
       
   592 \path[->] (r_1) edge [bend left] node  [left] {\alert{$\epsilon$}} (r_2);
       
   593 \path[->] (r_2) edge [bend left] node  [right] {\alert{$a$}} (r_1);
       
   594 \end{tikzpicture}}
       
   595 \end{tabular}
   582 \end{center}
   596 \end{center}
   583 
   597 
   584 
   598 
   585 \end{frame}}
   599 \end{frame}}
   586 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   600 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%