edited by
320 views
0 votes
0 votes

Let $CFG$   $G$ be the following grammar$.$

  •  $S\rightarrow aSb \mid bY \mid Y a$
  • $Y\rightarrow bY \mid aY \mid \epsilon$

Give a simple description of $L(G)$ in English$.$ Use that description to give a $CFG$ for $\overline{L(G)},$ the complement of $L(G).$

edited by

Please log in or register to answer this question.

Related questions

0 votes
0 votes
1 answer
1
admin asked May 4, 2019
271 views
Let $\Sigma = \{a,b\}.$ Give a $CFG$ generating the language of strings with twice as many $a’s$ as $b’s.$ Prove that your grammar is correct$.$
0 votes
0 votes
1 answer
3
admin asked May 4, 2019
380 views
Let $C = \{x\#y \mid x, y\in\{0,1\}^{*}$ and $x\neq y\}.$ Show that $C$ is a context-free language$.$
0 votes
0 votes
1 answer
4