CMPSCI 601: Theory of Computation
Offered through the PEEAS distance learning program
Homework Assignment #2
David Mix Barrington
Assignment posted Fri 26 Sept 2003
Due Wed 8 Oct 2003, faxed before 2:00 p.m. EDT
or express-mailed to arrive Thu 9 Oct 2003
Make sure you have read the statement on academic honesty
on the homework assignment index page.
- Question 1 (20): Let HANG be the language {(M,w): w in
H(M)} where H(M) is the hanging language from Question 5 of HW#1.
Prove that HANG is r.e.-complete.
- Question 2 (20): Here are two functions from N to N.
In each case either prove the function to be primitive recursive or prove
it to be not primitive recursive:
- (a,10) the "superfactorial" function SF(n), defined by SF(0) =
1, SF(n+1) = (SF(n)+1)!
- (b,10) the "hyperfactorial" function HF(n), defined by HF(0) = 1,
HF(n+1) = SF(HF(n)+1)
- Question 3 (10): A K-oracle TM is a Turing machine with an
extra oracle tape on which it may write a string and (in one step)
answer the question of whether that string is in the language K. A language
is said to be K-r.e. if it is equal to L(M) where M is a K-oracle TM. The
language KK is defined to be {M: M is a K-oracle TM and "M" is in L(M)}.
Prove that KK is K-r.e. complete under K-computable reductions. (A function
is K-computable if it is computed by some K-oracle TM that always halts.)
- Question 4 (40): A total order on the set
Σ* is a relation on that set that is anti-reflexive,
antisymmetric, transitive, and total. ("R is total" means that if x and y are
two different strings, either R(x,y) or R(y,x) is true.) A total order R
is computable if there exists an always-halting TM that decides whether
R(x,y) is true on input (x,y).
- (a,10) Define L(x,y) ("the lexicographic order") to be true iff either
x is shorter than y or x and y are the same length and there exist strings
t, u, and v (possibly empty) such that x = t0u and y = t1v. Define D(x,y)
"the dictionary order" to be true iff either x is a prefix of y (y = xz for
some nonempty z) or there exist strings t, u, and v (possibly empty) with
x = t0u and y = t1v. Prove that both L and D are computable total orders.
- (b,10) We say that y is the L-successor of x if L(x,y) and there does
not exist a string z such that
L(x,z) and L(z,y). We define "y is the D-successor
of x" similarly. Prove that the languages {(x,y): y is the L-successor of
x} and {(x,y): y is the D-successor of x} are each recursive.
- (c,20) Let T(x,y) be any computable total order on strings. Prove
that the language {(x,y): y is the T-successor of x} is a co-r.e. language.
Can you find a T such that T-successorship is not recursive?
Last modified 27 September 2003