37/38
\begin{frame}{Exercise}
  \begin{exampleblock}{}
    \emph{Find a regular expression} $r$ such that
    \begin{talign}
      L(r)=\{\,w\in\{a,b\}^*\mid \mbox{$n_a(w)$ even and $n_b(w)$ is odd}\,\}
    \end{talign}
    where 
    \begin{itemize}
      \item $n_a(w)$ is the number of $a$'s in $w$, and
      \item $n_b(w)$ is the number of $b$'s in $w$.
    \end{itemize}
  \end{exampleblock}
  \pause\bigskip\bigskip
  
  \begin{exampleblock}{}
    \emph{Find a regular expression} $r$ over $\{a,b\}$ such that $L(r)$
    consists of all words that do \alert{not} contain the pattern \alert{$bab$}.
  \end{exampleblock}
\end{frame}