scispace - formally typeset
Book ChapterDOI

Pattern-matching for strings with short descriptions

TLDR
In this article, it was shown 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.
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

read more

Content maybe subject to copyright    Report

Citations
More filters
Journal ArticleDOI

Algorithmics on SLP-compressed strings: A survey

TL;DR: Results on algorithmic problems on strings that are given in a compressed form via straight-line programs are surveyed and applications in combinatorial group theory and computational topology and to the solution of word equations are discussed.
Book ChapterDOI

Processing compressed texts: a tractability border

TL;DR: A pair of similar problems (equivalence checking, Hamming distance computation) that have radically different complexity on compressed texts are indicated.
Book ChapterDOI

Efficient algorithms for Lempel-Ziv encoding

TL;DR: In this paper, it was shown that if the input texts are given by their Lempel-Ziv codes then the problems can be solved deterministically in polynomial time in the case when the original (uncompressed) texts are of exponential size.
Book ChapterDOI

An Improved Pattern Matching Algorithm for Strings in Terms of Straight-Line Programs

TL;DR: An O(n2m2) time algorithm using O(nm) space is developed, which outputs a compact representation of all occurrences of P in T, which is superior to the algorithm proposed by Karpinski et al.
Journal ArticleDOI

A really simple approximation of smallest grammar

TL;DR: In this paper, a simple linear-time algorithm is presented for constructing a context-free grammar of size 4 g log 3 / 2? ( N / g ) for the input string, where N is the size of the input text and g is the length of the optimal grammar generating this text.
References
More filters
Book

Computers and Intractability: A Guide to the Theory of NP-Completeness

TL;DR: The second edition of a quarterly column as discussed by the authors provides a continuing update to the list of problems (NP-complete and harder) presented by M. R. Garey and myself in our book "Computers and Intractability: A Guide to the Theory of NP-Completeness,” W. H. Freeman & Co., San Francisco, 1979.

Reducibility Among Combinatorial Problems.

TL;DR: Throughout the 1960s I worked on combinatorial optimization problems including logic circuit design with Paul Roth and assembly line balancing and the traveling salesman problem with Mike Held, which made me aware of the importance of distinction between polynomial-time and superpolynomial-time solvability.
Book

Combinatorics on words

M. Lothaire
TL;DR: Perrin and Perrin this article showed that square free words and idempotent semigroups can be expressed in terms of free monoids, and the critical factorization theorem of Van der Waerden's theorem.
Book

Text algorithms

Book ChapterDOI

Testing Equivalence of Morphisms on Context-Free Languages

TL;DR: A polynomial time algorithm for testing if two morphisms are equal on every word of a context-free language and whether or not n first elements of two sequences of words defined by recurrence formulae are the same.