334 views

3 Answers

Best answer
1 votes
1 votes

(A) L is regular
L = {w | w contains equal number of ab and ba }:

strings in language: eps, a*, b*, aba, abbbbba ababa ....
Regular Expression: $ eps+ a(a + bb^{*}a)^{*} + b(b + aa^{*}b)^{*}$

DFA:

selected by
2 votes
2 votes

L is regular..

just ensure that if you start with 'a' you should end with 'a' and if start with 'b' then end with 'b'....

dfa will be.

Related questions

0 votes
0 votes
1 answer
1
Mayankprakash asked Jan 24, 2019
294 views
Please suggest me in briefly for revision .How to we test regular,dcfl,cfl,recursive and recursive enumeranle.Eg say if we can find the pattern it's regular.Please help...