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

用于回答在线乘积查询的最优预处理

Optimal Preprocessing for Answering On-Line Product Queries

Noga Alon, Baruch Schieber

AI总结:

本文研究在线半群乘积查询的最优预处理,证明对任意固定步数k需Θ(nλ(k,n))预处理,线性预处理下查询时间为O(α(n)),并将结果推广到树路径查询及最优并行算法。

摘要:

我们研究为了尽可能快地回答某些在线查询所需的预处理量。我们从以下基本问题开始。假设给定一个半群 $(S,\circ )$。设 $s_1 ,\ldots, s_n$ 为 $S$ 中的元素。对于任意给定的 $1\le i\le j\le n$,我们希望回答形如“乘积 $s_i \circ s_{i+1} \circ \cdots \circ s_{j-1} \circ s_j$ 是多少?”的在线查询。我们证明,对于任意固定的 $k$,$Θ(n λ(k,n))$ 的时间和空间预处理既是必要的也是充分的,可以在至多 $k$ 步内回答每个这样的查询。函数 $λ(k,\cdot)$ 是原始递归层级中第 $\lfloor {k/2}\rfloor$ 层某个函数的逆函数。在需要线性预处理的情况下,我们证明可以在 $O( α(n))$ 步内回答每个这样的查询,并且这是最优的。函数 $α(n)$ 是逆 Ackermann 函数。\n我们还考虑以下扩展问题。设 $T$ 是一棵树,其每个顶点都与 $S$ 中的一个元素相关联。对于 $T$ 中任意一对顶点 $u$ 和 $v$,我们希望回答形如“沿从 $u$ 到 $v$ 的路径上与顶点相关联的元素的乘积是多少?”的在线查询。对于回答此类查询所需的预处理,我们得到了与上述类似的结果。\n我们所有的顺序预处理算法都可以高效地并行化,从而得到在 CREW PRAM 上以 $O(\log n)$ 时间运行的最优并行算法。这些并行算法在运行时间和总操作数两方面都是最优的。\n我们的算法,尤其是对于实数半群上的最小值或最大值运算,在某些图算法、通信网络的利用以及数据库检索中有多种应用。

英文摘要:

We examine the amount of preprocessing needed for answering certain on-line queries as fast as possible. We start with the following basic problem. Suppose we are given a semigroup $(S,\circ )$. Let $s_1 ,\ldots, s_n$ be elements of $S$. We want to answer on-line queries of the form, ``What is the product $s_i \circ s_{i+1} \circ \cdots \circ s_{j-1} \circ s_j$?'' for any given $1\le i\le j\le n$. We show that a preprocessing of $Θ(n λ(k,n))$ time and space is both necessary and sufficient to answer each such query in at most $k$ steps, for any fixed $k$. The function $λ(k,\cdot)$ is the inverse of a certain function at the $\lfloor {k/2}\rfloor$-th level of the primitive recursive hierarchy. In case linear preprocessing is desired, we show that one can answer each such query in $O( α(n))$ steps and that this is best possible. The function $α(n)$ is the inverse Ackermann function. We also consider the following extended problem. Let $T$ be a tree with an element of $S$ associated with each of its vertices. We want to answer on-line queries of the form, ``What is the product of the elements associated with the vertices along the path from $u$ to $v$?'' for any pair of vertices $u$ and $v$ in $T$. We derive results that are similar to the above, for the preprocessing needed for answering such queries. All our sequential preprocessing algorithms can be parallelized efficiently to give optimal parallel algorithms which run in $O(\log n)$ time on a CREW PRAM. These parallel algorithms are optimal in both running time and total number of operations. Our algorithms, especially for the semigroup of the real numbers with the minimum or maximum operations, have various applications in certain graph algorithms, in the utilization of communication networks and in Database retrieval.

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

↑