The Gateway to Computer Science Excellence
0 votes
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$.$
in Theory of Computation by Veteran (52.9k points)
edited by | 12 views

1 Answer

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

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

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,666 questions
56,157 answers
93,754 users