Given regular expressions containing only (,),|,*
and characters of an Alphabet A, how can I find the "negation" of a regular expression i.e.:
<R1> is a regular expression
<R2> = A*\<R1>
where A*
are all the words you can produce with A and <Ri>
the words accepted by the regular expression Ri
.
Given R1, how can I find R2? Is there any algorithm to do that?
Thank you!