in Compiler Design retagged by
628 views
1 vote
1 vote

in Compiler Design retagged by
628 views

1 Answer

1 vote
1 vote
Best answer

Answer will be (C)

$\left \{ x^{a}y^{b}z^{c}| a=b (or) b=c \right \}$ generates NCFL and not DCFL. This grammar can generates ambiguous grammar (may or maynot inherently ambiguous grammar). When grammar is ambiguous, it cannot generates LL(k) grammar or LR(k) grammar

So,A),B),D) are correct option

And C)is incorrect

https://gateoverflow.in/1251/gate2007-53?state=edit-33996&show=33996#c33996

https://gateoverflow.in/96520/toc-cfl

​​​​​​​https://gateoverflow.in/154688/dcfl-and-ll-1?show=154688#q154688

selected by

4 Comments

Few Points :

{xaybzc|a=b(or)b=c} generates NCFL and not DCFL.

"is" instead of  "generates". The given set is a language, NOT a Grammar. (Question forming/framing mistake)

2. The language given in the Question is CFL but NOT DCFL, Hence No DPDA possible, So answer would be $C$. That's okay. 

This grammar(*language) can generates(*is generated by) ambiguous grammar (may or maynot inherently ambiguous grammar)(*definitely ambiguous grammar). When grammar is ambiguous, it cannot generates(*be) LL(k) grammar or LR(k) grammar

 The given language is indeed Inherently ambiguous language and that's why NO unambiguous grammar possible. So, Whatever Grammar we create for this language, will be Ambiguous.

We can't say "may or may not inherently ambiguous grammar(*language)" because If some language is NOT inherently ambiguous then for this language, some Unambiguous grammar will definitely be there.


Sometimes they make questions after getting high..pta nhi kya foonkte hain.

3
3
thanks :)
0
0

$\LARGE $is this correct grammar for above question$

As it is inherently ambiguous

0
0

Related questions

0 votes
0 votes
2 answers
1
0 votes
0 votes
1 answer
2
0 votes
0 votes
2 answers
3
0 votes
0 votes
1 answer
4