The Gateway to Computer Science Excellence
0 votes
16 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 (60.6k points)
edited by | 16 views

1 Answer

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

S->aaSb | baSa| aSba | SS | ε
by Loyal (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,833 questions
57,691 answers
199,329 comments
107,351 users