I'm doing some pre-exam exercises for my compilers class, and needed to simplify this regular expression.
(a U b)*(a U e)b* U (a U b)*(b U e)a*
Quite obviously, the e is the empty string, and the U stands for union.
So far, I think one of the (a U b)* can be removed, as the union of a U a = a. However, I can't find any other simplifications, and am not doing so well with the other problems thus far. :(
Any help is appreciated, thanks very much!
Little rusty on regex, but if * still represents the "zero or more ocurrences" you can replace:
which leaves the first part with:
On the right side, you have that
Now, since a U b = b U a, you get:
on the right hand side, which leaves just
I think that's it...