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

1 Answer

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

S->aaSb | baSa| aSba | SS | ε
by Active (5.2k 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,741 questions
57,242 answers
198,011 comments
104,604 users