Q. Consider following Regular Expression:
(i) a*b*b (a+ (ab)*)* b*
(ii) a*(ab + ba)* b*
What is length of shortest string which is in both (i) & (ii)?
(a) 2
(c) 4
(b) 3
(d) None
Solution: Option (d)
Explanation:
The shortest string is ε generated by both the regular expressions
I believe the above explanation is wrong as (i) will generate at least 'b'.
Please correct me if I'm wrong.