- GATE CS
- 2026–27 pattern practice
- Theory of Computation
- Context-free grammars
- Easy
Which language is generated by the grammar ?
Context-Free Languages
Pick an option to check your answer.
Answer: A. Solution
Each use of adds one on the left and one on the right, and stops. So the strings are — exactly with .
Why not the others
- allows unequal counts.
- gives , which this grammar cannot derive.
- excludes , which the grammar generates.