Page 1 of 1

Question Let I={a,b,c,d), and consider the following CFG G, with non-terminals S, A,B,C,D, with starting non-terminals,

Posted: Sun May 15, 2022 1:10 pm
by answerhappygod
Question Let I A B C D And Consider The Following Cfg G With Non Terminals S A B C D With Starting Non Terminals 1
Question Let I A B C D And Consider The Following Cfg G With Non Terminals S A B C D With Starting Non Terminals 1 (24.67 KiB) Viewed 70 times
please answer both the parts of the above question, because
these are related to each other, i can't post them separately, its
a short question . please solve as soon as possible. i need them as
soon as possible...
Question Let I={a,b,c,d), and consider the following CFG G, with non-terminals S, A,B,C,D, with starting non-terminals, and with production rules S+AB C, A + Ab ab, Bcd cd, C+aCd and, DbDe be. In order to show that the grammar G is ambiguous one needs to provide an ambiguous string, namely a string in the language generated by the grammar (L(G)), that has two different parse trees. (a) Write down an ambiguous string in L(G). (b) Write down two different parse trees for the string. [2 marks] [4 marks]