arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2510.17645cs.DS
收藏

面向模式匹配的近最优性质测试器

Near-Optimal Property Testers for Pattern Matching

University of California, Berkeley(加州大学伯克利分校);Max Planck Institute for Informatics(马克斯·普朗克 informatics 研究所)

Ce Jin, Tomasz Kociumaka

AI总结:

本文研究精确模式匹配的性质测试,给出覆盖全参数范围的自适应与非自适应测试器,并通过无条件下界证明其时间与查询复杂度在 polylog n 因子内近最优。

摘要:

经典精确模式匹配问题给定两个字符串——长度为 m 的模式 P 和长度为 n 的文本 T——询问 P 是否作为 T 的子串出现。针对该问题的性质测试器需要在某个阈值 k 下,以高概率区分以下两种情形:YES 情形,即 P 作为 T 的子串出现;NO 情形,即 P 与 T 的每个子串的 Hamming 距离都大于 k,也就是说,P 在 T 中不存在 k-错配出现。在本工作中,我们给出了精确模式匹配问题的自适应与非自适应性质测试器,共同覆盖整个参数范围。我们进一步建立了无条件下界,证明我们算法的时间和查询复杂度是最优的,仅相差隐藏在下文 \ ilde O(·) 记号中的 polylog n 因子。在研究最充分的区间 n=m+Θ(m) 中,我们的非自适应性质测试器具有 \ ilde O(n/√k) 的时间复杂度,并且一个相匹配的下界对自适应算法的查询复杂度依然成立。这既改进了一个达到最优查询复杂度但需要 Ω(n) 时间的常识性方案,也改进了此前唯一已知的亚线性时间性质测试器,即 Chan、Golan、Kociumaka、Kopelowitz 和 Porat [STOC 2020] 的工作,其时间复杂度为 \ ilde O(n/∛k)。上述结果对 n=m+Ω(m) 仍然成立,在此区间我们的最优运行时间 \ ilde O(√(nm/k)+n/k) 改进了此前最佳时间复杂度 \ ilde O(∛(n²m/k)+n/k)。在 n=m+o(m) 这一此前没有任何工作针对的区间中,我们建立了自适应与非自适应算法之间令人惊讶的分离:二者的最优时间和查询复杂度分别为 \ ilde O(√((n-m+1)m/k)+n/k) 和 \ ilde O(min(n√(n-m+1)/k, √(nm/k)+n/k))。

英文摘要:

The classic exact pattern matching problem, given two strings -- a pattern $P$ of length $m$ and a text $T$ of length $n$ -- asks whether $P$ occurs as a substring of $T$. A property tester for the problem needs to distinguish (with high probability) the following two cases for some threshold $k$: the YES case, where $P$ occurs as a substring of $T$, and the NO case, where $P$ has Hamming distance greater than $k$ from every substring of $T$, that is, $P$ has no $k$-mismatch occurrence in $T$. In this work, we provide adaptive and non-adaptive property testers for the exact pattern matching problem, jointly covering the whole spectrum of parameters. We further establish unconditional lower bounds demonstrating that the time and query complexities of our algorithms are optimal, up to $\mathrm{polylog}\, n$ factors hidden within the $\tilde O(\cdot)$ notation below. In the most studied regime of $n=m+Θ(m)$, our non-adaptive property tester has the time complexity of $\tilde O(n/\sqrt{k})$, and a matching lower bound remains valid for the query complexity of adaptive algorithms. This improves both upon a folklore solution that attains the optimal query complexity but requires $Ω(n)$ time, and upon the only previously known sublinear-time property tester, by Chan, Golan, Kociumaka, Kopelowitz, and Porat [STOC 2020], with time complexity $\tilde O(n/\sqrt[3]{k})$. The aforementioned results remain valid for $n=m+Ω(m)$, where our optimal running time $\tilde O(\sqrt{nm/k}+n/k)$ improves upon the previously best time complexity of $\tilde O(\sqrt[3]{n^2m/k}+n/k)$. In the regime of $n=m+o(m)$, which has not been targeted in any previous work, we establish a surprising separation between adaptive and non-adaptive algorithms, whose optimal time and query complexities are $\tilde O(\sqrt{(n-m+1)m/k}+n/k)$ and $\tilde O(\min(n\sqrt{n-m+1}/k,\sqrt{nm/k}+n/k))$, respectively.

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

↑