稀疏非负卷积与稠密非负卷积等价
Sparse Nonnegative Convolution Is Equivalent to Dense Nonnegative Convolution
摘要:
计算两个长度为$n$的向量$A,B$的卷积$A\star B$是普遍存在的计算原语.应用范围从字符串问题到背包型问题,从3SUM到所有对最短路径。这些应用通常以非负卷积的形式出现,其中$A,B$的条目是非负整数。计算$A\star B$的经典算法使用快速傅立叶变换并在时间上运行$O(n\log n)$。然而,$A$和$B$通常满足稀疏性条件,因此人们可以期望有显著的改进。理想的目标是$O(k\log k)$时间算法,其中$k$是输出中非零元素的数量,即,$A\star B$的支架尺寸。这个问题被称为稀疏非负卷积,在文献中得到了相当大的关注;迄今为止最快的算法是$O(k\log^2 n)$。本文的主要结果是稀疏非负卷积的第一个$O(k\log k)$时间算法。我们的算法是随机的,并假设长度$n$和$A$和$B$的最大条目是次指数的$k$。令人惊讶的是,我们可以将我们的算法描述为从稀疏情况到密集情况的非负卷积的简化,表明在一些温和的假设下,稀疏非负卷积等价于密集非负卷积的恒定误差随机算法。具体地,如果$D(n)$是卷积两个具有成功概率$2/3$的非负长度- $n$向量的时间,并且$S(k)$是卷积两个具有输出大小$k$和成功概率$2/3$的非负向量的时间,则$S(k)=O(D(k)+k(\log\log k)^2)$。我们的方法使用了各种新技术,结合一些旧的机器,从线性素描和结构化线性代数,以及新的见解线性哈希,最经典的哈希函数。
英文摘要:
Computing the convolution $A\star B$ of two length-$n$ vectors $A,B$ is an ubiquitous computational primitive. Applications range from string problems to Knapsack-type problems, and from 3SUM to All-Pairs Shortest Paths. These applications often come in the form of nonnegative convolution, where the entries of $A,B$ are nonnegative integers. The classical algorithm to compute $A\star B$ uses the Fast Fourier Transform and runs in time $O(n\log n)$. However, often $A$ and $B$ satisfy sparsity conditions, and hence one could hope for significant improvements. The ideal goal is an $O(k\log k)$-time algorithm, where $k$ is the number of non-zero elements in the output, i.e., the size of the support of $A\star B$. This problem is referred to as sparse nonnegative convolution, and has received considerable attention in the literature; the fastest algorithms to date run in time $O(k\log^2 n)$. The main result of this paper is the first $O(k\log k)$-time algorithm for sparse nonnegative convolution. Our algorithm is randomized and assumes that the length $n$ and the largest entry of $A$ and $B$ are subexponential in $k$. Surprisingly, we can phrase our algorithm as a reduction from the sparse case to the dense case of nonnegative convolution, showing that, under some mild assumptions, sparse nonnegative convolution is equivalent to dense nonnegative convolution for constant-error randomized algorithms. Specifically, if $D(n)$ is the time to convolve two nonnegative length-$n$ vectors with success probability $2/3$, and $S(k)$ is the time to convolve two nonnegative vectors with output size $k$ with success probability $2/3$, then $S(k)=O(D(k)+k(\log\log k)^2)$. Our approach uses a variety of new techniques in combination with some old machinery from linear sketching and structured linear algebra, as well as new insights on linear hashing, the most classical hash function.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。