retagged by
9,113 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

4.1k
views
4 answers
5 votes
Satbir asked Jan 13, 2020
4,077 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 pass and first pass respectivelyfirst pass
5.4k
views
3 answers
3 votes
Satbir asked Jan 13, 2020
5,386 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.9k
views
3 answers
3 votes
Satbir asked Jan 13, 2020
3,903 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 ... $^{\ast}$ and $+$ happensNone of these
2.4k
views
3 answers
1 votes
Satbir asked Jan 13, 2020
2,368 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 grammar is$\{A,B,C,D,E\}$\{B,C,D,E\}$\{A,B,C,D,E,x,y,z\}$\{x,y,z\}$