Abstract
We show an efficient pattern-matching algorithm for strings that are succinctly described in terms of straight-line programs, in which the constants are symbols and the only operation is the concatenation. In this paper, both text T and pattern P are given by straight-line programs T and P. The length of the text T (pattern P, resp.) may grow exponentially with respect to its description size âTâ=n (âpâ=m, resp.). We show a new combinatorial property concerning with the periodic occurrences of a pattern in a text. Based on this property, we develop an O(n 2 m 2) time algorithm using O(nm) space, which outputs a compact representation of all occurrences of P in T. This is superior to the algorithm proposed by Karpinski et al. [11], which runs in O((n+m) 4 log (n+m)) time using O((n+m)3) space, and finds only one occurrence. Moreover, our algorithm is much simpler than theirs.
This research was supported in part by Grant-in-Aid for Scientific Research (A) from the Ministry of Education, Science, Sports and Culture, Japan, No. 07558051.
Preview
Unable to display preview. Download preview PDF.
References
A. Amir and G. Benson. Efficient two-dimensional compressed matching. In Proc. Data Compression Conference, page 279, 1992.
A. Amir and G. Benson. Two-dimensional periodicity and its application. In Proc. 3rd Symposium on Discrete Algorithms, page 440, 1992.
A. Amir, G. Benson, and M. Farach. Optimal two-dimensional compressed matching. In Proc. 21st International Colloquium on Automata, Languages and Programming, 1994.
A. Amir, G. Benson, and M. Farach. Let sleeping files lie: Pattern matching in Z-compressed files. Journal of Computer and System Sciences, 52:299â307, 1996.
A. Amir, G. M. Landau, and U. Vishkin. Efficient pattern matching with scaling. Journal of Algorithms, 13(1):2â32, 1992.
T. Eilam-Tsoreff and U. Vishkin. Matching patterns in a string subject to multilinear transformations. In Proc. International Workshop on Sequences, Combinatorics, Compression, Security and Transmission, 1988.
M. Farach and M. Thorup. String-matching in Lempel-Ziv compressed strings. In 27th ACM STOC, pages 703â713, 1995.
L. Gasieniec, M. Karpinski, W. Plandowski, and W. Rytter. Efficient algorithms for Lempel-Ziv encoding. In Proc. 4th Scandinavian Workshop on Algorithm Theory, volume 1097 of Lecture Notes in Computer Science, pages 392â403. Springer-Verlag, 1996.
L. Gasieniec, M. Karpinski, W. Plandowski, and W. Rytter. Randomized efficient algorithms for compressed strings: the finger-print approach. In Proc. Combinatorial Pattern Matching, volume 1075 of Lecture Notes in Computer Science, pages 39â49. Springer-Verlag, 1996.
M. Karpinski, W. Rytter, and A. Shinohara. Pattern-matching for strings with short descriptions. In Proc. Combinatorial Pattern Matching, volume 637 of Lecture Notes in Computer Science, pages 205â214. Springer-Verlag, 1995.
M. Karpinski, W. Rytter, and A. Shinohara. An efficient pattern-matching algorithm for strings with short descriptions. Nordic Journal of Computing, 1997. (to appear).
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
Âİ 1997 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Miyazaki, M., Shinohara, A., Takeda, M. (1997). An improved pattern matching algorithm for strings in terms of straight-line programs. In: Apostolico, A., Hein, J. (eds) Combinatorial Pattern Matching. CPM 1997. Lecture Notes in Computer Science, vol 1264. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-63220-4_45
Download citation
DOI: https://doi.org/10.1007/3-540-63220-4_45
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-63220-7
Online ISBN: 978-3-540-69214-0
eBook Packages: Springer Book Archive