Dynamic Text and Static Pattern Matching

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.

[1]  Peter Weiner,et al.  Linear Pattern Matching Algorithms , 1973, SWAT.

[2]  Dan E. Willard Log-Logarithmic Worst-Case Range Queries are Possible in Space Theta(N) , 1983, Inf. Process. Lett..

[3]  Esko Ukkonen,et al.  On-line construction of suffix trees , 1995, Algorithmica.

[4]  Robert E. Tarjan,et al.  Fast Algorithms for Finding Nearest Common Ancestors , 1984, SIAM J. Comput..

[5]  Richard Cole,et al.  Tighter Lower Bounds on the Exact Complexity of String Matching , 1995, SIAM J. Comput..

[6]  Ming Gu,et al.  An efficient algorithm for dynamic text indexing , 1994, SODA '94.

[7]  Roberto Grossi,et al.  Fast incremental text editing , 1995, SODA '95.

[8]  S. Muthukrishnan,et al.  Perfect Hashing for Strings: Formalization and Algorithms , 1996, CPM.

[9]  Uzi Vishkin,et al.  Efficient approximate and dynamic matching of patterns using a labeling paradigm , 1996, Proceedings of 37th Conference on Foundations of Computer Science.

[10]  Edward M. McCreight,et al.  A Space-Economical Suffix Tree Construction Algorithm , 1976, JACM.

[11]  Stephen Alstrup,et al.  Pattern matching in dynamic texts , 2000, SODA '00.

[12]  Michael T. Goodrich,et al.  Range Searching Over Tree Cross Products , 2000, ESA.

[13]  Gad M. Landau,et al.  Inplace run-length 2d compressed search , 2000, SODA '00.

[14]  Robert E. Tarjan,et al.  Scaling and related techniques for geometry problems , 1984, STOC '84.

[15]  M. Farach Optimal suffix tree construction with large alphabets , 1997, Proceedings 38th Annual Symposium on Foundations of Computer Science.

[16]  Uzi Vishkin,et al.  Fast String Matching with k Differences , 1988, J. Comput. Syst. Sci..

[17]  Donald E. Knuth,et al.  Fast Pattern Matching in Strings , 1977, SIAM J. Comput..