Determine whether or not the following claims are true for a
Determine whether or not the following claims are true for all regular expressions r1 and r2, and state why. The symbol == stands for equivalence of regular expressions in the sense that both expressions denote the same language:
(a) (r1*)* == r1*
(b) r1*(r1 + r2)* == (r1 + r2)*
(c) (r1 + r2)* == (r1*r2*)*
(d) (r1r2)* == r1*r2*
Solution
Post one more question to get the remaining two parts. Thanks
a) The first expression is an equivalence expression since r1* represents the continous string patter of r1
(r1...r1...r1)* = r1r1...r1....r1
Similarly r1* = r1r1....r1....r1
Hence both the classes are equal
b) The second expression is not an equivalence class since the second expression will be like
r1...r1....r1...(r1+2)....(r1+r2)......(r1+r2)
whereas the expression on the right hand side is equal to continuous patter of r1+r2 string concatentation,
r1+r2.... r1+r2.....r1+r2
Hence they both are not equivalence classes
