retagged by
8,950 views
3 votes
3 votes

A given grammar is called ambiguous if

  1. two or more productions have the same non-terminal on the left hand side
  2. a derivation tree has more than one associated sentence
  3. there is a sentence with more than one derivation tree corresponding to it
  4. brackets are not present in the grammar
retagged by

4 Answers

1 votes
1 votes

A grammar is said to be ambiguous if it can produce more than one parse tree for a particular sentence; this occurs when two different sequences of leftmost (or rightmost) derivations can produce the same sentence from the same start symbol.

Reference:

So, the correct answer is $(C).$ 

edited by
0 votes
0 votes
option C) is the correct answer, A grammar is said to be ambiguous if for a string it is having more than one parse tree.
Answer:

Related questions

5 votes
5 votes
4 answers
1
Satbir asked Jan 13, 2020
3,819 views
In a two-pass assembler, resolution of subroutine calls and inclusion of labels in the symbol table is done duringsecond passfirst pass and second pass respectivelysecond...
3 votes
3 votes
3 answers
2
Satbir asked Jan 13, 2020
5,122 views
The number of tokens in the following C code segment isswitch(inputvalue) { case 1 : b =c*d; break; default : b =b++; break; }$27$$29$$26$$24$
3 votes
3 votes
3 answers
3
Satbir asked Jan 13, 2020
3,778 views
Given the grammar$s \rightarrow T ^{\ast} S\ \mid T$$T \rightarrow U+T\ \mid U$$U \rightarrow a \mid b$Which of the following statements is wrong?Grammar is not ambiguou...
1 votes
1 votes
3 answers
4
Satbir asked Jan 13, 2020
2,294 views
A grammar is defined as$A \rightarrow BC$$B \rightarrow x \mid Bx$$C \rightarrow B \mid D$$D \rightarrow y \mid Ey$$E \rightarrow z$The non terminal alphabet of the gram...