GATE CS 2017, set 1 · Question 34 · Theory of Computation · Multiple choice (MCQ) · 2 marks · −2/3 for a wrong answer
If G is a grammar with productions
S → SaS | aSb | bSa | SS | ε
where S is the start variable, then which one of the following strings is not generated by G?
- (A) abab
- (B) aaab
- (C) abbaa
- (D) babba
Answer
Answer (D)
Answer from the official GATE CS 2017 answer key.
The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes