retagged by
10,949 views
5 5 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

4 Answers

3 3 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 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:
Position:
Show:

Related questions

8 8 votes
7 7 answers
8.3k
8.3k views
Satbir asked Jan 13, 2020
8,288 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...
12 12 votes
3 3 answers
9.6k
9.6k views
Satbir asked Jan 13, 2020
9,563 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$
5 5 votes
4 4 answers
6.4k
6.4k views
Satbir asked Jan 13, 2020
6,407 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...
2 2 votes
4 4 answers
3.6k
3.6k views
Satbir asked Jan 13, 2020
3,585 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...