- Back to Home »
- CS402 Assignment no 5 Fall 2012 Full Solution
Posted by : Anonymous
Thursday, 24 January 2013
Q 1: Marks [5+8]
S XYZ
X aX | bX | ^
Y aY | bY | ^
Z aZ | ^
a. Remove all NULL productions from the given grammar.
b. Remove all UNIT productions from the grammar obtained in part (a).
Q 2:
S mno | mA | nB | oC
A mX | ^
B nY | ^
C oZ | ^
X mn | m
Y no | n
Z om | o
Draw the total language tree for above CFG. Marks [7]
Best of luck!
S XYZ
X aX | bX | ^
Y aY | bY | ^
Z aZ | ^
a. Remove all NULL productions from the given grammar.
b. Remove all UNIT productions from the grammar obtained in part (a).
Q 2:
S mno | mA | nB | oC
A mX | ^
B nY | ^
C oZ | ^
X mn | m
Y no | n
Z om | o
Draw the total language tree for above CFG. Marks [7]
Best of luck!