Computer Science · Theory of Computation
Consider the following Context-Free Grammar (CFG): S → aB | bA A → b | aS | bAA B → a | bS | aBB Which language property is satisfied by all terminal strings generated by this CFG?
- 1Strings with an odd number of a's and even number of b's
- 2Strings with an odd number of a's and odd number of b's
- 3Strings with an even number of a's and even number of b's
- 4Strings with an equal number of a's and b's✓
Correct answer
Strings with an equal number of a's and b's
Download Single Question PDF
Save this question and verified answer as a clean study sheet with live clickable link.
Share with Friends & Study Groups
Challenge your peer aspirants on WhatsApp or Telegram to solve this question!
Preparing for Computer Science?
Practice full-length mock tests with real exam timers, instant score analysis, and all-India ranking.
Want more practice questions on Theory of Computation?
Solve complete topic-wise tests with detailed solutions on GkGet.
Related Practice Questions
Recommended practice questions in Computer Science · Theory of Computation