The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
9 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 Boss (45.8k points)
edited by | 9 views

1 Answer

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

S->aaSb | baSa| aSba | SS | ε
by Active (4.1k 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
49,830 questions
54,807 answers
189,530 comments
80,837 users