持久串中的随机访问和段选择
Random Access in Persistent Strings and Segment Selection
摘要:
我们认为紧凑的表示类似的字符串,支持随机访问查询的集合。字符串的集合由有根树给出,其中边由编辑操作(插入,删除或替换字符)标记,节点表示通过在从根到节点的路径上应用编辑操作序列获得的字符串。目标是compensate表示整个集合,同时支持对集合中字符串的任何部分的快速随机访问。此问题捕获自然场景,例如表示编辑文档的过去历史或表示高度重复的集合。给定一棵树与$n$节点,我们展示了如何表示相应的集合在$O(n)$空间和$O(\log n/ \log \log n)$查询时间。这改善了以前的时间-空间权衡的问题。此外,我们展示了一个下界证明,查询时间是最佳的任何解决方案,使用近线性空间。为了实现我们的持久字符串中的随机访问的界限,我们展示了如何将问题减少到以下线段上的自然几何选择问题。考虑平面中的一组水平线段。给定参数$i$和$j$,段选择查询返回与$x$ -坐标$i$垂直相交的段中的$j$第小段(具有$j$第小$y$ -坐标的段).线段选择问题是将一组水平线段预处理成支持快速线段选择查询的紧凑数据结构。我们提出了一个解决方案,使用$O(n)$空间和支持段选择查询在$O(\log n/ \log \log n)$时间,其中$n$是段的数量。此外,我们证明,这个查询时间也是最佳的任何解决方案,使用近线性空间。
英文摘要:
We consider compact representations of collections of similar strings that support random access queries. The collection of strings is given by a rooted tree where edges are labeled by an edit operation (inserting, deleting, or replacing a character) and a node represents the string obtained by applying the sequence of edit operations on the path from the root to the node. The goal is to compactly represent the entire collection while supporting fast random access to any part of a string in the collection. This problem captures natural scenarios such as representing the past history of an edited document or representing highly-repetitive collections. Given a tree with $n$ nodes, we show how to represent the corresponding collection in $O(n)$ space and $O(\log n/ \log \log n)$ query time. This improves the previous time-space trade-offs for the problem. Additionally, we show a lower bound proving that the query time is optimal for any solution using near-linear space. To achieve our bounds for random access in persistent strings we show how to reduce the problem to the following natural geometric selection problem on line segments. Consider a set of horizontal line segments in the plane. Given parameters $i$ and $j$, a segment selection query returns the $j$th smallest segment (the segment with the $j$th smallest $y$-coordinate) among the segments crossing the vertical line through $x$-coordinate $i$. The segment selection problem is to preprocess a set of horizontal line segments into a compact data structure that supports fast segment selection queries. We present a solution that uses $O(n)$ space and support segment selection queries in $O(\log n/ \log \log n)$ time, where $n$ is the number of segments. Furthermore, we prove that that this query time is also optimal for any solution using near-linear space.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。