retagged by
1,182 views
1 votes
1 votes

Consider the regular expression $R=(a+b)^*a(ab)^*+\epsilon$.
Which of the following are possible as subset of $R$?

(i) $(aa)^*$          (ii) $(ba)^*$          (iii) $(aa)^*(ba)^*$

a. $(i)$ and $(ii)$ only

b. $(ii)$ and $(iii)$ only

c. $(i)$,$(ii)$ and $(iii)$

d. None of these.

retagged by

3 Answers

Best answer
2 votes
2 votes
see what the regular expression given is doing. it will generate all string having atleast one a and it will also generate null. now all option are either generating null or the minimum instance is containing an a. so the condition atleast on a will get satisfied so all are subsets.
selected by
2 votes
2 votes
The given regular expression can generate empty string or a string containing a.
(aa)* - This can be generated by the given regular expression.
(ba)* -  This could also be generated by the given regular expression.
(aa)*(ba)* - This could also be generated by the given regular expression.

Therefore, all are possible. So. option C is correct.

Related questions

0 votes
0 votes
1 answer
2
1 votes
1 votes
2 answers
3
Ashish Roy 1 asked Sep 27, 2018
2,130 views
Given two Regular expressions are equal or not ?1) (1+01*0)* 2) 1*(01*0)* 1*Give proper explanation also.
1 votes
1 votes
0 answers
4