\documentclass[11pt]{article}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{epstopdf}
\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}

\textwidth = 6.5 in
\textheight = 9 in
\oddsidemargin = 0.0 in
\evensidemargin = 0.0 in
\topmargin = 0.0 in
\headheight = 0.0 in
\headsep = 0.0 in
\parskip = 0.2in
\parindent = 0.0in

\newtheorem{theorem}{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{definition}{Definition}

\begin{document}

\begincenter{}\endcenter







\prof{Peter Cholak}
\class{Math 441}
\quizdate{Friday, December 20}
\examname{Final}

\begin{document}
%\pagestyle{empty}

\heading

\noindent This exam is worth 200 points. Be sure to prove your
answers are correct! Problems 2a,b,c and 4c are the hardest
problems on the exam (or so I think).  If you have not looked at
these before I suggest dealing with them at the end of the exam.
Otherwise the problems are listed in the order we covered them.

\bigskip

\begin{problem}
  Let $M = (\{s,p,q,f\},\{a,b\},
  \{(s,a,p),(p,b,f),(p,b,q),(f,a,p),(q,a,f)\}, s, \{f\})$.
  \begin{subproblem}
    (5 points) $M$ is a nondeterministic finite automata. Why?
  \end{subproblem}
  \begin{subproblem}
    (10 points) Draw the state diagram for $M$.
  \end{subproblem}
  \begin{subproblem}
    (10 points) Give a regular expression for the language
    accepted by $M$.
  \end{subproblem}
\end{problem}


\begin{problem}
  (Parts of 2.5.6) An arithmetic progression is the set $\{ p +
  qn: n \in \mathbb{N}\}$ for some $p,q \in \mathbb{N}$.
  \begin{subproblem}
    (10 points) Show that if $L \subseteq \{a\}^*$ and $\{n: a^n
    \in L\}$ is an arithmetic progression then $L$ is regular.
  \end{subproblem}
  \begin{subproblem}
    (10 points) Show that if $L \subseteq \{a\}^*$ and $\{n: a^n
    \in L\}$ is a union of finitely many arithmetic progressions
    then $L$ is regular.
  \end{subproblem}
  \begin{subproblem}
    (20 points) Show that if $L \subseteq \{a\}^*$ is regular
    then $\{n: a^n \in L\}$ is a union of finitely many
    arithmetic progressions.
  \end{subproblem}
 % \begin{subproblem}
%    (15 points) Show that if $\Sigma$ is any alphabet and $L
%    \subseteq \Sigma^*$ is regular then $\{|w|: w \in L\}$ is a
%    union of finitely many arithmetic progressions.
%  \end{subproblem}
\end{problem}

\begin{problem} 
  (15 points) Find an context-free grammar $G$ such that $L(G)$
  is not regular.
\end{problem}

\begin{problem}
  (Parts of 3.5.28) Which of the following languages are
  context-free?  Explain briefly in each case.
  \begin{subproblem}
    (5 points) $\{a^mb^nc^p: m = n \text{ or } n=p \text{ or } m =p \}$
  \end{subproblem}
  \begin{subproblem}
    (10 points) $\{ w \in \{a,b,c\}^*: w \text{ does not contain
      equal numbers of } a, b, \text{ and } c \}$
  \end{subproblem}
  \begin{subproblem}
    (20 points) $\{w \in \{a,b\}^*: w = w_1 \ldots w_m \text{ for
      some } m \geq 2 \text{ and some } w_1, \ldots w_m \text{
      such that } |w_1| = \ldots = |w_m| \geq 2\}$ (Hint: is
    $\Psi(L)$ semi-linear?)
  \end{subproblem}
\end{problem}

\begin{problem}
  (25 points) Build a Turing machine which {\it accepts} $\{ w
  \in \{a,b\}^*: |w| \text{ is odd}\}$.
\end{problem}


\begin{problem}
  (25 points) (Essay) What is Church's thesis?  Do you believe
  it? Why or Why not?
\end{problem}


\begin{problem}
  (25 points) Given an example of an infinite language which is
  not context-free but is Turing decidable (use Church's thesis
  to show this language is Turing-decidable).
\end{problem}

\begin{problem}
  (10 points) Fix a Turing Machine $M$.  Is there an algorithm
  which decides if $a^{179}b^{213} \in L(M)$?
\end{problem}


\end{document}

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



