The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
73 views

Can I give any grammer for the language L = { anbncn / n>=1}  Like this----

asked in Theory of Computation by (149 points) | 73 views
+1
S-AB

 aAbB

aaAbbB

aaabbbB

aaabbbc

So ,no
0
No, you can not give grammar in such a manner.

Because the grammar you have witten is a CFG and the language for which your are trying to write the grammar is not a CFL.

The grammar for this language will be a Type 1 grammar as this language belong to the class of CSL.

Below given is the Grammar for this

S->abc|A

A->aABc|abc

cB->Bc

bB->bb
0
It can also generate abccccc or aabbc

1 Answer

0 votes
Best answer
The given language is csl and giving grammar for csl language is tough
answered by Active (1.2k points)
selected by


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

39,824 questions
46,798 answers
140,963 comments
58,893 users