Computing Generalized Convolutions Faster Than Brute Force
Open Access
- 6 October 2023
- journal article
- research article
- Published by Springer Nature in Algorithmica
- Vol. 86 (1) , 334-366
Abstract
In this paper, we consider a general notion of convolution. Let $$D$$ be a finite domain and let $$D^n$$ be the set of n-length vectors (tuples) of $$D$$ . Let $$f :D\times D\rightarrow D$$ be a function and let $$\oplus _f$$ be a coordinate-wise application of f. The $$f$$ -Convolution of two functions $$g,h :D^n \rightarrow \{-M,\ldots ,M\}$$ is $$\begin{aligned} (g \mathbin {\circledast _{f}}h)(\textbf{v}) {:}{=}\sum _{\begin{array}{c} \textbf{v}_g,\textbf{v}_h \in D^n\\ \text {s.t. } \textbf{v}= \textbf{v}_g \oplus _f \textbf{v}_h \end{array}} g(\textbf{v}_g) \cdot h(\textbf{v}_h) \end{aligned}$$ for every $$\textbf{v}\in D^n$$ . This problem generalizes many fundamental convolutions such as Subset Convolution, XOR Product, Covering Product or Packing Product, etc. For arbitrary function f and domain $$D$$ we can compute $$f$$ -Convolution via brute-force enumeration in $$\widetilde{{\mathcal {O}}}(|D|^{2n} \cdot \textrm{polylog}(M))$$ time. Our main result is an improvement over this naive algorithm. We show that $$f$$ -Convolution can be computed exactly in $$\widetilde{{\mathcal {O}}}( (c \cdot |D|^2)^{n} \cdot \textrm{polylog}(M))$$ for constant $$c {:}{=}3/4$$ when $$D$$ has even cardinality. Our main observation is that a cyclic partition of a function $$f :D\times D\rightarrow D$$ can be used to speed up the computation of $$f$$ -Convolution, and we show that an appropriate cyclic partition exists for every f. Furthermore, we demonstrate that a single entry of the $$f$$ -Convolution can be computed more efficiently. In this variant, we are given two functions $$g,h :D^n \rightarrow \{-M,\ldots ,M\}$$ alongside with a vector $$\textbf{v}\in D^n$$ and the task of the $$f$$ -Query problem is to compute integer $$(g \mathbin {\circledast _{f}}h)(\textbf{v})$$ . This is a generalization of the well-known Orthogonal Vectors problem. We show that $$f$$ -Query can be computed in $$\widetilde{{\mathcal {O}}}(|D|^{\frac{\omega }{2} n} \cdot \textrm{polylog}(M))$$ time, where $$\omega \in [2,2.372)$$ is the exponent of currently fastest matrix multiplication algorithm.
Keywords
All Related Versions
Funding Information
- European Research Council (725978, 725978, 725978, 725978, 850979)
- Helmholtz-Zentrum für Informationssicherheit – CISPA gGmbH
This publication has 33 references indexed in Scilit:
- The Parity of Directed Hamiltonian Cycles2013
- Covering and packing in linear spaceInformation Processing Letters, 2011
- Exact and approximate bandwidthTheoretical Computer Science, 2010
- Counting Paths and Packings in HalvesLecture Notes in Computer Science, 2009
- Dynamic Programming on Tree Decompositions Using Generalised Fast Subset Convolution2009
- Set Partitioning via Inclusion-ExclusionSIAM Journal on Computing, 2009
- A new algorithm for optimal 2-constraint satisfaction and its implicationsTheoretical Computer Science, 2005
- Fast generalized Fourier transformsTheoretical Computer Science, 1989
- An algorithm for the machine calculation of complex Fourier seriesMathematics of Computation, 1965
- Abstract theory of inversion of finite seriesTransactions of the American Mathematical Society, 1935