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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |