264 views
0 votes
0 votes
Are both regular expression  same .a*(ba*)* =(a+b)*ba(a+b)*

if not then why????

1 Answer

0 votes
0 votes

Both are not equivalent.. 

Because using first regular expression we can generate any string of alphabet a & b. 

But the constraint with second regular expression is that all the string must have ba as its substring..

That's why both are not equivalent!! 

Hope it helps!! 

Please Comment if there is anything wrong in my explanation!! 

Related questions

1 votes
1 votes
1 answer
1
0 votes
0 votes
1 answer
2
hasina ali asked Mar 21
118 views
Set of binary strings starting with 11 and ending with 00. E.g., 1100,1110100 ,1100100
0 votes
0 votes
1 answer
3
utsav22222 asked Mar 15
213 views
Write regular expression for the set of strings of 0's and 1's with at most one pair of consecutive 1's.