arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2208.09809cs.DScs.DC
收藏

并行最长递增子序列与 van Emde Boas 树

Parallel Longest Increasing Subsequence and van Emde Boas Trees

Yan Gu, Ziyang Men, Zheqi Shen, Yihan Sun, Zijin Wan

AI总结:

本文针对并行化最长递增子序列(LIS)的长期挑战,提出一种工作量 $O(n\log k)$、跨度 $\tilde{O}(k)$ 的简单并行算法,并推广到加权 LIS,同时设计了支持并行批量操作的 van Emde Boas 树,实验表明其实现高效可扩展且优于现有方法。

摘要:

本文研究最长递增子序列(LIS)问题的并行算法。设 $n$ 为输入规模,$k$ 为输入的 LIS 长度。串行情况下,LIS 是一个简单问题,可以使用动态规划(DP)在 $O(n\log n)$ 工作量内求解。然而,并行化 LIS 是一个长期存在的挑战。我们不知道有任何并行 LIS 算法同时具有最优的 $O(n\log n)$ 工作量和非平凡的并行度(即 $\tilde{O}(k)$ 或 $o(n)$ 跨度)。本文提出一种并行 LIS 算法,其代价为 $O(n\log k)$ 工作量、$\tilde{O}(k)$ 跨度和 $O(n)$ 空间,并且比以往的并行 LIS 算法简单得多。我们还将该算法推广到加权版本的 LIS,即最大化递增子序列中所有对象的加权和。为了给加权 LIS 算法获得更好的工作量上界,我们设计了 van Emde Boas(vEB)树的并行算法,该树与串行 vEB 树具有相同结构,并支持工作高效的并行批量插入、删除和范围查询。我们还实现了所提出的并行 LIS 算法。我们的实现轻量、高效且可扩展。在输入规模为 $10^9$ 时,对于 $k\le 3\times 10^5$ 的输入,我们的 LIS 算法优于高度优化的串行算法(代价为 $O(n\log k)$)。在所有输入实例上,我们的算法也远快于 Shen 等人(2022)现有的最佳并行实现。

英文摘要:

This paper studies parallel algorithms for the longest increasing subsequence (LIS) problem. Let $n$ be the input size and $k$ be the LIS length of the input. Sequentially, LIS is a simple problem that can be solved using dynamic programming (DP) in $O(n\log n)$ work. However, parallelizing LIS is a long-standing challenge. We are unaware of any parallel LIS algorithm that has optimal $O(n\log n)$ work and non-trivial parallelism (i.e., $\tilde{O}(k)$ or $o(n)$ span). This paper proposes a parallel LIS algorithm that costs $O(n\log k)$ work, $\tilde{O}(k)$ span, and $O(n)$ space, and is much simpler than the previous parallel LIS algorithms. We also generalize the algorithm to a weighted version of LIS, which maximizes the weighted sum for all objects in an increasing subsequence. To achieve a better work bound for the weighted LIS algorithm, we designed parallel algorithms for the van Emde Boas (vEB) tree, which has the same structure as the sequential vEB tree, and supports work-efficient parallel batch insertion, deletion, and range queries. We also implemented our parallel LIS algorithms. Our implementation is light-weighted, efficient, and scalable. On input size $10^9$, our LIS algorithm outperforms a highly-optimized sequential algorithm (with $O(n\log k)$ cost) on inputs with $k\le 3\times 10^5$. Our algorithm is also much faster than the best existing parallel implementation by Shen et al. (2022) on all input instances.

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

↑