841 views
Find the regular expression

No 2 a's and 2 b's should come together?
| 841 views
0
0

​​​​​​(epsilon+b) (ab) *(a+epsilon)

0
epsilon symbol would hold for NULL. Isn't it?
0
And why not ba??. Coz it says No 2a's and no 2b's should be together. The minimum possible symbols acceptable are a,b,ab,ba. Isn't it?
0

Why don't u try to cover d basic?? Unlike start with the fundamentals of R.E. For dat ur Engineering Textbook on TOC is more den enough. Always grasp d concept den hit at d question. Yeah!!!. Lectures of IIT Profs especially dat of Mam Kamla Krithivasan must refer. K. Hope dat it helps u. :)

0
In your case devshree,  there can be many cases with different symbol...and the question here is no 2 consecutive a and no 2 consecutive b 's  can comes together..

L={a, b, ab, ba, aba,bab,  abab, baba.....,}  isn't it
0
Yes. :)
0
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
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
No probs. Work out d way u feel it's better. Yeah. :)

+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,....}

by Junior (787 points)
(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
by Junior (575 points)
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
by Junior (987 points)

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

by (207 points)