12/216
\begin{frame}{Derivation Trees}
  \begin{exampleblock}{}
    \[S \to SaS \mid b\]
    \medskip

    A \emph{derivation tree} for $bab$ is:
    \begin{center}
      \begin{tikzpicture}[default,>=latex,l/.style={yshift=-10mm},node distance=10mm,thin]
        \node (1) {$S$};
        \node (2a) [left of=1,l] {$S$};
        \node (2b) [at=(1),l] {$a$};
        \node (2c) [right of=1,l] {$S$};
        \node (3a) [at=(2a),l] {$b$};
        \node (3c) [at=(2c),l] {$b$};
        
        \draw (1) to (2a);
        \draw (1) to (2b);
        \draw (1) to (2c);
        \draw (2a) to (3a);
        \draw (2c) to (3c);
      \end{tikzpicture}
    \end{center}
  \end{exampleblock}
\end{frame}