\documentclass[12pt]{article}
\usepackage{amsmath,amssymb}

\input{ExamMacros.tex}


\prof{Peter Cholak}
\class{Math 441}
\quizdate{Friday, October 18}
\examname{Exam 1}

\begin{document}
%\pagestyle{empty}

\heading

\noindent This exam is worth 100 points. Be sure to prove your
answers are correct.
\bigskip


\noindent {\bf The deal}: If you choose you can rewrite the exam
over the break (due in the begining of class the Monday after
break -- no exceptions).  In which case, your score for the exam
will be the maximum of the score of how you did in class or the
average of the two scores.  Since you will have more time for the
second write-up, I will expect more complete answers and this
will be reflected in it's grading.  \bigskip

\begin{problem}
  (10 points) Find a regular expression $\alpha$ such that
  $\{aa\}^* \cap L(\alpha) = \emptyset$ and $L(\alpha)$ is
  infinite.  What is $L(\alpha)$?
\end{problem}

\bigskip

\begin{problem}
  (15 points) Find a finite automaton such that $L(M) =
  \overline{\{bb\}^* \cup \{aa\}^*}$.
\end{problem}

\bigskip

\begin{problem}
  (20 points) Let $M$ be {\it any} finite automaton.  Give an
  algorithm for determining whether $|L(M)| = 1$
\end{problem}

\bigskip

\begin{problem}
  (20 points) State some form of the Pumping Lemma and use it to
  show $\{a^{n}b^m : m \leq n \leq 2m\}$ is not regular.
\end{problem}

\bigskip

\begin{problem}
  (10 points) What is the definition of a regular grammar.  It is
  not possible to find a regular grammar $G$ such that
  $L(G)=\{a^{n}b^m : m \leq n \leq 2m\}$.  Why? (You may assume
  the last problem.)
\end{problem}

\bigskip

\begin{problem}
  (25 points) Find a context-free grammar $G$ such that $L(G)
  =\{a^{n}b^m : m \leq n \leq 2m\}$.  (One direction of the proof
  that your grammar is correct will involve an induction on the
  length of the derivations.)
\end{problem}

\bigskip

\end{document}

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: t
%%% End: 



