I have been trying to prove that two regex are equivalent. I know that two regex are equivalent if they define the same language. But i am not getting my hands of way to prove it without using DFAs.
For example, i have the problem to prove that the following are equivalent.
(a + b)*a(a + b)*b(a + b)* = (a + b)*ab(a + b)*
I know both of these define the language having atleast one 'a' and one 'b'.
The same is the case with the following.
(a + b)*ab(a +b)* + b*a* = (a + b)*
Any help will be appreciated.
Thanks
You should be able to prove them using the identities on slide 16 of this regex lecture. In particular, I'd recommend clever use of the last equality of the 9th identity there, R* = RR*+e.
By the way, the first language is not precisely "at least one 'a' and one 'b'". For example, 'ba' is not in the language, but has at least one 'a' and one 'b'.