TRUE. Call this language A. To see that A is r.e., we must design a
machine MA that takes input (M,w,x) and halts with output
1 iff (M,w,x) is in A. This machine simulates M on w, and if it halts,
prints a 1 if the output is not x and loops forever if the output is
equal to x. If M does not halt on w, MA does not accept, so
it accepts iff its input is in A.
The more interesting direction is to reduce K to A and thus show that
every r.e. language reduces to A. We need a reduction f such that for any
number n, f(n) is in A iff n is in K. Note the type of f(n) carefully,
as it should be a triple (M,w,x) where M is a machine and w and x are strings.
If n is any number, we need to design an M, w, and x such that
Mn halts on input n iff M halts on w with an output other than
x. Naturally M should begin by simulating Mn on input n, after
erasing its input. We can have it print a 1 if Mn halts on n,
and of course it will print nothing otherwise. So all we have to do is
to specify x, which can be anything other than 1.
Thus we define f(n) to be the triple (M,0,0) where M is the machine
described above. If n is in K, this M will halt on input 0 with an output
other than 0. If n is not in K, it will not halt at all. So n is in K
iff (M,0,0) is in A and we have the reduction we need from K to A.
Since A is r.e. and K ≤ A we have shown that A is r.e.-complete.
FALSE. This language is recursive (in fact it is even in P) and recursive
languages cannot be r.e.-complete.
To see that it is recursive we need to show an algorithm that inputs G and
w and determines whether w is in L(G). Sipser does this in a simple but
hideously inefficient way, by testing out all possible derivations in G that
lead to strings of length at most that of w. More practically, as shown in
lecture, we can use the poly-time CKY algorithm that tests for each A, i, and
j whether the non-terminal A can derive the substring
wi...wj of w, using dynamic programming to avoid
answering the same subproblem more than once.
TRUE. This was a trick question intended to see whether you could interpret a simple language expressed in a complicated way. For any Turing machine M, L(M) is a recursively enumerable language. Hence for any number n, L(Mn) is a recursively enumerable language, so any number n is in the given language. And any string of ones and zeros represents a number, unless we disallow leading zeros. So the language in question is the set of all binary strings, if we allow leading zeros, or the language 0 + 1(0+1)*, if we don't, and both these languages are regular.
FALSE. We proved in homework that a language is Bloop-computable (primitive
recursive) iff it is computable by a Turing machine within some
Bloop-computable time bound. Everyone misinterpreted Bloop to conclude
that the bounded loops in Bloop could only run for polynomial time. But
the index of a Bloop loop need not be the input size. For example,
computes the function 2n, and a future statement
Every exponential-time computable function is primitive recursive,
and by the Time Hierachy Theorem there are exponential-time functions
that are not computable in polynomial time. So the statement is provably
false.
x = 1;
loop n times
x = x * 2;
return x;
loop x times
could then run 2n times.
FALSE. This is another trick question, which I'm glad to see most of you saw through. All we know about A is that it is non-empty, which means that it contains at least one Turing machine M. But there is no reason that M couldn't have an empty language, and if M is the only machine in A (or if all the other machines in A also have empty languages) then we have a counterexample to the given statement.
TRUE. We know from lecture that FO-THEOREM is r.e.-complete and therefore
is r.e. -- even if we didn't remember this it is clear that since a statement
φ is in FO-THEOREM iff there exists a first-order proof of φ, we
could have a Turing machine search through all possible sequences of statements
and accept iff one of them is a proof of φ. This machine's language would
be FO-THEOREM, proving that FO-THEOREM is recursively enumerable.
We know that any language reducible to an r.e. language is itself r.e.,
so the statement is true.
[∃ x: ∀ y: Sphere(y) implies (Larger(x,y)]
implies
[∀z: not Sphere(z) or (exist; w: not Larger(z,w))]
is valid for Tarski's World.
TRUE. I will present two proofs, one straightforward and one using
a sort of "back door".
Back Door proof:
I call this a "back door" proof because the assumption in 1 is never used
to prove the conclusion in 6, since the conclusion turns out to be valid
in Tarski's World itself.
Straightforward proof:
Last modified 28 July 2003