Assignment # 2
Course Name: Theory of Automata II Submission date: 30 May 2020
Instructor Name: Dr. Muhammad Younas Marks: 50 marks
Questions # 1.
Explain the term “pumping lemma” , also describe (5) five examples of pumping
lemma to explain its application.
Questions # 2.
a) Convert the following CFG into Chomsky Normal Form (CNF)
S ASA | aB
A B | S
Bb|^
b) construct an FA that accepts the grammar
S→abA
A→baB
B→aA|bb
Questions # 3.
a) Prove that L = {anbn : n > 0} is not regular.
b) language EQUAL, of strings, defined over Σ={a,b}, with number of a’s equal
to number of b’s, i.e. EQUAL = {Λ , ab, aabb, abab, baba, abba,…} prove
that the above language is non-regular
Questions # 4.
a) Give a simple description of the language generated by the grammar with
productions
I. II.
SAa | ʎ SAa | ʎ
AbS AB
B Aa
b) Find grammars for {a, b} that generate the sets of
I. all strings with exactly one ‘a’
II. all strings with at least one ‘a’
III. all strings with no more than three a’s.
IV. all string with even no of ‘a’ even no. of ‘b’ say EVEN-EVEN
Questions # 5.
Consider the following PDA. Write the Language accepted by it. (show all process)