in reply to Re^2: Comparative satisfiability of regexps.
in thread Comparative satisfiability of regexps.

Any technology provably equivalent to a perpetual motion machine is junk. :-)

Actually, what I'm trying to resolve is the "receivers regex can accept a superset of the emitters pattern generator" question. Specifically, whether that is equivalent to the halting problem or not.

As I said in another note, I believe that DFAs require a memory strip to be Turing-complete, and thus analysis of regexps doesn't run into the halting problem. But I'm not certain of that, and my last Comp. Sci. course was very long ago.

Resolving to canonical form is a good first step, but it's not entirely clear how to algorithmically determine that, for example, aaaab?aaaa is a subset of aaaaab*aaaaa. That one took a moment to prove and double-check in my head, and it's a *really* trivial case compared to some I'd like to verify.

Brain-achingly,

Mickey.

Replies are listed 'Best First'.
Re: Halting problem? Sheesh, I hope not.
by demerphq (Chancellor) on Jan 19, 2005 at 22:01 UTC

    Well if it isnt the the halting problem exactly i suspect its damn near as hard. How about these two:

    /aaaa(bc|bd|be|(b|b)(a(a(a(a)))|baba|aaaa)/ /aaaab?aaaa/

    I suspects its a lot easier to show that regex E can produce something that regex R wont accept, but saying for sure that R will accept all patterns producable by E isnt so easy. And IMO neither are approachable problems at all. Id be thinking of alternate solutions. One possibility is to produce something that generates random data from the E pattern and then hammer the R pattern with the products to see but obviously this wont be a proof, just a strong argument.

    /me wonders if he still has his data from regex code...

    ---
    demerphq