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

Which of the following are regular sets?

1. {anb2mn0,m0}

2. {anbmn=2m}

3. {anbmnm}

4. {xcyx,yϵ{a,b}}


Open in App
Solution

1. {anb2mn0,m0} is regular, since we can write L as a regular expression a(bb).

2. {anbmn=2m} is a DCFL, but not regular since here, we need to count the a's and compare with b's.

3. {anbmnm} is same as {anbmn<m}{anbmn>m} each of which is a CFL and the union is also a CFL (Since CFLs are closed under union). However this language is not regular since we have to count a's and b's and compare them which cannot be done by a finite state machine.

4. {xcyx,yϵ{a,b}} is regular since we can write a regular expression (a+b)c(a+b) for it.

flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Objective Session 2
OTHER
Watch in App
Join BYJU'S Learning Program
CrossIcon