259 views
0 votes
0 votes
Regular expression for having atleast 2 a's

(1).  (a + b)* a (a + b)* a (a + b)*

(2). (a + b)* a  b* a (a + b)*

(3). b* a (a + b)* a (a + b)*

(4). (a + b) * a (a + b) * a b*

(5). b* a (a + b)* a b*

I know 1-4 are correct and just want help with 5th one . Please tell me is it correct or not with reason.

Thanks in advance....

1 Answer

1 votes
1 votes

According to me not only 1 and 4 but all the 5 regular expressions can represent the language having atleast 2 a’s . For all the examples minimum string generated is “aa” if we put the * value as 0. None of the expressions accept epsilon and single a. 

Note:- I am also a learner and I might be wrong. But I have written the above answer by taking many examples.

No related questions found