


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The instructions and problems for a theory of computation final examination. The exam is closed notes and lasts for two hours. It includes questions about proving the existence of a total, computable function and determining the recursiveness of certain sets.
Typology: Exams
1 / 4
This page cannot be seen from the preview
Don't miss anything!



1 Instructions
You may bring a single 8.5x11 inch (or A4) sheet of pap er with anything you want on it. Other than this, the exam is closed notes. There are 100 p oints p ossible (with an additional 10 p oints for an extra credit problem). This is a two hour examination, though you may feel free to use less time if you see t to do so! Bear in mind that incomplete answers may still receive partial credit.
2 The Problems
Problem 1 (10 points) Prove that there is a total, computable function m(x) such that, for al l x Wm(x) = fy : gcd(x; y ) = 1 g
where gcd(x; y ) is the greatest common divisor of x and y.
Answer: By the s-m-n theorem, de ne a total, computable function m(x) such that
m(x) =
1 if gcd(x; y ) = 1 " otherwise
By construction, Wm(x) is the desired set.
Problem 2 (5 points) Is the set C = fe : e (e) "g recursive? Is it recursively enumerable? Justify your answer.
Answer: C is a set of indexes which contains an index for the function which diverges everywhere. By the Rice-like theorem, this makes it pro ductive, and hence neither recursive nor r.e.
Problem 3 (10 points) Prove that the set F in = fe : We is nite g is not recursive.
Answer: This is an index set, since if e = f and e 2 F in then We = Wf and so Wf is nite, so f 2 F in. Hence F in is non-recursive by Rice's theorem.
Problem 4 (10 points) Give an example of an oracle O (other than SAT) such that SAT is decidable in polynomial time relative to O (i.e. S AT 2 P (O )). (Hint: SAT is N P complete.)
Answer: Let O b e any N P complete set (other than SAT). Since O pm S AT and S AT 2 P (S AT ), it follows that S AT 2 P (O ).
Problem 5 (5 points) Arrange the fol lowing complexity classes according to which is a subset of which: P ; LO G; N P S P AC E ; E X P =
c D^ T^ I^ M^ E^ (2n
c ); N P ; P S P AC E.
Answer: LO G P N P P S P AC E = N P S P AC E E X P
Problem 6 (10 points) List the inclusions in Problem 5 which are known to be proper (there are at least 4).
Answer: LO G P S P AC E , LO G N P S P AC E , P E X P , and LO G E X P ,
Problem 7 (10 points) I have a proof which shows that P 6 = N P by diagonalizing over al l sets in P. Unfortunately, it's too smal l to put on this examination. Do you believe me? Why or why not?
Answer: Not a bit. The Baker-Gill-Solovay theorem shows that there are oracles relative to which P = N P , and pro ofs by diagonalizatio n relativize. In other words, my pro of would imply that P (A) 6 = N P (A) for all A, even though Baker-Gill-Solovay showed a B such that P (B ) 6 = N P (B ). This contradicts my claim.
Problem 8 (10 points) Let A B = fx 0 : x 2 Ag [ fx 1 : x 2 B g. Prove that A pm A B for any sets A and B.
Answer: Consider the function f (x) = x 0 (or f (x) = 2 x under the usual enco ding of binary numb ers). Clearly, x 2 A if and only if f (x) 2 A B , for any sets A and B. Since f is computable in p olynomial (indeed, in linear) time, A pm A B via f as required.
Problem 9 (5 points) For which complexity classes are the fol lowing problems complete (with respect to pm reductions)?
Satis ability: Given a boolean formula, is there some assignment of truth values to its variables which makes the formula true?
3 Extra Credit
Problem 13 (10 points) How would you modify the URM model in such as way as to de ne the class P? How would you de ne P using this modi ed URM?
Answer: Have xed width registers (a single bit is enough). Now de ne P as the class of problems recognizable in O (nc^ ) steps on this machine, where n is the numb er of registers which contain the input, and c is some constant. Other answers are p ossible, though harder to do correctly.