Skip to main content

Pattern-matching for strings with short descriptions

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

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

Included in the following conference series:

Abstract

We consider strings which are succinctly described. The description is in terms of straight-line programs in which the constants are symbols and the only operation is the concatenation. Such descriptions correspond to the systems of recurrences or to context-free grammars generating single words. The descriptive size of a string is the length n of a straight-line program (or size of a grammar) which defines this string. Usually the strings of descriptive size n are of exponential length. Fibonacci and Thue-Morse words are examples of such strings. We show that for a pattern P and text T of descriptive sizes m, n, an occurrence of P in T can be found (if there is any) in time polynomial with respect to n. This is nontrivial, since the actual lengths of P and T could be exponential, and none of the known string-matching algorithms is directly applicable. Our first tool is the periodicity lemma, which allows to represent some sets of exponentially many positions in terms of feasibly many arithmetic progressions. The second tool is arithmetics: a simple application of Euclid algorithm. Hence a textual problem for exponentially long strings is reduced here to simple arithmetics on integers with (only) linearly many bits. We present also an NP-complete version of the pattern-matching for shortly described strings.

Research partially supported by the DFG Grant KA 673/4-1, and by the ESPRIT BR Grants 7097 and ECUS 030.

Supported by the DFG grant.

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. M. Crochemore and W. Rytter, Text Algorithms, Oxford University Press, New York (1994).

    Google Scholar 

  2. M. Farach and M. Thorup, “String-matching in Lempel-Ziv compressed strings”, to appear in Proc. 27th ACM STOC (1995).

    Google Scholar 

  3. M.R. Garey and D.S. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness. W.H. Freeman (1979).

    Google Scholar 

  4. R.M. Karp, “Reducibility among combinatorial problems”, in R.E. Miller and J.W. Thatcher (eds.), Complexity of Computer Computations, Plemum Press, New York, pp.85–103 (1972).

    Google Scholar 

  5. D. Knuth, The Art of Computing, Vol. II: Seminumerical Algorithms. Second edition. Addison-Wesley (1981).

    Google Scholar 

  6. M. Lothaire, Combinatorics on Words. Addison-Wesley (1993).

    Google Scholar 

  7. W. Plandowski, “Testing equivalence of morphisms on context-free languages”, ESA'94, Lecture Notes in Computer Science 855, Springer-Verlag, 460–470 (1994).

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Zvi Galil Esko Ukkonen

Rights and permissions

Reprints and permissions

Copyright information

© 1995 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Karpinski, M., Rytter, W., Shinohara, A. (1995). Pattern-matching for strings with short descriptions. In: Galil, Z., Ukkonen, E. (eds) Combinatorial Pattern Matching. CPM 1995. Lecture Notes in Computer Science, vol 937. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-60044-2_44

Download citation

  • DOI: https://doi.org/10.1007/3-540-60044-2_44

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-60044-2

  • Online ISBN: 978-3-540-49412-6

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics