\documentclass[11pt]{article}
%%%
%%% You should not need to change anything between here and the after the next %%% block
%%%
\setlength{\oddsidemargin}{0.0in}
\setlength{\evensidemargin}{0.0in}
\setlength{\textwidth}{6.25in}
\setlength{\topmargin}{-0.4in}
\setlength{\textheight}{8.5in}
\setlength{\parindent}{0em}
\setlength{\parskip}{1.5ex}
\usepackage{mathpazo} % palatino math fonts
\usepackage{palatino}
\usepackage{amssymb, amsmath, amsfonts}
\usepackage{verbatim}
\usepackage{graphics}
\usepackage[hyperindex]{hyperref}
\usepackage{url}
\urlstyle{sf}
\newcommand{\nonterminal}[1]{{\sl #1}}
\newcommand{\terminal}[1] {{\textbf{#1}}}
\newcommand{\produces}{$\rightarrow$}
\newenvironment{bnfgrammar}{\begin{quote}\begin{tabbing} \hspace*{12em}\=\ \produces\quad\= \kill}{\end{tabbing}\end{quote}}
\newenvironment{smallbnfgrammar}{\begin{quote}\begin{tabbing} \hspace*{3em}\=\ \produces\quad\= \kill}{\end{tabbing}\end{quote}}
\newcommand{\bnfrule}[2]{\hfill\nonterminal{#1}\>\produces\>#2\\}
\newenvironment{bnfgrammarm}[1]{\begin{quote}\begin{tabbing} #1\qquad\=\ \produces\quad\= \kill}{\end{tabbing}\end{quote}}
\renewcommand\theenumi{\alph{enumi}}
\newcounter{problemno}
\newcommand{\problem}[1]{\stepcounter{problemno}{\bf Problem \theproblemno: #1.}}
\newcommand{\handout}[3]{
\noindent\begin{center}\vspace{-10mm}{\bf University of Virginia - cs3102: Theory of Computation (Spring 2010)}\end{center}
{\Large \bf #1 \hfill Due: #3}}
\newcommand{\collaboration}[1]{
\begin{center}{\bf Collaborators and Resources:}\par{\framebox{\parbox[t]{5.5in}{#1}}}\end{center}
%{\bf Collaboration and Resource Policy.} For this assignment, follow the same collaboration and resource policy as on Problem Sets 1 and 2. See the Problem Set 1 handout for a full description of the policy.
}
\newcommand{\handin}[2]{
{\Large \bf Name: \fbox{\Large #1 (#2)}}
\renewcommand{\thepage}{#2-\arabic{page}}}
\newenvironment{smallquote}{\begin{list}{}{%
\setlength\rightmargin{1.5em}\setlength\leftmargin{1.5em}\setlength\labelwidth{0pt}\setlength\itemindent{0pt}}\item[]}{\end{list}\vspace*{-1.3ex}}
\newcommand{\answer}[1]{\begin{smallquote}\emph{Answer:} #1\end{smallquote}}
\begin{document}
\handout{Problem Set 5}{PS5}{6 April 2010 (2:00pm)}
%%%
%%% ===========================================================
%%% Start editing here
%%%
\handin{Your Name}{yourid} %%% replace with your name and email ID
\collaboration{
List your collaborators here.
}
\bigskip
\problem{Countable and Uncountable Infinities}
\begin{enumerate}
\item Show that the set of all strings in $\left\{ a, b, c \right\}^{*}$ is countable.
\answer{Your answer here}
\item An \emph{algebraic} number is a number that is a root of some equation of the form $c_0 + c_1x + c_2x^2 + \ldots + c_nx^n$ (that is, a value if $x$ that makes the value of the equation $0$). For example, $\phi$ (the golden ratio) is algebraic since it is a root of $x^2 - x - 1$ and $\sqrt{2}$ is algebraic since it is a root of $x^2 - 2$. But, $\pi$ is \href{http://www.eveandersson.com/pi/poetry/pi-is-transcendental}{not algebraic} (\href{http://planetmath.org/?method=l2h&from=objects&name=ProofOfLindemannWeierstrassTheoremAndThatEAndPiAreTranscendental2&op=getobj}{proving this is difficult}). Show that the set of all algebraic numbers is countable.
\answer{Your answer here}
\item A \emph{transcendental} number is a real number that is not algebraic. Are the transcendental numbers countable or uncountable? (Support your answer with a convincing argument.)
\answer{Your answer here}
\end{enumerate}
\problem{Language Sizes} Consider the language,
\begin{equation*}
BIGGER_{DFA} = \left\{ \left\langle A, B\right\rangle \mid A\text{ and }B\text{ are DFAs and }|L(A)| > |L(B)|\right\}
\end{equation*}
The notation $|L(M)|$ means the size of the language described by the machine $M$. The size of a language is the number of strings in the language. For purposes of this question, you should assume the definitions about set sizes from Definition 4.12.
Is $BIGGER_{DFA}$ decidable? Either prove that it is decidable (for example, by providing a high-level description of a Turing Machine that can decide it), or prove that it is undecidable (for example, but showing that a known undecidable problem can be reduced to it).
\answer{Your answer here}
\problem{Closure Properties} For each part, provide a clear {\bf yes} or {\bf no} answer, and support your answer with a brief and convincing proof.
\begin{enumerate}
\item If $A$ is a Turing-recognizable language, is the complement of $A$ a Turing-recognizable language?
\answer{Your answer here}
\item If $A$ is a Turing-decidable language, is the complement of $A$ a Turing-decidable language?
\answer{Your answer here}
\item If $A$ and $B$ are Turing-recognizable languages, is $A \cap B$ a Turing-recognizable language?
\answer{Your answer here}
\item If $A$ and $B$ are Turing-decidable language, is $A \cap B$ a Turing-decidable language?
\answer{Your answer here}
\end{enumerate}
\problem{Undecidability} Prove that each of the following languages is undecidable. (Hint: show that you can reduce a known undecidable problem to the problem of deciding the given language.)
\begin{enumerate}
\item $L_{INF} = \left\{ | M\text{ describes a TM that accepts infinitely many strings}\right\}$
\answer{Your answer here}
\item $L_{HelloWorld} = \left\{ J | J\text{ is a Java program that prints out ``Hello World''}\right\}$
\answer{Your answer here}
\end{enumerate}
\problem{Unmodifiable-Input Turing Machine} (Based on a question by Ron Rivest.) Consider a one-tape Turing Machine that is identical to a regular Turing machine except the input may not be overwritten. That is, the symbol in any square that is non-blank in the initial configuration must never change. Otherwise, the machine may read and write to the rest of the tape with no constraints (beyond those that apply to a regular Turing Machine).
\begin{equation*}
HALT_{UTM} = \left\{ | M\text{ is an unmodifiable-input TM and }M\text{ halts on input }w\right\}
\end{equation*}
\begin{enumerate}
\item What is the set of languages that can be recognized by an unmodifiable-input TM? (Support your answer with a convincing argument.)
\answer{Your answer here}
\item Is $HALT_{UTM}$ decidable (by a regular TM)? (Support your answer with a convincing proof.)
\answer{Your answer here}
\end{enumerate}
\problem{Self-Rejecting DFAs} (Challenge Bonus) Define the function, $D(w)$, for DFAs similar to the function $M(w)$ we defined for Turing Machines in Class 16:
\begin{quote}
$D(w)$ = If $w$ is a valid encoding of a DFA, the DFA described by $w$. Otherwise, a DFA that rejects all inputs.
\end{quote}
Is the language {\sc Self-Rejecting}$_{DFA}$ $= \left\{ w \in \Sigma^{*}: w \notin \mathcal{L}(D(w)) \right\}$ Turing-recognizable? Provide a convincing proof supporting your answer.
\answer{Your answer here}
\problem{Random Access Memory} Random access memory (misnamed, since it is not at all random) allows a program to directly reference specified memory locations. Assume each memory location can store a single byte (8 bits) value. A random access machine (RAM) provides (at least) these two instructions:
\begin{verse}
1. {\bf store \emph{location} \emph{value}} --- write the value represented by the current square on the tape into location \emph{location}. The \emph{location} is any 32-bit integer, and \emph{value} is any 8-bit value (represented by a single square on the tape).\\
2. {\bf load \emph{location}} --- read the value in the location \emph{location} and write it onto the current square on the tape. At the end of a load instruction, the square under the tape head should contain the read value. The read value should be the last value that was stored in \emph{location} (using a {\bf store} instruction), or $0$ if no value has been stored in \emph{location}.
\end{verse}
\begin{enumerate}
\item Prove that a RAM is not more powerful than a Turing machine by showing how a TM could simulate a RAM. Your proof should include high-level descriptions of a Turing Machine that can simulate the {\bf load} and {\bf store} instructions. Your description should also explain how you represent memory on the tape.
\answer{Your answer here}
\item Is the programming language consisting of just the {\bf load} and {\bf store} instructions above a {\em universal programming language}? (That is, is it possible to express all possible algorithms using this language.) If it is, prove it (by explaining how you could implement a universal Turing Machine using the {\bf load/store} language. If it is not, explain convincingly why not, and describe the simplest modifications needed to make the language a universal programming language.
\answer{Your answer here}
\end{enumerate}
\problem{Minds and Machines} Many people find the suggestion that a human mind is no more powerful than a Turing Machine to be disturbing, but there appear to be strong arguments supporting this position. For example, consider this argument:
\begin{quote}
The brain is a collection of 100 billion neurons. Each neuron is a cell that has inputs (known as {\em dendrites}) and outputs (synapses that emit neurotransmitter chemicals). The output depends on the inputs in a deterministic way that could be simulated by a Turing Machine. The connections between neurons could also be simulated by a Turing Machine. Since all components of the brain could be simulated by a Turing Machine, the brain itself could be simulated by a Turing Machine. Hence, a human mind is no more powerful than a Turing Machine.
\end{quote}
Write a short essay that counters this argument (although many books have been written on this question, you should limit your response to no more than one page). If you reject the premise of this question either because you do not find it disturbing to think of your mind as a Turing Machine, or you feel that the only way to counter this argument is to resort to supernatural (e.g., religious) notions, you may replace this question with Sipser's Problem 5.13.
\answer{Your answer here}
\end{document}