CMPSCI 601: Theory of Computation
David Mix Barrington
Summer, 2003
Midterm Exam
Posted 28 July 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.
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 (non-negative)number,
and w denotes a string.
Remember that N is the set of all numbers, which we may also think
of as the set Σ* of all strings.
- Question 1 (15):
The language {(M,w,x): M on input w halts with an output other than
x} is r.e.-complete.
- Question 2 (10):
The language {(G,w): w is in L(G)} is r.e.-complete.
- Question 3 (15):
The language {n: L(Mn) is recursively enumerable} is regular.
- Question 4 (20):
Every primitive recursive function is computable in polynomial time.
- Question 5 (10):
If A is any non-empty set of Turing machines, there exists M in A
such that L(M) is not the empty set.
- Question 6 (10):
If A ≤ FO-THEOREM, then A is recursively enumerable.
- Question 7 (20):
The formula
[∃ x: ∀ y: Sphere(y) implies (Larger(x,y)]
implies
[∀y: not Sphere(z) or (exist; w: not Larger(z,w))]
is valid for Tarski's World.
Crib Sheet:
- L(M) is the set of numbers n such that M halts on input n with output 1.
Note that the set {Mn: n is in N} contains all
possible Turing machines in some standard encoding and that each
Mn is a valid Turing machine.
- 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.
- The language
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.
- The language
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.
- The Bloop programming language is defined in terms of basic operations
and bounded loops. The Floop programming language also has free loops.
- The class P is the set of all languages whose decision problem
can be solved by a Turing machine that runs in a time polynomial in the input
size.
- The language FO-THEOREM is the set of statements of first-order logic
theory that are provable from the first-order axioms.
- As a first-order structure, N is the set N of numbers
together with the standard definitions of equality, order, addition,
multiplication, and exponentiation of numbers.
- In Tarski's World, an object is never larger than
itself. Larger(a,b) means ``a is larger than b''.
Last modified 28 July 2003