Regular Expressions with Backreferences: Polynomial-Time Matching Techniques

03/14/2019
by   Markus L. Schmid, et al.
0

Regular expressions with backreferences (regex, for short), as supported by most modern libraries for regular expression matching, have an NP-complete matching problem. We define a complexity parameter of regex, called active variable degree, such that regex with this parameter bounded by a constant can be matched in polynomial-time. Moreover, we formulate a novel type of determinism for regex (on an automaton-theoretic level), which yields the class of memory-deterministic regex that can be matched in time O(|w|p(|r|)) for a polynomial p (where r is the regex and w the word). Natural extensions of these concepts lead to properties of regex that are intractable to check.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/05/2018

Deterministic Regular Expressions With Back-References

Most modern libraries for regular expression matching allow back-referen...
research
05/08/2020

Computational Complexity of Synchronization under Regular Commutative Constraints

Here we study the computational complexity of the constrained synchroniz...
research
07/28/2020

A polynomial-time algorithm to determine (almost) Hamiltonicity of dense regular graphs

We give a polynomial-time algorithm for detecting very long cycles in de...
research
02/13/2018

Query learning of derived ω-tree languages in polynomial time

We present the first polynomial time algorithm to learn nontrivial class...
research
02/16/2021

Nominal Unification and Matching of Higher Order Expressions with Recursive Let

A sound and complete algorithm for nominal unification of higher-order e...
research
01/28/2023

Supergeo Design: Generalized Matching for Geographic Experiments

We propose a generalization of the standard matched pairs design in whic...
research
07/30/2021

Computational Complexity of Synchronization under Sparse Regular Constraints

The constrained synchronization problem (CSP) asks for a synchronizing w...

Please sign up or login with your details

Forgot password? Click here to reset