English

Fast $n$-fold Boolean Convolution via Additive Combinatorics

Data Structures and Algorithms 2021-05-11 v1

Abstract

We consider the problem of computing the Boolean convolution (with wraparound) of nn~vectors of dimension mm, or, equivalently, the problem of computing the sumset A1+A2++AnA_1+A_2+\ldots+A_n for A1,,AnZmA_1,\ldots,A_n \subseteq \mathbb{Z}_m. Boolean convolution formalizes the frequent task of combining two subproblems, where the whole problem has a solution of size kk if for some ii the first subproblem has a solution of size~ii and the second subproblem has a solution of size kik-i. Our problem formalizes a natural generalization, namely combining solutions of nn subproblems subject to a modular constraint. This simultaneously generalises Modular Subset Sum and Boolean Convolution (Sumset Computation). Although nearly optimal algorithms are known for special cases of this problem, not even tiny improvements are known for the general case. We almost resolve the computational complexity of this problem, shaving essentially a factor of nn from the running time of previous algorithms. Specifically, we present a \emph{deterministic} algorithm running in \emph{almost} linear time with respect to the input plus output size kk. We also present a \emph{Las Vegas} algorithm running in \emph{nearly} linear expected time with respect to the input plus output size kk. Previously, no deterministic or randomized o(nk)o(nk) algorithm was known. At the heart of our approach lies a careful usage of Kneser's theorem from Additive Combinatorics, and a new deterministic almost linear output-sensitive algorithm for non-negative sparse convolution. In total, our work builds a solid toolbox that could be of independent interest.

Keywords

Cite

@article{arxiv.2105.03968,
  title  = {Fast $n$-fold Boolean Convolution via Additive Combinatorics},
  author = {Karl Bringmann and Vasileios Nakos},
  journal= {arXiv preprint arXiv:2105.03968},
  year   = {2021}
}

Comments

ICALP 2021, 17 pages

R2 v1 2026-06-24T01:55:13.174Z