Pattern-Matching for Strings with Short Descriptions
Pattern-Matching for Strings with Short Descriptions
复制标题
具有简短描述的字符串的模式匹配
DOI:
10.1007/3-540-60044-2_44
复制
发表时间:
1995
期刊:
影响因子:
--
通讯作者:
A. Shinohara
中科院分区:
文献类型:
--
作者:
Marek Karpinski;W. Rytter;A. Shinohara
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 lengthnof a straight-line program (or size of a grammar) which defines this string. Usually the strings of descriptive sizenare of exponential length.FibonacciandThue-Morse wordsare examples of such strings. We show that for a patternPand textTof descriptive sizesm, n, an occurrence ofPinTcan be found (if there is any) in time polynomial with respect ton. This is nontrivial, since the actual lengths ofPandTcould 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.