381-2006fa-final - recursive set an r.e set not r.e Give...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 381 Final Exam 9-11:30 Wed Dec 13 Fall 2006 Closed Book Hollister B14 All problems should be straight forward. Partial credit will depend on clarity and conciseness of your answer. Please do not put down correct but irrelevant information. 1. Write a regular expression describing all strings of a’s and b’s not containing the substring aab. 2. Let { } | and i j k L a b c k i k j = < < . Either construct a context-free grammar for L or prove that L is not a context-free language using the pumping lemma. 3. Given a context-free language L and a regular set R, prove that the set { } 1 1 2 2 3 4 3 5 6 2 1 2 1 2 1 2 2 | L and n n n n n a b b a b b a b b a b b a a a b b b R - L L L is a context-free language. 4. Let L be the set of all valid computations of a Turing machine M. Using the operations of h, h -1 , and intersection with a regular set, explain how to convert L to L’ where L’ consists of only the first two ID’s of the valid computation. 5. Is the set L={(M,x)|Turing machine M does not halt on input x} a regular set? a cfl? a
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: recursive set? an r.e. set? not r.e.? Give short proofs of your answers. You may use any theorem proved in class. 6. Consider a reduction of problem A to problem B. What is the most precise claim you can make about problem B for each of the following situations? a) A is NP-complete and the reduction is in polynomial time. b) A is in polynomial time and the reduction is also in polynomial time. c) A is NP-complete and the reduction is in Pspace. d) A is in nondeterministic polynomial time and the reduction is in polynomial time. e) A requires exponential time and the reduction is in polynomial time. f) A is Pspace complete and the reduction is in Pspace. 7. What is a quantified Boolean formula? (Ten words or less) Given an algorithm for deciding if a QBF is true. Is the QBF problem in P?, NP?, Pspace?...
View Full Document

Ask a homework question - tutors are online