2,378 views
3 votes
3 votes
Can a DCFG grammar be Ambiguous? If so please provide an example.

2 Answers

2 votes
2 votes
Yes Grammars  can be ambiguous but language can't be.

For Example you can see the Gate 2003 -cs Ques 90
1 votes
1 votes

Yes, it can. Have a look at this balanced parenthesis CFG: 

S-->(S)/SS/null.

We have more than one parse trees here, you can also draw a DPDA for this grammar. So you have a CFG that is in fact, ambiguous. 

Related questions

1 votes
1 votes
2 answers
1
0 votes
0 votes
2 answers
3
suneetha asked Dec 22, 2018
340 views
i thought that it is the language where both start and end symbols are same and i got 65 but the ans is 29
0 votes
0 votes
1 answer
4