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

利用函数反向技术的高效文本索引与匹配

Space-Efficient Text Indexing with Mismatches using Function Inversion

University of Massachusetts, Amherst(马萨诸塞大学阿默斯特分校);Northwestern University(西北大学);Williams College(威廉姆斯学院)

Jackson Bibbens, Levi Borevitz, Samuel McCauley

AI总结:

本文提出一种空间复杂度为O(n)的文本索引结构,实现查询时间显著优于现有方法,同时首次实现子线性空间的数据结构。

摘要:

一个经典的数据结构问题是预处理长度为n的字符串T,使得给定查询q时,能够快速找到T中所有与查询字符串汉明距离不超过k的子串。CGL树(Cole, Gottlieb, Lewenstein 2004)在广泛参数范围内实现了最佳最坏情况界,查询时间约为~O(|q| + log^k n + # occ),空间为O(n log^k n)。最近,CGL树的空间被改进为O(n log^{k-1} n)(Kociumaka, Radoszewski 2026)。本文提出一种空间复杂度为O(n)的数据结构,查询时间约为~O(|q| + log^{4k} n + log^{2k} n # occ),且不依赖于字母表Σ的大小。即使|Σ|=O(1),当k≥3时,这是已知的最佳查询时间,除非# occ较大。我们的结果提供了时间与空间之间的平滑权衡。我们还首次实现了子线性空间的结果:我们给出了仅使用o(n)额外空间的数据结构。我们的主要技术思想是将函数反向(Fiat, Naor 2000)应用于CGL树。结合这些技术并非直接可行;实际上,我们重新审视了Fiat-Naor数据结构和CGL树的阐述以获得我们的界。在此过程中,我们获得了两种数据结构的改进性能,这可能具有独立兴趣。

英文摘要:

A classic data structure problem is to preprocess a string T of length $n$ so that, given a query $q$, we can quickly find all substrings of T with Hamming distance at most $k$ from the query string. Variants of this problem have seen significant research both in theory and in practice. For a wide parameter range, the best worst-case bounds are achieved by the "CGL tree" (Cole, Gottlieb, Lewenstein 2004), which achieves query time roughly $\tilde{O}(|q| + \log^k n + \# occ)$ where $\# occ$ is the size of the output, and space ${O}(n\log^k n)$. The CGL Tree space was recently improved to $O(n \log^{k-1} n)$ (Kociumaka, Radoszewski 2026). A natural question is whether a high space bound is necessary. How efficient can we make queries when the data structure is constrained to $O(n)$ space? While this question has seen extensive research, all known results have query time with unfavorable dependence on $n$, $k$, and the alphabet $Σ$. The state of the art query time (Chan et al. 2011) is roughly $\tilde{O}(|q| + |Σ|^k \log^{k^2 + k} n + \# occ)$. We give an $O(n)$-space data structure with query time roughly $\tilde{O}(|q| + \log^{4k} n + \log^{2k} n \# occ)$, with no dependence on $|Σ|$. Even if $|Σ| = O(1)$, this is the best known query time for linear space if $k\geq 3$ unless $\# occ$ is large. Our results give a smooth tradeoff between time and space. We also give the first sublinear-space results: we give a succinct data structure using only $o(n)$ space in addition to the text itself. Our main technical idea is to apply function inversion (Fiat, Naor 2000) to the CGL tree. Combining these techniques is not immediate; in fact, we revisit the exposition of both the Fiat-Naor data structure and the CGL tree to obtain our bounds. Along the way, we obtain improved performance for both data structures, which may be of independent interest.

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

↑