Solutions are in blue.
Directions: Each question is a statement that may be true or false. Please state whether it is true or false -- you will get five points for a correct boolean answer and there is no penalty for a wrong guess. Then justify your answer -- the remaining points will depend on the quality and validity of your justification. Problems with higher point values will tend to require longer justifications, but this will not always be the case.
Crib sheet: I will state some useful definitions after the questions -- these will also be available during the in-class exam.
Types of variables: Unless otherwise indicated, a variable A or B denotes a language, D denotes a DFA, G denotes a context-free grammar, M denotes a Turing machine, n denotes a number, and w denotes a string. Remember that N is the set of all numbers, which we may also think of as the set Sigma* of all strings.
This is TRUE. From the fact that A is reducible to A-bar, it follows that
A-bar is also reducible to A. This is because if f is a total recursive
function such that n is in A iff f(n) is in A-bar, it is immediate that for
the same f, n is in A-bar iff f(n) is in A.
Since A-bar is reducible to the r.e. set A, A-bar is itself r.e., and
because A is thus shown to be both r.e. and co-r.e., A is recursive.
This statement is TRUE. Call the given set B. We prove that both K and K-bar
are reducible to B. Then since K is not co-r.e., B is not co-r.e., and since
K-bar is not r.e., B is not r.e. either. The reductions closely mimic the
two cases of the Rice-Myhill-Shapiro proof, one in lecture and the other on
HW#3.
To reduce K to B, choose a machine M' such that M' is in B. The function
f takes an input n and creates a machine Mf(n) as follows.
Mf(n) takes input x, runs Mn on n, and then runs M' on
x if that halts. So L(Mf(n)) is L(M') if n is in K and is empty
otherwise. Thus n is in K iff f(n) is in B.
Reducing K-bar to B is the perhaps the most difficult task
on this practice test.
Kazu and I came up with two relatively simple constructions each in a short
time, but neither is a obvious imitation of things we've seen.
This is TRUE. The decision procedure for this language needs to look at the graph of the DFA D and decide whether there is any path from the start state to any final state, a series of graph-reachability questions that can certainly be answered by an always-halting TM.
This is FALSE. If A = K and B is recursive, then both sets are r.e. but we know A does not reduce to B because K is not recursive. Since there is an example where the premise is true but the conclusion is false, this is not a valid implication.
This is FALSE. One way to prove this is to quote the Rice-Myhill-Shapiro
theorem. This language does have the property that if two machines M and M'
are equivalent (if L(M) = L(M')), then either both are in it or neither is in
it. There are examples of machines in it, such as those with empty L(M),
and examples of machines not in it (for example, if L(M) = {01}). So the
RMS theorem tells us this language is not recursive. Note that to get full
credit for this argument, you must quote the theorem correctly and argue
that all the hypotheses are satisfied -- this includes giving an example of
a machine not in the language.
A direct proof is not much harder than this anyway. Let M' be a machine
such that L(M) = {01}, so M' is not in the language. The empty-language
machines are in this language. So given any number n, we can define
Mf(n) to be the machine that on input x runs Mn on n
and then runs M' on x. L(Mf(n)) is empty if n is not in K and
equal to L(M') if n is in K, so f is a reduction from K to this language and
thus this language is not recursive.
This is FALSE, because in fact FO-VALID is r.e.-complete. As I said in Lecture 15, this follows from our proofs in lecture that FO-VALID is equal to FO-THEOREM, and that FO-THEOREM is r.e.-complete. The key step in the latter proof is reducing K to FO-THEOREM by making f(n) a statement saying that it is provable from NT that there is a halting computation of Mn on input n.
This is TRUE and is proved as follows using rules available in Fitch.
Last modified 27 March 2003