retagged by
435 views

2 Answers

Best answer
2 votes
2 votes

Yes the Grammar S→SS/ab is ambiguous

The least possible string in the grammar is ab and  abab here only one parse tree is possible but we cann't conclude it as Unambiguos and next smallest string is ababab for this string 2 parse trees are possible 

So it is Ambiguous

selected by
2 votes
2 votes
derive string ababab.

it will have 2 derivations .

1. S->SS

         abS

         abSS

         ababS

         ababab

2.S->SS

        SSS

        abSS

        ababS

        ababab

 

Verify by drawing parse trees them.you will find 2 different trees.:D

Related questions

0 votes
0 votes
2 answers
1
rahul sharma 5 asked Oct 17, 2017
8,492 views
The productionsE - E+E | E-E | E*E | ida:) generates inherently ambiguous languagesb:) generates and ambiguous languagec:) is an ambiguous grammerd) none of these
1 votes
1 votes
2 answers
2
umang_16 asked Dec 16, 2016
641 views
Consider the grammar given below. It isE - T+E | TT - aa. SLR(1) but not LL(1)b. Not an operator grammarc. Ambiguousd. None of these
2 votes
2 votes
1 answer
3
0 votes
0 votes
1 answer
4