Skip to main content

Dynamic Text and Static Pattern Matching

  • Conference paper
Algorithms and Data Structures (WADS 2003)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2748))

Included in the following conference series:

Abstract

In this paper, we address a new version of dynamic pattern matching. The dynamic text and static pattern matching problem is the problem of finding a static pattern in a text that is continuously being updated. The goal is to report all new occurrences of the pattern in the text after each text update. We present an algorithm for solving the problem, where the text update operation is changing the symbol value of a text location. Given a text of length n and a pattern of length m, our algorithm preprocesses the text in time O(nlog logm), and the pattern in time \(O(m\sqrt{log m})\). The extra space used is \(O(n + m\sqrt{log m})\). Following each text update, the algorithm deletes all prior occurrences of the pattern that no longer match, and reports all new occurrences of the pattern in the text in O(log log m) time.

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. Alstrup, S., Brodal, G.S., Rauhe, T.: Pattern matching in dynamic texts. In: Proc. of the Symposium on Discrete Algorithms, pp. 819–828 (2000)

    Google Scholar 

  2. Amir, A., Landau, G., Sokol, D.: Inplace run-length 2d compressed search. Theoretical Computer Science 290(3), 1361–1383 (2003)

    Article  MATH  MathSciNet  Google Scholar 

  3. Buchsbaum, A., Goodrich, M., Westbrook, J.: Range searching over tree cross products. In: Proc. of European Symposium of Algorithms, pp. 120–131 (2000)

    Google Scholar 

  4. Cole, R., Hariharan, R.: Tighter upper bounds on the exact complexity of string matching. SIAM J. on Computing 26(3), 803–856 (1997)

    Article  MATH  MathSciNet  Google Scholar 

  5. Farach, M.: Optimal suffix tree construction with large alphabets. In: Proc. of the Symposium on Foundations of Computer Science, pp. 137–143 (1997)

    Google Scholar 

  6. Farach, M., Muthukrishnan, S.: Perfect hashing for strings: formalization and algorithms. In: Proc. of Combinatorial Pattern Matching, pp. 130–140 (1996)

    Google Scholar 

  7. Ferragina, P., Grossi, R.: Fast incremental text editing. In: Proc. of the Symposium on Discrete Algorithms, pp. 531–540 (1995)

    Google Scholar 

  8. Gabow, H.N., Bentley, J., Tarjan, R.E.: Scaling and related techniques for geometric problems. In: Proc. of the Symposium on Theory of Computing, pp. 135–143 (1984)

    Google Scholar 

  9. Gu, M., Farach, M., Beigel, R.: An efficient algorithm for dynamic text indexing. In: Proc. of the Symposium on Discrete Algorithms, pp. 697–704 (1994)

    Google Scholar 

  10. Hagerup, T., Miltersen, P.B., Pagh, R.: Deterministic dictionaries. J. of Algorithms 41, 69–85 (2000)

    Article  MathSciNet  Google Scholar 

  11. Harel, D., Tarjan, R.E.: Fast algorithms for finding nearest common ancestors. SIAM J. on Computing 13(2), 338–355 (1984)

    Article  MATH  MathSciNet  Google Scholar 

  12. Knuth, D., Morris, J., Pratt, V.: Fast pattern matching in strings. SIAM J. on Computing 6(2), 323–350 (1977)

    Article  MATH  MathSciNet  Google Scholar 

  13. Landau, G.M., Vishkin, U.: Fast string matching with k differences. Journal of Computer and System Sciences 37(1), 63–78 (1988)

    Article  MATH  MathSciNet  Google Scholar 

  14. McCreight, E.M.: A space-economical suffix tree construction algorithm. J. of the ACM 23, 262–272 (1976)

    Article  MATH  MathSciNet  Google Scholar 

  15. Sahinalp, S.C., Vishkin, U.: Efficient approximate and dynamic matching of patterns using a labeling paradigm. In: Proc. of the Symposium on Foundations of Computer Science, pp. 320–328 (1996)

    Google Scholar 

  16. Ukkonen, E.: On-line construction of suffix trees. Algorithmica 14, 249–260

    Google Scholar 

  17. van Emde Boas, P.: An \(O(n \ {\log} \ {\log} \ n)\) on-line algorithm for the insert-extract min problem. Technical Report, Department of Computer Science, Cornell University, Number TR 74-221 (1974)

    Google Scholar 

  18. Weiner, P.: Linear pattern matching algorithm. In: Proc. of the Symposium on Switching and Automata Theory, pp. 1–11 (1973)

    Google Scholar 

  19. Willard, D.E.: Log-logarithmic worst case range queries are possible in space θ(n). Information Processing Letters 17, 81–84 (1983)

    Article  MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2003 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Amir, A., Landau, G.M., Lewenstein, M., Sokol, D. (2003). Dynamic Text and Static Pattern Matching. In: Dehne, F., Sack, JR., Smid, M. (eds) Algorithms and Data Structures. WADS 2003. Lecture Notes in Computer Science, vol 2748. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-45078-8_30

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-45078-8_30

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-40545-0

  • Online ISBN: 978-3-540-45078-8

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics