edited by
219 views
3 votes
3 votes

Which of the given strings is/are NOT generated by the below context-free grammar? $S$ is the start symbol and the set of non-terminal symbols is $\{a,b\}.$

The production rules are:

  • $S \rightarrow bS \mid aAaS \mid \varepsilon$
  • $A \rightarrow bA \mid \varepsilon$
  1. $abababbbb$
  2. $aaaaaaaaa$
  3. $bbbbabbbb$
  4. $aaaabaaaa$
edited by

1 Answer

1 votes
1 votes
Given grammar generates all strings over $\{a,b\}$ having an even number of $a's.$ So, only string in option D is generated by the given grammar.

Correct option: A;B;C.
Answer:

Related questions

4 votes
4 votes
1 answer
3