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 textbook 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). Here, the work of a parallel algorithm is the total number of operations, and the span is the longest dependent instructions. This paper proposes a parallel LIS algorithm that costs $O(n\log k)$ work, $\tilde{O}(k)$ span, and $O(n)$ space, and is \emph{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. Our weighted LIS algorithm has $O(n\log^2 n)$ work and $\tilde{O}(k)$ span. We also implemented our parallel LIS algorithms. Due to simplicity, 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. on all input instances.
翻译:本文研究了最长增长子序列( LIS) 问题的平行算法。 让美元为输入大小, 美元为输入长度的 LIS 。 因此, LIS 是一个简单的教科书问题, 可以用动态编程( DP) 解决 $O( n\log n) 的工作。 但是, 平行 LIS 是一个长期的挑战。 我们不知道任何平行的 LIS 算法, 它具有最佳的 $( n\log n) 工作和非三重平行( $ ( k) 或 $( 美元) 或 美元( 美元) 输入长度 。 这里, 平行算法的工作是操作的总数, 时间长度是最长的 DP( n\ log n) 工作成本, 时间范围是 $( kn) 和 $( 美元) 空间, 并且比前一个平行的 LIS 算法( 美元) 。 我们的算法, 我们的递增的 RIS 的加权算法, 和 RIS 的算法, 最高级的递增的 RIS 。