14 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$.$

edited | 14 views

number of a's=2*number of b's

S->aaSb | baSa| aSba | SS | ε
by Active (5.2k points)