arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.26264cs.DS
收藏

空间高效的k-错配文本索引

Space-Efficient k-Mismatch Text Indexes

Max Planck Institute for Informatics(马克斯·普朗克 informatics 研究所);University of Warsaw(华沙大学)

Tomasz Kociumaka, Jakub Radoszewski

AI总结:

本研究针对k-错配文本索引的时空权衡问题,提出了空间更优的索引方案,在一般场景和常数字母表场景下均实现了空间复杂度的改进,同时保持原查询时间,并优化了短模式索引的性能。

摘要:

字符串处理中的核心任务是文本索引,其目标是将长度为$n$的文本(字符串)预处理为高效的索引(一种数据结构),以支持针对文本的查询。Cole、Gottlieb和Lewenstein(STOC 2004)提出了$k$-errata trees(k-勘误树),这是一类支持多种近似模式匹配查询的文本索引。具体而言,$k$-errata trees为$k$-错配查询提供了一种简洁的解决方案,该查询要求报告文本中与查询模式的汉明距离不超过$k$的所有子串。由此得到的$k$-错配索引占用$O(n\backslash log^k n)$的空间,对于长度为$m$的模式,查询时间为$O(\backslash log^k n \backslash log \backslash log n + m + occ)$,其中$occ$是近似出现的次数。\n 回顾来看,$k$-errata trees似乎已经得到了很好的优化:尽管在过去二十年里,大量研究工作将$k$-errata trees适配到各种场景中,但在一般情况下,$k$-错配索引原有的时空权衡尚未得到改进。我们提出了首个此类改进方案:一种$k$-错配索引,其空间复杂度为$O(n\backslash log^{k-1} n)$,查询时间与$k$-errata trees相同。\n 此前,根据Chan、Lam、Sung、Tam和Wong(Algorithmica 2010)的研究结果,这种$O(n\backslash log^{k-1} n)$大小的索引仅适用于字母表大小为常数的文本。然而,在该场景下,当$2\backslash le k\backslash le O(1)$且对任意常数$\backslash varepsilon>0$时,我们得到了一种更小的$k$-错配索引,其大小仅为$O(n \backslash log^{k-2+\backslash varepsilon+\backslash frac{2}{k+2-(k \backslash bmod 2)}} n)\backslash subseteq O(n\backslash log^{k-1.5+\backslash varepsilon} n)$。在此过程中,我们还开发了针对短模式的改进索引,在这一具有实际意义的特殊场景中提供了更好的权衡。

英文摘要:

A central task in string processing is text indexing, where the goal is to preprocess a text (a string of length $n$) into an efficient index (a data structure) supporting queries about the text. Cole, Gottlieb, and Lewenstein (STOC 2004) proposed $k$-errata trees, a family of text indexes supporting approximate pattern matching queries of several types. In particular, $k$-errata trees yield an elegant solution to $k$-mismatch queries, where we are to report all substrings of the text with Hamming distance at most $k$ to the query pattern. The resulting $k$-mismatch index uses $O(n\log^k n)$ space and answers a query for a length-$m$ pattern in $O(\log^k n \log \log n + m + occ)$ time, where $occ$ is the number of approximate occurrences. In retrospect, $k$-errata trees appear very well optimized: even though a large body of work has adapted $k$-errata trees to various settings throughout the past two decades, the original time-space trade-off for $k$-mismatch indexing has not been improved in the general case. We present the first such improvement, a $k$-mismatch index with $O(n\log^{k-1} n)$ space and the same query time as $k$-errata trees. Previously, due to a result of Chan, Lam, Sung, Tam, and Wong (Algorithmica 2010), such an $O(n\log^{k-1} n)$-size index has been known only for texts over alphabets of constant size. In this setting, however, we obtain an even smaller $k$-mismatch index of size only $O(n \log^{k-2+\varepsilon+\frac{2}{k+2-(k \bmod 2)}} n)\subseteq O(n\log^{k-1.5+\varepsilon} n)$ for $2\le k\le O(1)$ and any constant $\varepsilon>0$. Along the way, we also develop improved indexes for short patterns, offering better trade-offs in this practically relevant special case.

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

↑