viki
07-24-2010, 11:15 PM
Question: Mark:5+5+5+5
Consider the following Context Free Grammar (CFG)
S → aY | Ybb | Y
X → Λ | a
Y → aXY | bb | XXa
a) Is the CFG ambiguous, if Yes then justify your answer.
b) Draw a Total Language Tree (TLT) for the given CFG.
c) Convert the CFG into CNF.
d) Build the PDA corresponding to the CFG (in CNF) of part (c).
Consider the following Context Free Grammar (CFG)
S → aY | Ybb | Y
X → Λ | a
Y → aXY | bb | XXa
a) Is the CFG ambiguous, if Yes then justify your answer.
b) Draw a Total Language Tree (TLT) for the given CFG.
c) Convert the CFG into CNF.
d) Build the PDA corresponding to the CFG (in CNF) of part (c).