Pattern-matching for strings with short descriptions

Marek Karpinski, Wojciech Rytter, Ayumi Shinohara

Research output: Chapter in Book/Report/Conference proceedingConference contribution

23 Citations (Scopus)


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.

Original languageEnglish
Title of host publicationCombinatorial Pattern Matching - 6th Annual Symposium, CPM 1995, Proceedings
EditorsZvi Galil, Esko Ukkonen
PublisherSpringer Verlag
Number of pages10
ISBN (Print)3540600442, 9783540600442
Publication statusPublished - 1995
Externally publishedYes
Event6th Annual Symposium on Combinatorial Pattern Matching, CPM 1995 - Espoo, Finland
Duration: 1995 Jul 51995 Jul 7

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349


Other6th Annual Symposium on Combinatorial Pattern Matching, CPM 1995

ASJC Scopus subject areas

  • Theoretical Computer Science
  • Computer Science(all)


Dive into the research topics of 'Pattern-matching for strings with short descriptions'. Together they form a unique fingerprint.

Cite this