The GATE Grind

GATE 2007 CS – Question 78

Theory of Computation · Context-Free Grammars and Pushdown Automata · 2 marks · Multiple choice

CFG has nonterminals {S, A, B}, terminals {a, b}, start S, rules $S\to aB\mid bA$, $B\to b\mid bS\mid aBB$, $A\to a\mid aS\mid bAA$. Which string is generated?

  1. aaaabb
  2. aabbbb
  3. aabbab
  4. abbbba

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (C) aabbab

Explanation

We are sorry we couldn't write detailed soluition for this, we are working on it!, please consider asking your own AI, its just 2-3 clicks with very minimum effort

More Context-Free Grammars and Pushdown Automata questions

All Context-Free Grammars and Pushdown Automata questions →