retagged by
1,234 views

2 Answers

Best answer
5 votes
5 votes

1. Is false let left recursive grammar 

A-->Aa/b

The language of this is (ba*) and for every string in it, there is a unique parse tree following the given grammar making it unambiguous. 

2. False 

A-->aAAb/€

https://cstheory.stackexchange.com/questions/22664/what-are-the-relationship-and-difference-between-ambiguous-grammars-and-non-dete

selected by
0 votes
0 votes

Both statements are False. ​​​​​​

Statement 1.  Consider a counter eg for statement 1 as

      A--> Aa | €

      The above grammar is left recursive but not ambiguous. 

Statement 2. Consider a counter eg for statement 2 as

      A-->AA | €

 The above grammar is ambiguous as epsilon can be generated by 2 ways (generating 2 different parse tress) .But the grammar is neither left nor right recursive.

 

Hence both statements are False. 

Related questions

0 votes
0 votes
1 answer
1
learner_geek asked Aug 5, 2017
1,301 views
To avoid left recursion can we do like this. I think this is incorrect way to do
2 votes
2 votes
3 answers
2
1 votes
1 votes
1 answer
3
4 votes
4 votes
1 answer
4