New Algorithms for Regular Expression Matching
Data Structures and Algorithms
2007-05-23 v1
Abstract
In this paper we revisit the classical regular expression matching problem, namely, given a regular expression and a string , decide if matches one of the strings specified by . Let and be the length of and , respectively. On a standard unit-cost RAM with word length , we show that the problem can be solved in space with the following running times: \begin{equation*} \begin{cases} O(n\frac{m \log w}{w} + m \log w) & \text{if } \\ O(n\log m + m\log m) & \text{if } \\ O(\min(n+ m^2, n\log m + m\log m)) & \text{if .} \end{cases} \end{equation*} This improves the best known time bound among algorithms using space. Whenever it improves all known time bounds regardless of how much space is used.
Cite
@article{arxiv.cs/0606116,
title = {New Algorithms for Regular Expression Matching},
author = {Philip Bille},
journal= {arXiv preprint arXiv:cs/0606116},
year = {2007}
}