自定界数的排序与排名及其在外平面图同构中的应用
Sorting and Ranking of Self-Delimiting Numbers with Applications to Outerplanar Graph Isomorphism
AI总结:
针对以Elias gamma码编码的自定界数序列,本文在word RAM模型下提出O(k+N/log N)时间、O(N)位空间的高效排序与稠密/竞争排名算法,并应用于树、森林及外平面图同构,实现O(n)时间与O(n)位空间。
摘要:
假设输入为一个由 k 个数以 Elias gamma 码编码组成的 N 位序列 S。我们在字长 Ω(log N) 位的 word RAM 模型中,提出了针对 S 的空间高效排序、稠密排名和竞争排名算法。这些算法运行时间为 O(k + N/log N),空间占用为 O(N) 位。排序算法将给定数字按有序顺序返回,并存储在一个 N 位的位向量中;而排名算法构造的数据结构允许我们在常数时间内返回 S 中每个数 x 的稠密排名或竞争排名。对于 x ∈ ℕ 且 x > N 的数,我们的稠密/竞争排名数据结构需要 x 的位置 p_x 作为输入。作为上述算法的一个应用,我们给出了一个树同构算法,该算法在 n 节点树上运行时间为 O(n),空间占用为 O(n) 位。最后,我们将树同构的结果推广到森林和外平面图,同时保持 O(n) 位的空间占用。此前针对树、森林和外平面图同构的最优线性时间算法均使用 Θ(n log n) 位空间。
英文摘要:
Assume that an $N$-bit sequence $S$ of $k$ numbers encoded as Elias gamma codes is given as input. We present space-efficient algorithms for sorting, dense ranking and competitive ranking on $S$ in the word RAM model with word size $Ω(\log N)$ bits. Our algorithms run in $O(k + \frac{N}{\log N})$ time and use $O(N)$ bits. The sorting algorithm returns the given numbers in sorted order, stored within a bit-vector of $N$ bits, whereas our ranking algorithms construct data structures that allow us subsequently to return the dense/competitive rank of each number $x$ in $S$ in constant time. For numbers $x \in \mathbb{N}$ with $x > N$ we require the position $p_x$ of $x$ as the input for our dense-/competitive-rank data structure. As an application of our algorithms above we give an algorithm for tree isomorphism, which runs in $O(n)$ time and uses $O(n)$ bits on $n$-node trees. Finally, we generalize our result for tree isomorphism to forests and outerplanar graphs, while maintaining a space-usage of $O(n)$ bits. The previous best linear-time algorithms for trees, forests and outerplanar graph isomorphism all use $Θ(n \log n)$ bits.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。