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]
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,
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
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,
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!