in Theory of Computation
347 views
2 votes
2 votes

in Theory of Computation
347 views

3 Answers

1 vote
1 vote
Best answer

(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.

1 comment

yes it is same as saying that , language that start and end with the same letter.
0
0
0 votes
0 votes
Ans : B. L is a DCFL but not regular

Related questions