New Algorithms for Regular Expression Matching
Philip Bille
Abstract
In this paper we revisit the classical regular expression matching problem, namely, given a regular expression R and a string Q, decide if Q matches one of the strings specified by R. Let m and n be the length of R and Q, respectively. On a standard unit-cost RAM with word length w ≥ n, we show that the problem can be solved in O(m) space with the following running times: equation* cases O(nm ww + m w) & if m > w \\ O(n m + m m) & if w < m ≤ w \\ O((n+ m2, n m + m m)) & if m ≤ w. cases equation* This improves the best known time bound among algorithms using O(m) space. Whenever w ≥ 2 n it improves all known time bounds regardless of how much space is used.
Create a lesson
Related papers
Product Structure Meets Track Layouts
Michael A. Bekos, Giordano Da Lozzo, Petr Hliněný et al.
The Randomized Query Complexity of Finding Minimal Elements in Bounded-Width Posets
Luyao Fan, Jiayang Zou, Jiayang Gao et al.
On the Instance Optimality of Bidirectional Dijkstra's Algorithm
Matic Požar
Hadamard Flattening and Gaussian Pooling Sketch for Least Squares with Coordinate-wise Guarantee
Zhao Song, Lichen Zhang
Cheaper by the Batch: Shared Traversal for Genotype Graph Editing
Aaron Li, Yifan Li, Drew DeHaas et al.
Unpublished Draft: A Post-Processing Approach to Fairness in Tie-Aware Rankings
Somya Nigam, Johan Springael, Kenneth Sörensen