



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




CS 172: Computability and Complexity, Spring 2008 S. A. Seshia and A. Kulkarni
February 26, 2008
Instructions:
This exam is closed-book, open-notes. Please turn off and put away electronic devices such as cell phones, laptops, etc.
You have a total of 60 minutes. There are 4 questions worth a total of 100 points. The questions vary in difficulty, so if you get stuck on any question, it might help to leave it and try another one.
Answer each question in the space provided below the question. If you need more space, you can use the reverse side of that page. You can use without proof any result proved in class, in Sipser’s book, or during discussion sections, but clearly state the result you are using.
Do not turn this page until the instructor tells you to do so!
For each of the following questions, state TRUE or FALSE. Justify your answer in brief, indicating only the “proof idea” or counterexample, drawing an annotated picture if needed.
(a) If the language L is context-free, then LR^ is also context-free. (Recall that LR^ is the language comprising reversals of all strings in L.)
(b) The class of regular languages is closed under the symmetric difference operator ⊕. (Definition: For any two sets A and B, A ⊕ B is the set of all items which are in either A or B but not both.)
(c) Let Σ = { 0 , 1 }. Every language recognizable by a 1 -state NFA is recognizable by a DFA with 1 state.
Let Σ = { 0 , 1 , +, =}. Consider the language L where
L = {a=b+c | a, b, c ∈ { 0 , 1 }∗^ where a = b + c if a, b, c are interpreted as
unsigned binary integers and + and = are interpreted as addition + and equality =}
For example, the string 10=01+01 is in L (2 = 1 + 1). But the string 10=11+01 is not in L ( 2 6 = 3 + 1).
Show L is not regular.
An N -constrained pushdown automaton (N-CPA) is exactly like a pushdown automaton except that it can only perform at most N push, pop, or swap operations. (A swap is a simultaneous push and pop.) The acceptance condition and unbounded stack are just as in the PDA.
Consider a 1000 -CPA. Define the language class C 1000 −CPA as the set {L | L is a language recognized by a 1000-CPA}.
Similarly, the set of all regular languages is Creg, and the set of all CFLs is Ccf.
One of the following relationships is TRUE. State which one, and provide a complete proof for the truth of this statement. You don’t need to justify falsity of the other statements.
If you convert a DFA/PDA to a CPA or vice-versa, specify your construction precisely using the 5 -tuple/ 6 -tuple notation.