wiz-icon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

Which of the following languages is/are regular ?

L1:{wxwRw,xϵ{a,b}andw,x>0} wR is the reverse of string w

L2:{anbmmnandm,n0}

L3:{apbqcrp,q,r0}


Open in App
Solution

L1={wxwRw,xϵ{a,b}andw,x>0}

w cannot be put as "ϵ " since w>0. So we put w as its smallest string which is 'a' and 'b' and get the regular expression:


r=a(a+b)+a+b(a+b)+b.

Now putting w as any other string like say "ab" will not add any new string to the expression r. since any such string so generated will be either already generated by either a(a+b)+a or b(a+b)+b

So the given language = a(a+b)+a+b(a+b)+b which is clearly regular.

L1isregular

L2={anbmmn}. This language has infinite comparision between number of a's and b's. L2 is not regular language.

L3:{apbqcrP,q,r0} = abc is a regular language.

flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Extrema
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon