Skip to main content

Approximate Regular Expression Matching with Multi-strings

  • Conference paper
Book cover String Processing and Information Retrieval (SPIRE 2011)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 7024))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Aho, A., Sethi, R., Ullman, J.: Compilers: Principles, Techniques and Tools. Addison-Wesley, Reading (1985)

    MATH  Google Scholar 

  2. Philip, B., Farach-Colton, M.: Fast and compact regular expression matching. Theoretical Computer Science 409(3), 486–496 (2008)

    Article  MathSciNet  MATH  Google Scholar 

  3. 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)

    Chapter  Google Scholar 

  4. 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)

    Chapter  Google Scholar 

  5. 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)

    Google Scholar 

  6. 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)

    Chapter  Google Scholar 

  7. 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)

    Chapter  Google Scholar 

  8. Landau, G.M., Myers, E.W., Schmidt, J.P.: Incremental string comparison. SIAM J. Comput. 27(2), 557–582 (1998)

    Article  MathSciNet  MATH  Google Scholar 

  9. Mužátko, P.: Approximate regular expression matching. In: Proceedings of the Prague Stringologic Club Workshop 1996, pp. 37–41 (1996)

    Google Scholar 

  10. Myers, E.W.: A four russians algorithm for regular expression pattern matching. J. Assoc. Comput. Mach. 39(2), 430–448 (1992)

    Article  MathSciNet  MATH  Google Scholar 

  11. Myers, E.W., Miller, W.: Approximate matching of regular expressions. Bull. Math. Biol. 51, 7–37 (1989)

    Article  MathSciNet  MATH  Google Scholar 

  12. 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)

    Chapter  Google Scholar 

  13. 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)

    Chapter  Google Scholar 

  14. Thompson, K.: Regular expression search algorithm. Commun. ACM 11, 419–422 (1968)

    Article  MATH  Google Scholar 

  15. Wu, S., Manber, U., Myers, E.: A subquadratic algorithm for approximate limited expression matching. Algorithmica 15(1), 50–67 (1996)

    Article  MathSciNet  MATH  Google Scholar 

  16. Wu, S., Manber, U., Myers, E.W.: A subquadratic algorithm for approximate regular expression matching. J. Algorithms 19(3), 346–360 (1995)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics