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

树路径多数数据结构

Tree Path Majority Data Structures

Travis Gagie, Meng He, Gonzalo Navarro

摘要:

我们提出了第一个解决方案$τ$ -多数树路径。给定$n$节点的树,每个节点具有来自$[1..σ]$的标签和固定阈值$0<τ<1$,这样的查询给出两个节点$u$和$v$,并询问在从$u$到$v$的路径$P_{uv}$中出现超过$τ\cdot |P_{uv}|$次的所有标签,其中$|P_{uv}|$表示$P_{uv}$中的节点数。请注意,任何查询的答案的大小都是$1/τ$。在一个$w$位RAM上,我们得到了一个线性空间的数据结构与$O((1/τ)\log^* n \log\log_w σ)$查询时间。对于任何$κ> 1$,我们也可以构建一个使用$O(n\log^{[κ]} n)$空间的结构,其中$\log^{[κ]} n$表示将对数$κ$时间应用于$n$的函数,并在时间上回答查询$O((1/τ)\log\log_w σ)$。两个结构的施工时间均为$O(n\log n)$。我们还描述了两个简洁的空间解决方案具有相同的查询时间的线性空间结构。一种使用$2nH + 4n + o(n)(H+1)$位,其中$H \le \lgσ$是标签分布的熵,并且可以在$O(n\log n)$时间内构建。另一个使用$nH + O(n) + o(nH)$位,并在$O(n\log n)$时间w.h. p中构建。

英文摘要:

We present the first solution to $τ$-majorities on tree paths. Given a tree of $n$ nodes, each with a label from $[1..σ]$, and a fixed threshold $0<τ<1$, such a query gives two nodes $u$ and $v$ and asks for all the labels that appear more than $τ\cdot |P_{uv}|$ times in the path $P_{uv}$ from $u$ to $v$, where $|P_{uv}|$ denotes the number of nodes in $P_{uv}$. Note that the answer to any query is of size up to $1/τ$. On a $w$-bit RAM, we obtain a linear-space data structure with $O((1/τ)\log^* n \log\log_w σ)$ query time. For any $κ> 1$, we can also build a structure that uses $O(n\log^{[κ]} n)$ space, where $\log^{[κ]} n$ denotes the function that applies logarithm $κ$ times to $n$, and answers queries in time $O((1/τ)\log\log_w σ)$. The construction time of both structures is $O(n\log n)$. We also describe two succinct-space solutions with the same query time of the linear-space structure. One uses $2nH + 4n + o(n)(H+1)$ bits, where $H \le \lgσ$ is the entropy of the label distribution, and can be built in $O(n\log n)$ time. The other uses $nH + O(n) + o(nH)$ bits and is built in $O(n\log n)$ time w.h.p.

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

↑