Which of the following grammars are ambiguous?

GATE · 2026 · CS · Set 2 · Computer Science & IT

Which of the following grammars are ambiguous?

  1. A.

    𝑆 → 𝑎𝑆𝑏 | epsilon

  2. B.

    E→ 𝐸 + 𝐸 | 𝐸 ∗ 𝐸 | 𝑖𝑑

  3. C.

    S→ 𝑎𝑆 | 𝑆𝑎 | epsilon

  4. D.

    S → 𝑎𝑆 | epsilon

Attempted by 84 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…