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

维护动态排列的循环结构

Maintaining the cycle structure of dynamic permutations

Zsuzsanna Lipták, Francesco Masillo, Gonzalo Navarro

AI总结:

本文提出 FST 数据结构,用每循环一棵伸展树维护动态排列,在对换更新及逆、幂、同循环判定、段翻转等查询上均取得 O(log n) 摊还时间。

摘要:

我们提出了一种用于维护动态排列的新数据结构,称之为 forest of splay trees(FST,伸展树森林)。当允许的更新为对换时,FST 能够高效维护排列 π 的循环结构。该结构为 π 的每个循环存储一棵概念上的伸展树,并以元素在循环中的位置作为键。对于一个对换 τ,将 π 更新为 τ·π 需要 O(log n) 的摊还时间,其中 n 是 π 的大小。FST 可在 O(log n) 摊还时间内计算任意 π(i)、π⁻¹(i)、π^k(i) 和 π⁻ᵏ(i)。此外,它还支持针对特定循环的查询,例如判断两个元素是否属于同一循环、翻转循环中的一段,以及其他操作,同样只需 O(log n) 摊还时间。

英文摘要:

We present a new data structure for maintaining dynamic permutations, which we call a $\textit{forest of splay trees (FST)}$. The FST allows one to efficiently maintain the cycle structure of a permutation $π$ when the allowed updates are transpositions. The structure stores one conceptual splay tree for each cycle of $π$, using the position within the cycle as the key. Updating $π$ to $τ\cdotπ$, for a transposition $τ$, takes $\mathcal{O}(\log n)$ amortized time, where $n$ is the size of $π$. The FST computes any $π(i)$, $π^{-1}(i)$, $π^k(i)$ and $π^{-k}(i)$, in $\mathcal{O}(\log n)$ amortized time. Further, it supports cycle-specific queries such as determining whether two elements belong to the same cycle, flip a segment of a cycle, and others, again within $\mathcal{O}(\log n)$ amortized time.

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

↑