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

数组中的范围多数和少数

Range Majorities and Minorities in Arrays

Djamal Belazzougui, Travis Gagie, J. Ian Munro, Gonzalo Navarro, Yakov Nekrich

摘要:

Karpinski和Nekrich(2008)介绍了参数化范围多数问题,它要求我们对长度为$n$的字符串进行预处理,以便在给定范围端点的情况下,可以快速找到该范围内相对频率超过阈值$τ$的所有不同元素。后来的作者减少了他们的时间和空间界限,当$τ$在预处理时间固定时,我们需要$O(n \log (1 / τ))$空间和最佳$O(1 / τ)$查询时间或线性空间和$O((1 / τ) \log \log σ)$查询时间,其中$σ$是字母表大小。在本文中,我们给出了具有最佳$O(1 / τ)$查询时间的第一个线性空间解,即使是可变的$τ$(即,用查询指定)。对于$σ$是关于计算机字大小的多项式的情况,我们的空间根据字符串中的符号频率被最优地压缩。否则,要么压缩空间增加任意小的常数因子,要么时间上升到$(1/τ)\cdotω(1)$中的任何函数。我们在Chan等人(2015)引入的参数化范围少数的互补问题上获得了相同的结果,他们已经实现了线性空间和$O(1 / τ)$查询时间与变量$τ$。

英文摘要:

Karpinski and Nekrich (2008) introduced the problem of parameterized range majority, which asks us to preprocess a string of length $n$ such that, given the endpoints of a range, one can quickly find all the distinct elements whose relative frequencies in that range are more than a threshold $τ$. Subsequent authors have reduced their time and space bounds such that, when $τ$ is fixed at preprocessing time, we need either $O(n \log (1 / τ))$ space and optimal $O(1 / τ)$ query time or linear space and $O((1 / τ) \log \log σ)$ query time, where $σ$ is the alphabet size. In this paper we give the first linear-space solution with optimal $O(1 / τ)$ query time, even with variable $τ$ (i.e., specified with the query). For the case when $σ$ is polynomial on the computer word size, our space is optimally compressed according to the symbol frequencies in the string. Otherwise, either the compressed space is increased by an arbitrarily small constant factor or the time rises to any function in $(1/τ)\cdotω(1)$. We obtain the same results on the complementary problem of parameterized range minority introduced by Chan et al. (2015), who had achieved linear space and $O(1 / τ)$ query time with variable $τ$.

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

↑