For the same input string, which of the following options is true in the case…

2025

For the same input string, which of the following options is true in the case of ambiguous grammar?

(i) two different parse trees

(ii) two leftmost derivations

(iii) two rightmost derivations

(iv) leftmost and rightmost derivations are different

  1. A.

    (i), (ii), (iii) are true; (iv) is false

  2. B.

    (i) is true; (ii), (iii), (iv) are false

  3. C.

    (i), (iv) are true; (ii), (iii) are false

  4. D.

    (i) is false; (ii), (iii), (iv) are true

Attempted by 47 students.

Show answer & explanation

Correct answer: A

An ambiguous grammar is defined by having at least one string with multiple parse trees. Therefore, statement (i) is true. Distinct parse trees correspond to distinct leftmost derivations and distinct rightmost derivations, making statements (ii) and (iii) true as well. Since ambiguity implies multiplicity in all three forms of derivation, Option 0 correctly groups these true statements.

Explore the full course: Isro