Question #170625

Write a regular expression for the following languages, over sigma=(a,b) All strings that do not end with aa.All strings that contain an even number of b’s. All strings which do not contain the substring ba.


1
Expert's answer
2021-03-12T14:59:25-0500

Given,

Σ=(a,b)\Sigma =(a,b)

Condition (i) It is not ending with aa:

L={L=\{ Not end with aa }\}

={=\{ ends with ab, ba, bb }\}

(a+b)(ab+ba+bb)+ϵ+a+b(a+b)^*(ab+ba+bb)+\epsilon +a+b


For the second condition:

L={L=\{ even no of bsb's }\}

={aba)+a=\{a*ba*)*+a*


For the third condition:

L={L=\{ not contained ba}\}

=ab=a*b*


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!
LATEST TUTORIALS
APPROVED BY CLIENTS