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.
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
Alstrup, S., Brodal, G.S., Rauhe, T.: Pattern matching in dynamic texts. In: Proc. of the Symposium on Discrete Algorithms, pp. 819–828 (2000)
Amir, A., Landau, G., Sokol, D.: Inplace run-length 2d compressed search. Theoretical Computer Science 290(3), 1361–1383 (2003)
Buchsbaum, A., Goodrich, M., Westbrook, J.: Range searching over tree cross products. In: Proc. of European Symposium of Algorithms, pp. 120–131 (2000)
Cole, R., Hariharan, R.: Tighter upper bounds on the exact complexity of string matching. SIAM J. on Computing 26(3), 803–856 (1997)
Farach, M.: Optimal suffix tree construction with large alphabets. In: Proc. of the Symposium on Foundations of Computer Science, pp. 137–143 (1997)
Farach, M., Muthukrishnan, S.: Perfect hashing for strings: formalization and algorithms. In: Proc. of Combinatorial Pattern Matching, pp. 130–140 (1996)
Ferragina, P., Grossi, R.: Fast incremental text editing. In: Proc. of the Symposium on Discrete Algorithms, pp. 531–540 (1995)
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)
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)
Hagerup, T., Miltersen, P.B., Pagh, R.: Deterministic dictionaries. J. of Algorithms 41, 69–85 (2000)
Harel, D., Tarjan, R.E.: Fast algorithms for finding nearest common ancestors. SIAM J. on Computing 13(2), 338–355 (1984)
Knuth, D., Morris, J., Pratt, V.: Fast pattern matching in strings. SIAM J. on Computing 6(2), 323–350 (1977)
Landau, G.M., Vishkin, U.: Fast string matching with k differences. Journal of Computer and System Sciences 37(1), 63–78 (1988)
McCreight, E.M.: A space-economical suffix tree construction algorithm. J. of the ACM 23, 262–272 (1976)
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)
Ukkonen, E.: On-line construction of suffix trees. Algorithmica 14, 249–260
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)
Weiner, P.: Linear pattern matching algorithm. In: Proc. of the Symposium on Switching and Automata Theory, pp. 1–11 (1973)
Willard, D.E.: Log-logarithmic worst case range queries are possible in space θ(n). Information Processing Letters 17, 81–84 (1983)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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