455 views

2 Answers

Best answer
6 votes
6 votes

you can use such logic...

EVERY REGULAR IS CFL...

AND CFL ARE CLOSED UNDER CONCETNATION..

so in such question ...go in this way ..

example if its given that its REGULAR....

apply rules of regular and if satisfy ok....if not then EVERY REGULAR IS CFL...

now apply rules of CFL......if fails again..

EVERY CFL IS RECURSIVE...like that you will get answer easily ...

selected by
2 votes
2 votes

Let L1 = {e} which is regular  {e=epsilon}

Let L2 = {a^b^n | n>0} which is CFL

L2={ab, aabb, aaabbb,......}

now, L1.L2 = {e.ab, e.aabb, e.aaabbb........} = {ab,aabb,aaabbb....} which CFL

Related questions

1 votes
1 votes
1 answer
1
Sahil1994 asked Dec 7, 2017
567 views
Hi mates,Please Identify Class of grammr with suitable Explanation,1) L={WXW,/ W,X{a,b}*}2) L={WXW,/ W,X{a,b}+}3) L={WXWY,/ W,X,Y{a,b}+}4)L={WXYW,/ W,X,Y{a,b}+}Thanks,
1 votes
1 votes
0 answers
3
iarnav asked Sep 20, 2017
266 views
L = {ab3k | k>=0}wel, I think, this L is RL, as it has REGEX as a(bbb)*.Please correct me.