1,244 views

3 Answers

Best answer
5 votes
5 votes

A language is a inherently ambiguous there is not exist any unambiguous grammer.

Ref : https://en.wikipedia.org/wiki/Ambiguous_grammar#Inherently_ambiguous_languages

Now in option (a) , the language generated by this grammer is

L = { am bn dl | m = n} U { am bn dl | n=l} 

let L1 = { am bn dl | m = n} & L2 = { am bn dl | n=l}

So here the language itself there is a conflict requirement for its string. L1 is the set of strings where number of a's and b's are same while L2  is the set of string where number of b's and d's are same. Strings of type an bn dn will have two parse tree.

There is no unambiguous grammar for it. 

Option (b) language generated by this is

L = { ambn | n>m } U { (a+b)* } = (a+b)*

So for this language you can definitely give unambiguous grammer and even this language is regular and regular language do not posses unambiguity.

S->aS|bS|^ is  unambiguous grammar for it.

Only Grammer given in Option (a) generates inherently ambiguous language

selected by
0 votes
0 votes
check the grammar,and try to evaluate the grammar ,such a way that it will derive a language in this format {a^nb^nc^m}union {a^nb^mc^m} ,then it will be called inherently ambiguos.Option A will derive language familiar the format which i have given.so Option A is answer.
0 votes
0 votes
I think the answer should be both a & b.

In case of a: S->AB->aAbB->abB->abdB->abd

S->CD->aCD->aD->abDd->abd

In case of b:

S->AB->aAbB->abB->abbB->abb

S->CD->aCD->aD->abB->abbB->abb

Related questions

0 votes
0 votes
0 answers
2
Deepalitrapti asked Jul 17, 2018
166 views
0 votes
0 votes
0 answers
3
Deepalitrapti asked Jul 17, 2018
208 views