DeepAI

# Sparse Nonnegative Convolution Is Equivalent to Dense Nonnegative Convolution

Computing the convolution A⋆ 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⋆ B uses the Fast Fourier Transform and runs in time O(nlog n). However, often A and B satisfy sparsity conditions, and hence one could hope for significant improvements. The ideal goal is an O(klog k)-time algorithm, where k is the number of non-zero elements in the output, i.e., the size of the support of A⋆ 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(klog^2 n). The main result of this paper is the first O(klog 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(loglog 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.

07/15/2021

### Deterministic and Las Vegas Algorithms for Sparse Nonnegative Convolution

Computing the convolution A⋆ B of two length-n integer vectors A,B is a ...
06/04/2023

### Sparse Convolution for Approximate Sparse Instance

Computing the convolution A ⋆ B of two vectors of dimension n is one of ...
02/27/2019

### Dimension-independent Sparse Fourier Transform

The Discrete Fourier Transform (DFT) is a fundamental computational prim...
05/09/2021

### Fast n-fold Boolean Convolution via Additive Combinatorics

We consider the problem of computing the Boolean convolution (with wrapa...
05/04/2023

### A Sparse Johnson-Lindenstrauss Transform using Fast Hashing

The Sparse Johnson-Lindenstrauss Transform of Kane and Nelson (SODA 2012...
02/19/2018

### Linear Equations with Ordered Data

Following a recently considered generalization of linear equations to un...
05/19/2020

### Growth of bilinear maps

For a bilinear map *:ℝ^d×ℝ^d→ℝ^d of nonnegative coefficients and a vecto...