I'm currently trying to get regular expressions for school and have to work on a task to shorten this regular expression:
r = 0(e + 0 + 1)* + (e + 1)(1 + 0)* + e
where e is the empty word epsilon.
So far I got to this:
r = 0(0 + 1)* + 1(1 + 0)* + e
subject to the rule
r* = (e + r)*
However, I do not know how to proceed. If this were not for wedge star operators, I could use the distribution law, but this will not apply here. I cannot find a suitable law to continue this regular expression.
Any helpful tips?
Edit:
I think I took another step by forming r on
r = 0(1 + 0)* + 1(1 + 0)* + e
and then the ability to combine it with
r = (0 + 1)(0 + 1)* + e
Is it correct?
In addition, we could say
r = (0+1)*
which should be the final form
source
share