\documentclass[11pt]{article}

\usepackage{fullpage,amssymb}
\parindent 0pt
\parskip 1ex
\textwidth 6.5in
\thispagestyle{empty}

\begin{document}

\centerline{\bf\large COMPSCI 501 Spring 2019 - Homework 4}
\medskip

Released 3/8/2019 \hfill Due in Gradescope on Thu Mar 28, 11:59pm
\bigskip

\textbf{Instructions}.

You may work in groups, but you must write solutions yourself.
List your collaborators. 

All your answers should contain a rigorous argument of correctness.

Please submit a PDF file. You may submit a scanned handwritten document, but a typed submission is preferred. Please assign pages to questions in Gradescope.

\bigskip
\textbf{Q1} (5p).  A \emph{min-decider} is a TM that is a decider, such that no smaller TM decides the same language. Prove that there is no TM that can enumerate an infinite set of min-deciders.

\textbf{Q2} (10p). Let $L  = \{ \langle D \rangle \mid D$ is a DFA over alphabet \{0, 1\} so that every binary string is a prefix of some string accepted by $D\}$. Is $L$ decidable?

\textbf{Q3} (15p). Let $L = \{\langle M \rangle \mid M \textrm{ is a TM that accepts precisely all strings with even length} \}$. 
\\Is $L$ decidable? Is it Turing-recognizable? What about its complement? 

\textbf{Q4} (5p). $L = \{\langle M \rangle \mid M \textrm{ is a TM that halts on all but finitely many inputs} \}$.
\\Prove or disprove: $L$ is decidable.

\textbf{Q5} (10p). (Sipser 5.27) A \emph{two-dimensional finite automaton} (2DIM-DFA) is defined as follows. The input is an $m \times n$ rectangle, for any $m, n \ge 2$. The squares along the boundary of the rectangle contain the symbol \# and the internal squares contain symbols over the input alphabet $\Sigma$. The transition function $\delta : Q \times (\Sigma \cup \{\#\}) \to Q \times \{\textrm{L, R, U, D}\}$ indicates the next state and the new head position (Left, Right, Up, Down). The machine accepts when it enters one of the designated accept states. It rejects if it tries to move off the input rectangle or if it never halts. Two such machines are equivalent if they accept the same rectangles. Consider the problem of determining whether two of these machines are equivalent. Formulate this problem as a language and show that it is undecidable.

\textbf{Q6} (15p).  We say some language $L$ \emph{isolates} languages $L_1$ and $L_2$ if $L_1 \subseteq L$ and $L_2 \subseteq \overline{L}$.
\\Find two disjoint Turing-recognizable languages such that no decidable language isolates them.

\end{document}