69/123
\begin{frame}{Example}
  \begin{exampleblock}{}
    \vspace{-1.5ex}
    \begin{talign}
      S \rightarrow AA && A \rightarrow aB\mid Bb && BB \rightarrow aa
    \end{talign}
    This grammar with \structure{$w = aaab$} translates to the following MPCP:
    \pause
    \begin{talign}
      \begin{array}{|c|c|c|c|c|c|c|}
      \cline{1-3} \cline{5-7}
      i & w_i & v_i & ~\hspace{.5cm}~ & i & w_i & v_i \\
      \cline{1-3} \cline{5-7}
      1 & ~~ \alert{F} ~~ & ~~ \alert{FS\Rightarrow} ~~ & & 7 & \Rightarrow & \Rightarrow \\
      2 & \alert{\Rightarrow \structure{aaab}E} & ~~ \alert{E} ~~ & & 8 & a & a \\
      3 & \alert{S} & \alert{AA} & & 9 & b & b \\
      4 & \alert{A} & \alert{aB} & & 10 & A & A \\
      5 & \alert{A} & \alert{Bb} & & 11 & B & B \\
      6 & \alert{BB} & \alert{aa} & & 12 & S & S \\
      \cline{1-3} \cline{5-7}
      \end{array}
    \end{talign}
  \end{exampleblock}
  \pause
  \begin{exampleblock}{}
    Example derivation: \alert{$S\Rightarrow AA\Rightarrow aBA\Rightarrow aBBb\Rightarrow aaab$}.
    \begin{center}
      \vspace{-1ex}
      \begin{tikzpicture}
        \node at (-4.25,0) {$w_i:$};
        \node at (0,0) {$\mpause[0]{}
          \nexttop{F}{1}
          \nexttop{S}{3}
          \nexttop{\Rightarrow}{7}
          \nexttop{A}{4}
          \nexttop{A}{{10}}
          \nexttop{\Rightarrow}{7}
          \nexttop{a}{8}
          \nexttop{B}{{11}}
          \nexttop{A}{5}
          \nexttop{\Rightarrow}{7}
          \nexttop{a}{8}
          \nexttop{B\,B}{6}
          \nexttop{b}{9}
          \nexttop{\Rightarrow a\,a\,a\,b\,E}{2}
        $};
        \node at (-4.25,-.75) {$v_i:$};
        \node at (0,-.75) {$\mpause[0]{}
          \nextbottom{F\,S\,\Rightarrow}{1} 
          \nextbottom{A\,A}{3} 
          \nextbottom{\Rightarrow}{7} 
          \nextbottom{a\,B}{4} 
          \nextbottom{A}{{10}} 
          \nextbottom{\Rightarrow}{7} 
          \nextbottom{a}{8}
          \nextbottom{B}{{11}}
          \nextbottom{B\,b}{5}
          \nextbottom{\Rightarrow}{7}
          \nextbottom{a}{8}
          \nextbottom{a\,a}{6}
          \nextbottom{b}{9}
          \nextbottom{E}{2}
        $};
      \end{tikzpicture}
      \vspace{-.75ex}
    \end{center}
  \end{exampleblock}
  \bigskip
\end{frame}