再论后缀树中的加权祖先
Weighted Ancestors in Suffix Trees Revisited
摘要:
加权祖先问题是一个著名的推广的前身问题的树。已知如果$O(n\mathop{\mathrm{polylog}} n)$空间可用并且权重来自$[0..n]$,则查询需要$Ω(\log\log n)$时间,其中$n$是树节点的数量。然而,当应用于后缀树时,令人惊讶的是,该问题允许具有恒定查询时间的$O(n)$空间解决方案,如Gawrychowski,Lewenstein和Nicholson所示(Proc. ESA 2014)。这个问题的变体可以重新表述如下:给定一个字符串$s$的后缀树,我们需要一个数据结构,它可以在$O(1)$时间内在树中定位$s$的任何子串$s[p..q]$(就像一个人从根开始一路读$s[p..q]$)。不幸的是,Gawrychowski等人的数据结构没有有效的构造算法,限制了其作为算法工具的更广泛使用。在本文中,我们解决了这个问题,描述了一个数据结构的加权祖先后缀树与常数查询时间和线性构造算法。我们的解决方案是基于一种新的方法,使用所谓的不可约LCP值。
英文摘要:
The weighted ancestor problem is a well-known generalization of the predecessor problem to trees. It is known to require $Ω(\log\log n)$ time for queries provided $O(n\mathop{\mathrm{polylog}} n)$ space is available and weights are from $[0..n]$, where $n$ is the number of tree nodes. However, when applied to suffix trees, the problem, surprisingly, admits an $O(n)$-space solution with constant query time, as was shown by Gawrychowski, Lewenstein, and Nicholson (Proc. ESA 2014). This variant of the problem can be reformulated as follows: given the suffix tree of a string $s$, we need a data structure that can locate in the tree any substring $s[p..q]$ of $s$ in $O(1)$ time (as if one descended from the root reading $s[p..q]$ along the way). Unfortunately, the data structure of Gawrychowski et al. has no efficient construction algorithm, limiting its wider usage as an algorithmic tool. In this paper we resolve this issue, describing a data structure for weighted ancestors in suffix trees with constant query time and a linear construction algorithm. Our solution is based on a novel approach using so-called irreducible LCP values.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。