(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:
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.
64.3k questions
77.9k answers
244k comments
80.0k users