For the language L2 an bm m2n over ab Is L2 regular Provid

For the language L_2 = {a^n b^m | m=2n} over ={a,b}
Is L_2 regular? Provide a proof of your answer.
Is L_2 context-free? If so, provide a CFG and a PDA for the language. If not, provide proof of your answer.

Solution

1. {a^n b^m | m=2n} over ={a,b} is regular.

Language is,

L= { abb,aabbbb,aaabbbbbb..............}

In this language, string length is in AP (Arithmetic progression). common difference is 3.so it is regular. if a language is in AP then,it is regular.

2. Context Free Grammar :

{a^n b^m | m=2n}

CFG is S-> aSbb/abb

proof :

=> aabbbb

=> aaSbbbb

=> aaabbbbbb

For the language L_2 = {a^n b^m | m=2n} over ={a,b} Is L_2 regular? Provide a proof of your answer. Is L_2 context-free? If so, provide a CFG and a PDA for the

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site