arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1712.09738cs.CCcs.DSmath.CO
收藏

字符串匹配的决策树复杂度

On the Decision Tree Complexity of String Matching

Xiaoyu He, Neng Huang, Xiaoming Sun

摘要:

字符串匹配是计算机科学中最基本的问题之一。一个自然的问题是确定字符串中需要查询的字符数(即决策树复杂度),以便决定该字符串是否包含某种模式。Rivest表明,对于每个模式$p$,在最坏的情况下,任何确定性算法都需要查询至少$n-|p|+1$字符,其中$n$是字符串的长度,$|p|$是模式的长度。他进一步强调,这一界限很紧。通过使用对手方法,Tuza反驳了这个猜想,并表明超过一半的二进制模式是{ \em回避}的,即任何算法都需要查询所有字符(更多细节请参见1.1节)。本文给出了一个查询算法,该算法解决了字符串匹配的决策树复杂度问题,只处理了一小部分模式。我们的算法表明,Tuza的标准的回避模式几乎是完整的。利用Rivest和Vuillemin的代数方法,我们还给出了一个新的模式回避性的充分条件,它超出了Tuza的准则。此外,我们的结果揭示了一个有趣的连接到\emph{Skolem's Problem}在数学。

英文摘要:

String matching is one of the most fundamental problems in computer science. A natural problem is to determine the number of characters that need to be queried (i.e. the decision tree complexity) in a string in order to decide whether this string contains a certain pattern. Rivest showed that for every pattern $p$, in the worst case any deterministic algorithm needs to query at least $n-|p|+1$ characters, where $n$ is the length of the string and $|p|$ is the length of the pattern. He further conjectured that this bound is tight. By using the adversary method, Tuza disproved this conjecture and showed that more than one half of binary patterns are {\em evasive}, i.e. any algorithm needs to query all the characters (see Section 1.1 for more details). In this paper, we give a query algorithm which settles the decision tree complexity of string matching except for a negligible fraction of patterns. Our algorithm shows that Tuza's criteria of evasive patterns are almost complete. Using the algebraic approach of Rivest and Vuillemin, we also give a new sufficient condition for the evasiveness of patterns, which is beyond Tuza's criteria. In addition, our result reveals an interesting connection to \emph{Skolem's Problem} in mathematics.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑