Abstract
In this paper, we are interested in solving the approximate regular expression matching problem: we are given a regular expression R in advance and we wish to answer the following query: given a text T and a parameter k, find all the substrings of T which match the regular expression R with at most k errors (an error consist in deleting inserting, or substituting a character). There exists a well known solution for this problem in time O(mn) where m is the size of the regular expression (the number of operators and characters appearing in R) and n the length of the text. There also exists a solution for the case k = 0 (exact regular expression matching) which solves the problem in time O(dn), where d is the number of strings in the regular expression (a string is a sequence of characters connected with concatenation operator). In this paper, we show that both methods can be combined to solve the approximate regular approximate matching problem in time O(kdn) for arbitrary k. This bound can be much better than the bound O(mn/log k + 2 n) achieved by the best actual regular expression matching algorithm in case \(d < \frac{m} {k \log_{k+2} n}\) (that is k is not too large and R contains much less occurrences of ∪ and * than occurrences of (·)).
This work is supported by the french ANR-2010-COSI-004 project MAPPI.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Aho, A., Sethi, R., Ullman, J.: Compilers: Principles, Techniques and Tools. Addison-Wesley, Reading (1985)
Philip, B., Farach-Colton, M.: Fast and compact regular expression matching. Theoretical Computer Science 409(3), 486–496 (2008)
Baeza-Yates, R.A., Gonnet, G.H.: Efficient text searching of regular expressions. In: Ronchi Della Rocca, S., Ausiello, G., Dezani-Ciancaglini, M. (eds.) ICALP 1989. LNCS, vol. 372, pp. 46–62. Springer, Heidelberg (1989)
Bille, P., Thorup, M.: Faster regular expression matching. In: Albers, S., Marchetti-Spaccamela, A., Matias, Y., Nikoletseas, S., Thomas, W. (eds.) ICALP 2009. LNCS, vol. 5555, pp. 171–182. Springer, Heidelberg (2009)
Bille, P., Thorup, M.: Regular expression matching with multi-strings and intervals. In: Proceedings of the Twenty-First Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2010, pp. 1297–1308 (2010)
Bille, P., Thorup, M.: Regular expression matching with multi-strings and intervals. In: ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 1297–1308. SIAM, Philadelphia (2010)
Knight, J.R., Myers, E.W.: Approximate regular expression pattern matching with concave gap penalties. In: Apostolico, A., Galil, Z., Manber, U., Crochemore, M. (eds.) CPM 1992. LNCS, vol. 644, pp. 67–78. Springer, Heidelberg (1992)
Landau, G.M., Myers, E.W., Schmidt, J.P.: Incremental string comparison. SIAM J. Comput. 27(2), 557–582 (1998)
Mužátko, P.: Approximate regular expression matching. In: Proceedings of the Prague Stringologic Club Workshop 1996, pp. 37–41 (1996)
Myers, E.W.: A four russians algorithm for regular expression pattern matching. J. Assoc. Comput. Mach. 39(2), 430–448 (1992)
Myers, E.W., Miller, W.: Approximate matching of regular expressions. Bull. Math. Biol. 51, 7–37 (1989)
Myers, E.W., Oliva, P., Guimãraes, K.: Reporting exact and approximate regular expression matches. In: Farach-Colton, M. (ed.) CPM 1998. LNCS, vol. 1448, pp. 91–103. Springer, Heidelberg (1998)
Navarro, G., Raffinot, M.: Fast regular expression search. In: Vitter, J.S., Zaroliagis, C.D. (eds.) WAE 1999. LNCS, vol. 1668, pp. 198–213. Springer, Heidelberg (1999)
Thompson, K.: Regular expression search algorithm. Commun. ACM 11, 419–422 (1968)
Wu, S., Manber, U., Myers, E.: A subquadratic algorithm for approximate limited expression matching. Algorithmica 15(1), 50–67 (1996)
Wu, S., Manber, U., Myers, E.W.: A subquadratic algorithm for approximate regular expression matching. J. Algorithms 19(3), 346–360 (1995)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2011 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Belazzougui, D., Raffinot, M. (2011). Approximate Regular Expression Matching with Multi-strings. In: Grossi, R., Sebastiani, F., Silvestri, F. (eds) String Processing and Information Retrieval. SPIRE 2011. Lecture Notes in Computer Science, vol 7024. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-24583-1_7
Download citation
DOI: https://doi.org/10.1007/978-3-642-24583-1_7
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-24582-4
Online ISBN: 978-3-642-24583-1
eBook Packages: Computer ScienceComputer Science (R0)