Abstract
We consider the well known string matching problem where a text and pattern are given and the problem is to determine if the pattern appears as a substring in the text. The setting we investigate is where the pattern and the text are preprocessed separately at two different sites. At some point in time the two sites wish to determine if the pattern appears in the text (this is the on-line stage). We provide preprocessing and on-line algorithms such that the preprocessing algorithm runs in linear time and requires linear storage and the on-line complexity is logarithmic in the text. We also give an application of the algorithm to parallel data compression, and show how to implement the Lempel Ziv algorithm in logarithmic time with linear number of processors.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
A. V. Aho, Algorithms for finding patterns in strings, in The Handbook of Theoretical Computer Science, edited by J. van Leeuwen, Elsevier, Amsterdam, 1990.
A. V. Aho, J. E. Hopcroft and J. D. Ullman, The design and analysis of computer algorithms, Addison-Wesley, Reading, MA, 1974.
A. Apostolico and Z. Galil, Combinatorial algorithms on words, Springer-Verlag, 1985.
A. Apostolico, C. Iliopoulos, G. M. Landau, B. Schieber and U. Vishkin, Parallel construction of a suffix tree with applications, Algorithmica 3, 1988, pp. 347–365.
Chen and Seifres, Efficient and elegant subword-tree construction, in combinatorial algorithms on words, Springer-Verlag, 1985, pp. 97–110.
C. Jordan, Sur le assemblages des lignes, J. Reine und Ang. Math. 70, 1869, pp. 185–190.
R. M. Karp and M. O. Rabin Efficient randomized pattern-matching algorithms, IBM Journal of R&D, 31, 1987, 249–260.
D. E. Knuth, J. H. Morris and V. R. Pratt, Fast pattern matching in strings, Siam journal on Computing 6, 1977, pp. 323–349.
A. Lempel and J. Ziv, On the complexity of finite sequences, IEEE Transactions on Information Theory 22, 1976, pp. 75–81.
E. M. McCreight, A space economical suffix tree construction algorithm, Journal of the ACM 23, 1976, 262–272.
N. Megiddo, Applying parallel computation algorithms in the design of serial algorithms, Journal of the ACM 30, 1983, pp 852–865.
M. Rodeh, V. R. Pratt and S. Even, Linear algorithms for compression via string matching, Journal of the ACM 28, 1980, pp. 16–24.
J. A. Storer, Data compression: methods and theory, Computer Science Press, Rockville, 1988.
P. Weiner, Linear pattern matching algorithms Proc. 14th annual Symp. on Switching and Automata Theory, pp. 1–11.
A. C. Yao Some complexity question related to distributive computing Proc. 11th ACM Symposioum on Theory of Computing, 1979, pp. 209–213.
J. Ziv and A. Lempel, A universal algorithm for sequential data compression, IEEE Transactions on Information Theory 23, 1977, pp. 337–343.
J. Ziv and A. Lempel, Compression of individual sequences via variable-rate coding, IEEE Transactions on Information Theory 24, 1978, pp. 530–536.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1991 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Naor, M. (1991). String matching with preprocessing of text and pattern. In: Albert, J.L., Monien, B., Artalejo, M.R. (eds) Automata, Languages and Programming. ICALP 1991. Lecture Notes in Computer Science, vol 510. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-54233-7_179
Download citation
DOI: https://doi.org/10.1007/3-540-54233-7_179
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-54233-9
Online ISBN: 978-3-540-47516-3
eBook Packages: Springer Book Archive