Q1:
Consider the following ambiguous CFG.
S -> S+S | S*S | number
number -> 0|1|2|3..|9
Expression= 9 + 4 + 7 * 5 * 2
a – Find the result of expression using Derivation Tree.
b – Find the result of expression using Polish Notation.
Q2:
Consider the language L expressed by (a+b)*a defined over S = {a, b}. Draw FA and construct the CFG corresponding to the language L.
Deadline:
Your assignment must be uploaded on or before February 13, 2014