All mock tests are FREE till 31 December — register to save your progress
Unit 8 · Theory of Computation and Compilers Paper 2 CS · June 2024 (Cancelled Exam)

An ambiguous grammar is one which has:
A. More than one derivation
B. More than one leftmost derivation
C. More than one rightmost derivation
D. More than one parse tree
E. More than one syntax tree
Choose the correct answer from the options given below:

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: C. D and E Only

Explanation

A grammar is ambiguous if some string has more than one parse (syntax) tree (equivalently, more than one leftmost or rightmost derivation). Merely having several derivations is normal. The keyed answer chooses the parse-tree/syntax-tree definitions.

More Theory of Computation and Compilers questions