in Theory of Computation
576 views
2 votes
2 votes

L={ xy | x,y$\epsilon$ (a+b)*, na(x) = nb(y) }

in Theory of Computation
by
576 views

1 comment

i must be regular.....
0
0

1 Answer

2 votes
2 votes
Best answer

It is Regular Language .

In fact it is (a+b)*

Take any String Say ba : Here x is b and y is a (so no. of a in x is 0 and no. of b in y is also 0)

baa :Here x is b and y is aa (so no. of a in x is 0 and no. of b in y is also 0)

aabb : Here x is aa and y is bb (so no. of a in x is 2 and no. of b in y is also 2)

aaaa : Here x is Epsilon and y is aaaa (so no. of a in x is 0 and no. of b in y is also 0)

In this way , it is generating all String

selected by

4 Comments

@hs_yadav

I got it!
1
1
edited by

@Anup patel @hs_yadav How you will know when to divide the string in regular language? Here in example you have taken aabb, bbaaa etc which is fine using NFA it is possible.Consider Eg: abababab, or bbaaaabb etc?

0
0
yes,we can always have a decomposition
0
0

Related questions