区间最大和分段编码及其应用
Encodings of Range Maximum-Sum Segment Queries and Applications
摘要:
给定一个包含任意(正数和负数)数的数组A,我们考虑在A上支持范围最大和段查询的问题:即,给定一个任意范围[i,j],返回子范围[i',j' ] \subseteq [i,j],使得A[i '. j ′]最大化。Chen and Chao [Disc. App.Math.2007]提出了一种用于该问题的数据结构,其占用了Θ(n)个字,可以在Θ(n)时间内构造,并且支持在Θ(1)时间内的查询。我们的第一个结果是,如果只需要索引[i ',j'](而不是在该子范围中实现的最大和),则可以将空间减少到Θ(n)位,而不管存储在A中的数字,同时保持相同的构造和查询时间。我们还提高了最好的已知的空间下界的任何数据结构,支持范围最大和段查询从n位到1.89113 n- Θ(lg n)位,对于足够大的值n。最后,我们提供了这种数据结构的新应用,其简化了用于寻找k覆盖的先前已知的线性时间算法:即,给定一个n个数的数组A和一个数k,找出k个不相交的子范围[i_1,j_1],.,[i_k,j_k ],使得子范围中的所有数字的总和最大化。
英文摘要:
Given an array A containing arbitrary (positive and negative) numbers, we consider the problem of supporting range maximum-sum segment queries on A: i.e., given an arbitrary range [i,j], return the subrange [i' ,j' ] \subseteq [i,j] such that the sum of the numbers in A[i'..j'] is maximized. Chen and Chao [Disc. App. Math. 2007] presented a data structure for this problem that occupies Θ(n) words, can be constructed in Θ(n) time, and supports queries in Θ(1) time. Our first result is that if only the indices [i',j'] are desired (rather than the maximum sum achieved in that subrange), then it is possible to reduce the space to Θ(n) bits, regardless the numbers stored in A, while retaining the same construction and query time. We also improve the best known space lower bound for any data structure that supports range maximum-sum segment queries from n bits to 1.89113n - Θ(lg n) bits, for sufficiently large values of n. Finally, we provide a new application of this data structure which simplifies a previously known linear time algorithm for finding k-covers: i.e., given an array A of n numbers and a number k, find k disjoint subranges [i_1 ,j_1 ],...,[i_k ,j_k ], such that the total sum of all the numbers in the subranges is maximized.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。