fsm - How to determine if a regex is orthogonal to another regex? -


I think my question is best explained with a (simplified) example.

Regex 1:

  ^ \ d + _ [az] + $  

Reggae 2:

  ^ \ d * $  

Regex 1 never will match a string where regex will match 2. So we say that regex is 1 orthogonal for regex 2.

Many people asked me what I mean by orthogonal I try to make it clear:

let s1 Set of wire (infinity) where regex 1 match is set of S2 string where regex 2 matches is orthogonal for reggae2, if the gap of S1 and S2 is empty I < Em> iff will not be a rigx ^ \ d_a $ orthogonal because the string '2_a' is set in S1 and in S2.

How can this program be determined, if two regexes are orthogonal of each other?

The best case would be to have some library as it applies to a method:

if the regex orthogonal (i.e. "intersection is empty"), otherwise Or it can not be fixed if it falsely falsely * / public boolean is regox orthogonal (pattern regex1, pattern regex2); From "orthogonal" you mean "intersection is empty set" I take it

< P>?

I create regular expressions for intersections, then convert them to regular grammar in general, and see that this is a blank language ...

Again, I I'm a theoretician ...


Comments