arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2607.18739cs.DS

带偏移量的索引范围最大和段查询

Indexing Range Maximum-Sum Segment Queries with Offsets

Seungbum Jo, Dominik Köppl

首次发表
浏览论文内容

中文总结 AI 辅助

研究在为数组所有元素减去查询偏移参数后,为任意查询范围检索最大段和的问题,提出一种索引,其查询时间仅比已知最佳慢\(O(\log n)\)倍,给出不同空间和时间复杂度的索引,并得到相关附带结果及下界。

中文摘要 AI 辅助

给定一个包含\(n\)个实数的数组,最大段和(MSS)问题是找到具有最大和的连续子数组。虽然MSS问题可以用Kadane算法在\(O(n)\)时间内最优解决,但其索引版本的研究催生了新的扩展,如在为所有数组元素减去查询偏移参数后检索MSS,或为任意查询范围检索MSS。本文研究了这两个问题的组合,即对所有数组元素减去查询偏移参数后为任意查询范围检索MSS。为此,我们提出了一种索引,其查询时间仅比已知最佳时间慢\(O(\log n)\)倍。具体来说,我们的索引使用\(O(n \log n)\)空间,支持在\(O(\log^2 n)\)时间内查询,并且可以在\(O(n \log^3 n)\)时间内构建。更一般地,对于每个满足\(1\leq d\leq\lceil\log_2 n\rceil\)的整数\(d\),我们给出一个\(O(dn)\)空间的索引,其查询时间为\(O(dn^{1/d}\log n)\);特别地,对于每个固定的\(\varepsilon>0\),我们获得线性空间和\(O(n^\varepsilon\log n)\)查询时间。作为附带结果,我们在游程编码输入的运行次数方面获得了相同的时空权衡,推导出一个在游程压缩空间和时间内有效的(a)的解决方案,并证明了二进制数组不兼容偏移量数量的紧\(\Theta(n^{2/3})\)界。最后,我们给出了查询问题的支持性下界,表明改进的空间只剩下多对数差距。

英文摘要

Given an array of $n$ real numbers, the maximum segment sum (MSS) problem is to find a contiguous subarray that has the largest sum. While the MSS problem can be solved optimally with Kadane's algorithm in $O(n)$ time, the study of its indexing version spawned new extensions such as (a) retrieving the MSS after subtracting a query offset parameter for all array entries or (b) retrieving the MSS for arbitrary query ranges. We here study the combination of both problems (a) and (b), which requires retrieving the MSS for arbitrary query ranges after subtracting a query offset parameter for all array entries. For that, we present an index whose query time is only slower than the best known for (a) by a factor of $O(\log n)$. In detail, our index uses $O(n \log n)$ space, supports queries in $O(\log^2 n)$ time, and can be constructed in $O(n \log^3 n)$ time. More generally, for every integer $d$ with $1\le d\le\lceil\log_2 n\rceil$, we give an $O(dn)$-space index with $O(dn^{1/d}\log n)$ query time; in particular, for every fixed $\varepsilon>0$, we obtain linear space and $O(n^\varepsilon\log n)$ query time. As side results, we obtain the same time-space trade-off in terms of the number of runs of a run-length encoded input, deduce a solution for (a) that works in run-length compressed space and time, and prove a tight $Θ(n^{2/3})$ bound on the number of non-compatible offsets for binary arrays. Finally, we give supportive lower bounds for our query problem, showing that there is only a polylogarithmic gap of improvement left.

补充信息

↑