Professional Documents
Culture Documents
Aut Assg03
Aut Assg03
Assignment 03
Deadline: 17 January 2024 11:00 PM
Instructions:
Assignment:
Solve the following problems. The solutions may or may not be available online. If they are
available, try to understand them before re-phrasing them in your own words.
Question # 1:
Consider the CFG
S aS | bb
Prove that this generates the language defined by the regular expression a*bb.
Question # 2:
Consider the CFG:
S XYX
X ax | bX | A
Y bbb
Prove that this generates the language of all strings with a triple b in them, which
is the language defined by (a + b)*bbb(a + b)*.
Question # 3:
Find a CFG for each of the languages defined by the following regular expressions:
(i) ab*
(ii) a*b*
(iii) (baa + abb)*
Question # 4:
Convert the following CFGs with unit productions into CNF:
(i) S X
XY
YZ
Z aa
(ii) S SS | A
A SS I AS I a
Question # 5:
Show that this PDA accepts the language of all words with an even number of
letters (excluding A). Remember, it is also necessary to show that all words with
odd length can never lead to ACCEPT.