Directions: Each of the questions 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.
Questions are in black, answers in blue.
TRUE. If we have machines M and N with L(M)=A and L(N)=B, then we can test an input w for membership in A intersect B by first running M on w and then, if that accepts, running N on w. If w is in both A and B this will accept, otherwise it will not (it might either run forever or reject).
FALSE. This is a trick question -- no language is equal to its own complement, and so this set of machines is empty. The empty set is recursive and thus not r.e.-complete. The Rice-Myhill-Shapiro Theorem is not applicable here because the property of languages in question is trivial, in that no languages have it.
TRUE. We know how to solve this problem -- convert the NFA's to DFA's, make a single DFA whose language is the symmetric difference of L(N1) and L(N2), and test this DFA's language for emptiness. The DFA we build has at most 22n states, so the emptiness test takes O(22n) time. We know that 22n is a primitive recursive function, and we proved on an earlier semester's HW that any function that runs in primitive recursive time is itself primitive recursive.
TRUE. The language overline(A) is co-r.e.-complete, and hence it is a co-r.e. language. Since B is reducible to overline(A), B must be co-r.e. itself. Thus if B were r.e., it would be both r.e. and co-r.e. and thus recursive. B thus cannot be r.e.-complete because r.e.-complete langauges are r.e. and not recursive.
TRUE. Given a statement and an alleged proof, it is easy (certainly recursive) to check whether the proof proves the statement. So we can test membership of a formula φ in EASY-THEOREM by generating all strings of length at most n2 to see whether any of them is a proof of φ. If any of them is, we return true -- if none of them are, we return false. This test can be performed by a TM that always halts, so the set is recursive.
TRUE. We have an algorithm to test a grammar to see whether it can
generate any strings. We assemble a set of nonterminals that are able
to generate strings of terminals. We begin this set with any nonterminals
that can generate a string of terminals directly by a rule of G. Then
we make a succession of passes over the rules, looking for any nonterminal
not in the set that generates a string (by a single rule) that consists only
of terminals and of nonterminals already in the set. If we find such a
nonterminal we add it to the set and repeat the process. If we fail to find
such a set after checking all rules we conclude that our set is the correct
one and return true iff S is in the set.
This is polynomial time because our number of passes is limited by the
number of nonterminals in G (since on each pass we either add one or more
nonterminals to the set or we finish). The time of a pass is at most
proportional to the length of all the rules of G. So if the whole grammar
is given as a string of length n, we decide the problem in time
O(n2).
[∃x:∀y: Sphere(x) implies Small(y)]
implies
[(∃x: Sphere(x)) implies (∀y: Small(y))]
is valid for Tarski's World.
FALSE. Consider a world where there exist a sphere, a non-sphere,
and a non-small object. (Say a small sphere A and a large cube B.)
The premise of the given formula is true because we can let x be B.
Then for any object y, small or not,
the implication "Sphere(B) implies Small(y)" is
true because its premise is false.
But for this world the conclusion is false. The conclusion's
premise is true because a shpere exists, namely A. But the conclusion
of the conclusion says that everything is small, which is false.
Last modified 20 November 2003