Skip to content

ISRO Scientist/Engineer CSE 2020Compiler Design › Not yet assigned to a topic

ISRO Scientist/Engineer CSE 2020 PYQ: A given grammar is called ambiguous if

A given grammar is called ambiguous if

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

Answer

(C) there is a sentence with more than one derivation tree corresponding to it

Approach

Recall the standard definition of ambiguity in formal language theory: a context-free grammar is ambiguous when at least one string in its language can be generated by two or more distinct parse (derivation) trees. Evaluate each option against this definition.

Reviewed by ISRO IQ Editorial Team.