

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!


Dear students, This is your third and final assignment for this course that accounts for 6 0% of your total marks for the course. Problem 1 Consider the following languages over Σ = {0,1}.
Problem 2 This problem concerns languages over the alphabet Σ = {1}. For any two integers q,r ≥0, define the language Lr,q over Σ as Lr,q ={1mq+r^ : m ≥0}={1q,1q+r,12q+r,...}. For instance, L1,3 ={1,1111,1111111,...}. (a) Show that for every q and r, the language Lr,q is regular. (b) Show that if L is a regular language over Σ, then L can be written as L = Lr1,q ∪ Lr2,q ∪···∪ Lrk,q ∪ L 0 , where 0 ≤ r1 < ··· < rk are integers and L 0 is a finite set. Problem 3 : Suppose the following PDA P = ({q, r}, {0,1}, {Z 0 , X}, δ, q, Z 0 , ∅) is given: 0, Z 0 /XZ 0 1, Z 0 /ϵ 0, X /XX 1, X /XX 1, X /X ϵ, X/ϵ Start ϵ, X /ϵ Convert P to a PDA P′ with L(P′) = N(P). Problem 4 : Convert the grammar S → 0S1 | A A → 1A0 | S | ϵ to a PDA that accepts the same language by empty stack. Problem 5 : Consider the following grammar: S → ASB | ϵ A → aAS | a B → SbS | A | bb a. Eliminate all ϵ-productions. b. Eliminate all unit productions from the resulting grammar in a). c. Eliminate all useless symbols from the resulting grammar in b). d. Put the resulting grammar in c) in Chomsky Normal Form. q (^) r