Skip to main content

An improved pattern matching algorithm for strings in terms of straight-line programs

  • Conference paper
  • First Online:
Combinatorial Pattern Matching (CPM 1997)

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

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. A. Amir and G. Benson. Efficient two-dimensional compressed matching. In Proc. Data Compression Conference, page 279, 1992.

    Google Scholar 

  2. A. Amir and G. Benson. Two-dimensional periodicity and its application. In Proc. 3rd Symposium on Discrete Algorithms, page 440, 1992.

    Google Scholar 

  3. A. Amir, G. Benson, and M. Farach. Optimal two-dimensional compressed matching. In Proc. 21st International Colloquium on Automata, Languages and Programming, 1994.

    Google Scholar 

  4. 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.

    Google Scholar 

  5. A. Amir, G. M. Landau, and U. Vishkin. Efficient pattern matching with scaling. Journal of Algorithms, 13(1):2–32, 1992.

    Google Scholar 

  6. 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.

    Google Scholar 

  7. M. Farach and M. Thorup. String-matching in Lempel-Ziv compressed strings. In 27th ACM STOC, pages 703–713, 1995.

    Google Scholar 

  8. 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.

    Google Scholar 

  9. 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.

    Google Scholar 

  10. 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.

    Google Scholar 

  11. M. Karpinski, W. Rytter, and A. Shinohara. An efficient pattern-matching algorithm for strings with short descriptions. Nordic Journal of Computing, 1997. (to appear).

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Alberto Apostolico Jotun Hein

Rights and permissions

Reprints 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

Publish with us

Policies and ethics