Popis: |
Given as input two $n$-element sets $\mathcal A,\mathcal B\subseteq\{0,1\}^d$ with $d=c\log n\leq(\log n)^2/(\log\log n)^4$ and a target $t\in \{0,1,\ldots,d\}$, we show how to count the number of pairs $(x,y)\in \mathcal A\times \mathcal B$ with integer inner product $\langle x,y \rangle=t$ deterministically, in $n^2/2^{\Omega\bigl(\!\sqrt{\log n\log \log n/(c\log^2 c)}\bigr)}$ time. This demonstrates that one can solve this problem in deterministic subquadratic time almost up to $\log^2 n$ dimensions, nearly matching the dimension bound of a subquadratic randomized detection algorithm of Alman and Williams [FOCS 2015]. We also show how to modify their randomized algorithm to count the pairs w.h.p., to obtain a fast randomized algorithm. Our deterministic algorithm builds on a novel technique of reconstructing a function from sum-aggregates by prime residues, which can be seen as an {\em additive} analog of the Chinese Remainder Theorem. As our second contribution, we relate the fine-grained complexity of the task of counting of vector pairs by inner product to the task of computing a zero-one matrix permanent over the integers. |