The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
56 views
Give CFG for the following language

L =$ {(a^{m})(b^{m+n})(c^{n}) | m,n= 0,1,2,.....}$
asked in Theory of Computation by (147 points)
edited by | 56 views
+1
understand the lang. first.
you can break this lang. into two part first a^mb^m. which can be generated by grammar A=>aAb|e.
now another part of lang. b^nc^n. grammar for this B=> aBb|e.
now join both part of grammar together with help of new symbol which will be your start symbol.
S=>AB
A=>aAb|e
B=>bBc|e.

1 Answer

+4 votes
Best answer
S$\rightarrow$XY

X$\rightarrow$aXb|$\epsilon$

Y$\rightarrow$bYc | $\epsilon$
answered by Boss (16.2k points)
selected by
+1
$abbc$?
0
Got my mistake  check it now
0
Correct (y)


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

37,963 questions
45,465 answers
131,321 comments
48,374 users