Computer Science · Theory of Computation
Consider a context-free grammar with the following productions: S → AA | B A → aA | Aa | b B → aBaa | b Where S is the start symbol, A and B are non-terminals, and a and b are terminals. The language generated by this grammar is:
- 1The set of all strings over {a, b} containing at least two a's
- 2{a2ibajbak | i, j, k ≥ 0} ∪ {anba2n | n ≥ 0}
- 3{aiba2jbak | i, j, k ≥ 0} ∪ {anba2n | n ≥ 0}
- 4{aibajbak | i, j, k ≥ 0} ∪ {anba2n | n ≥ 0}✓
Correct answer
{aibajbak | i, j, k ≥ 0} ∪ {anba2n | n ≥ 0}
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