GATE CS 2026, set 2 · Question 29 · Theory of Computation · Multiple select (MSQ) · 1 mark · no negative marks
Which of the following grammars is/are ambiguous?
- (A) S → aSb | ε
- (B) E → E + E | E * E | id
- (C) S → aS | Sa | ε
- (D) S → aS | ε
Answer
Answer (B), (C)
Answer from the official GATE CS 2026 answer key.
The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes