Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Theory of Automata & Formal Languages

Assignment 03
Deadline: 17 January 2024 11:00 PM

Note: This assignment will be marked against CLO-3.

Instructions:

 Zero credit for no submission and submitted of any other work.


 Name your submission file <yourRegNo>_A3
 Submit in a word format file or pdf.

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
XY
YZ
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.

You might also like