in Theory of Computation
3,633 views
0 votes
0 votes
Find the regular expression

No 2 a's and 2 b's should come together?
in Theory of Computation
by
3.6k views

4 Comments

Thnq for ur suggestion.:) . Really nptel course are so boring I have watched her video.but.for toc its better to watch shai simonson video rather than nptel.. :)
0
0
it means select epsilon or b from the first part

From the second part u can get any number of ab

And from the third part u can select a or epsilon.
0
0
No probs. Work out d way u feel it's better. Yeah. :)
0
0

4 Answers

1 vote
1 vote

No two a's and b's should come together..so language is L=(Epsilon+b)(ab)* (a+Epsilon).

L={Epsilon, b, a, ab,abab,....,bab,babab,....aba,ababa,....}

0 votes
0 votes
(a+€) (ba) * (b+€) + a+b+ab+€

Explanation :

The only possible strings is a followed by b and b followed by a tht is  bababa.....  

So we get (ba) *

But strings could also start with a and could also end with b

So we add (€+a) and (b+€) at the start and the end

But the minimum possible string in our regular expression is ba which means we have left some strings

So we add ab+a+b+€ in the end to cover all possible strings
0 votes
0 votes
alphabets= { a , b }


L={ epsilon , a , b , ab , ba , aba , bab , abab ,...........................} it's infinite language
It may have these two answers
1)         (epsilon+b)(ab)*(epsilon+a)

or

2)         (epsilon+a)(ba)*(epsilon+b)


Both of them are correct
0 votes
0 votes

RE : (a+ba)(ba)* + (b+ab)(ab)* + ϵ