CMPSCI 601: Theory of Computation
David Mix Barrington
Spring, 2003
Practice Exam #1
Posted Sunday 23 March 2003
Solutions to be posted Wednesday 26 March 2003
Actual (in-class) exam is Monday 31 March 2003
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.
Note: Question 6
assumes knowledge of Lecture 15 (26
March 2003) or of Chapter 6 of [P].
(Please ignore my earlier reference to Question 1.)
The other questions assume only
knowledge of Lectures 1-13.
- Question 1 (10):
If A is r.e., and A is reducible to its own complement, then A is recursive.
- Question 2 (20):
The set {M: L(M) &ne N and L(M) &ne &emptyset} is neither r.e. nor co-r.e.
- Question 3 (10):
The set {D: L(D) is empty} is recursive.
- Question 4 (10):
If A and B are both r.e., then A is reducible to B (A &le B).
- Question 5 (15):
The set {M: for all w: w in L(M) iff wR in L(M)} is recursive.
- Question 6 (15):
The set FO-VALID, which is {&phi: &phi is true in all models of first-order
logic} is recursive.
- Question 7 (20):
The formula
"[forall x:(cube(x) implies small(x))] implies not[exists y:(cube(y) and
medium(y))]" is true in all models of Tarski's World.
Crib Sheet:
- L(M) is the set of numbers n such that M halts on input n with output 1.
- L(D) is the set of strings w such that D running on w finishes in an
accepting state.
- L(G) is the set of strings w such that w can be generated from G's start
symbol according to G's rules.
- A language is r.e. if it is equal to L(M) for some Turing machine M.
- A language is recursive if it is equal to L(M) for some Turing machine
M that always halts.
- A function f is total recursive if there is a Turing machine that always
halts and gives output f(n) on any input n.
- A is reducible to B if there exists a total recursive function f such
that for any n, n is in A iff f(n) is in B.
- A is r.e.-complete iff A is r.e. and for any language B, if B is r.e.
then B is reducible to A.
- The language K = {n: n in L(Mn} is r.e.-complete. (definition corrected 30 March 2003)
- The Bloop programming language is defined in terms of basic operations
and bounded loops. The Floop programming language also has free loops.
- If w is any string, wR is w written backward.
Last modified 30 March 2003