Skip to content

A Simple Las Vegas Algorithm for Sparse Nonnegative Convolution

Trevor Vaughn

cs.DSarXiv:2608.16123

Abstract

Let A, B ∈ Z 0n be nonnegative vectors and let t = |supp(A B)|. We give a Las Vegas algorithm that computes A B in O(t t) expected time. More generally, for every 0 < δ 12, the algorithm terminates within O(t t 1δ) time with probability at least 1 - δ. The algorithm uses dense convolution, linear hashing, and the length reduction of BFN22. Its main ingredient is a carry-free representation of the indices as vectors of constant dimension d whose coordinates have size O(t / t). We can then take our hash function to be the inner product with a random element of Fpd for a prime p of size Ω(t / t): this preserves addition and gives collision probability exactly 1/p, while identities regarding the moments of the vectors identify and recover the isolated terms as in BFN22. Our expected running time matches that of Jin and Xu~JX24 while using substantially different tools and yielding a simpler algorithm. Note that their algorithm also terminates within O(t t) time with probability at least 1 - 1t, while our tail bound is weaker.

Create a lesson