Dense Subset Sum in Multi-Dimension


Abstract

We study the additive structure of dense subset sum in multi-dimension, and use the structure to develop efficient algorithms for the dense subset sum problem. More precisely, given a set \(A\) of \(n\) vectors in the \(d\)-dimensional hyperrectangle \([N_1]\times [N_2]\times\cdots\times [N_d]\), we study the structure of \(\mathcal{S}(A)\), which is the set of all subset sums of \(A\), and then utilize the structure to develop efficient algorithms for determining whether \(\vb*{t}\in \mathcal{S}(A)\) for a given \(\vb*{t}\). We focus on the dense regime of the problem where \(n \gg \sqrt{\Phi}\) and \(\Phi = N_1 \times \cdots \times N_d\).

The problem is well understood in the 1-dimensional case. It is known that if \(n \gg \sqrt{\Phi}\), then \(\mathcal{S}(A)\) contains an arithmetic progression of length \(\Phi\) [Sárközy ’94, Szemerédi & Vu ’06]. If we further have that no prime can divide the majority of \(A\), then \(\mathcal{S}(A)\) contains all integers in the range \([o(1)\sigma(A), (1-o(1))\sigma(A)]\), where \(\sigma(A) = \sum_{a \in A}a\) [Lev ’03]. Using this combinatorics result, it has been shown that with the sole condition that \(n \gg \sqrt{\Phi}\), then one can determine whether \(\vb*{t}\in \mathcal{S}(A)\) in \(\widetilde{O}(n)\) time for any \(t \in [o(1)\sigma(A), (1-o(1))\sigma(A)]\) [Galil & Margalit ’91, Bringmann & Wellnitz ’21].

For multi-dimension, the problem is far from clear. It is only known that if no non-trivial lattice (lattice other than \(\mathbb{Z}^d\)) can contain the majority of \(A\), then \(\mathcal{S}(A)\) contains all integer points within some ellipsoid, provided that \(n \gg \Phi^{2/3}\) for \(d = 2\) [Freiman ’96, Plagne ’99], and \(n \gg \Phi^{\frac{d-1}{d}}\) for \(d\geq 3\) [Chaimovich ’91].

We improve upon these combinatorics results by showing that for any constant \(d\geq 1\), if \(n \gg \sqrt{\Phi}\), then \(\mathcal{S}(A)\) contains a long generalized progression in multi-dimension. If we further have that no non-trivial lattice can contain the majority of \(A\), then \(\mathcal{S}(A)\) contains all the integer points in the zonotope \(\{x_1\vb*{a}_1 + \cdots + x_n\vb*{a}_n: o(1)\leq x_j \leq 1-o(1), x_j \in \mathbb{R}\}\). Compared to the previous results, our result significantly reduces the density threshold and enlarges the region inside which all the integer points belong to \(\mathcal{S}(A)\). Indeed, it matches the bound for the 1-dimensional case.

Using our combinatorics result, we also develop an \(\widetilde{O}(n)\)-time algorithm for the dense subset sum problem in multi-dimension.

1 Introduction↩︎

We study dense subset sum in multi-dimension. Let \([N] :=\{0,1,\cdots,N-1\}\). Let \(A \subseteq [N]^d\) be a set of \(n\) vectors. Let \(\mathcal{S}(A)=\{\sum_{j=1}^nz_j\vb*{a}_j : z_j\in\{0,1\}\}\) be the set of all subset sums of \(A\). It is easy to see that when \(n\) is very small, then \(\mathcal{S}(A)\) may consist of only some sporadic points2. However, when \(n\) is sufficiently large, then \(\mathcal{S}(A)\) is likely to contain all the integer points within a certain well-structured area. Our goal is to characterize such an area, and exploit this structural information to develop efficient algorithms for subset sum problem, that is, to determine whether a given \(\vb*{t}\) belongs to \(\mathcal{S}(A)\).

Our research is motivated by the study of dense subset sum problem in 1-dimension. In additive combinatorics, a classic result states that if \(n \gg \sqrt{N}\), then \(\mathcal{S}(A)\) admits an arithmetic progression of length at least \(N\) [1][5]. We say that \(A\) is spread, if no integers \(q>1\) can divide most of integers in \(A\) (that is, \(A\) does not concentrate on \(q\mathbb{Z}\) for some \(q > 1\)). If \(n\gg \sqrt{N}\) and \(A\) is spread, then Lev [2] showed that \(\mathcal{S}(A)\) contains all the integers within the interval \([o(1)\sigma(A), (1-o(1))\sigma(A)]\), where \(\sigma(A) = \sum_{a \in A}a\). Such a structural characterization allows dense instances of subset sum problem to be solved faster [3], [6], [7]. Recently, Bringmann and Wellnitz [7] made a comprehensive study of dense subset sum from a computational perspective. They showed that when \(n\gg \sqrt{N}\) and \(t \in [o(1)\sigma(A), (1-o(1))\sigma(A)]\), even if \(A\) is not spread, determining whether \(t\in \mathcal{S}(A)\) takes only \(\widetilde{O}(n)\)-time.3

When \(d\ge 2\), things become way more complicated and much less is known. Given a set of \(d\) linearly independent vectors \(B=\{\vb*{b}_1,\vb*{b}_2,\cdots,\vb*{b}_d\}\) in \(\mathbb{Z}^d\), we denote by \(\mathcal{L}(B)\) the lattice generated by \(\vb*{b}_1, \ldots, \vb*{b}_d\), i.e., \(\mathcal{L}(B)=\{B\vb*{x}: \vb*{x}\in\mathbb{Z}^d\}\). Extending the notions for the 1-dimensional case, we say \(A\) is spread if \(|A\setminus \Gamma|\) is large for any lattice \(\Gamma \neq \mathbb{Z}^d\). In 1991, Freiman [8] showed that for \(A\subseteq [N_1]\times [N_2]\), if \(n\gg \Phi^{2/3}\), where \(\Phi=N_1N_2\), and \(A\) is spread, then there exists a moderately large ellipsoid such that all the integer points inside it belong to \(\mathcal{S}(A)\). Later, Plagne [9] made an improvement by enlarging the ellipsoid by some poly-logarithmic factor. Chaimovich [10] further extended the result to the case of \(d\ge 3\). He showed that for \(A\subseteq [N_1]\times [N_2]\times\cdots\times[N_d]\), if \(n\gg \Phi^{\frac{d-1}{d}}\), where \(\Phi=\prod_j N_j\), and \(A\) is spread, then there also exists a moderately large ellipsoid such that all the integer points inside it belong to \(\mathcal{S}(A)\). It is noted explicitly in [10] that the result is only valid for \(d\ge 3\). Chaimovich [10] also presented an algorithm showing that when \(n\gg \Phi^{\frac{d-1}{d}}\) and \(\vb*{t}\) lies in some moderately large ellipsoid, then – even if \(A\) is not spread – one can decide whether \(\vb*{t}\in \mathcal{S}(A)\) in \(\widetilde{O}(n^{2+\frac{1}{d-1}})\)-time.

For \(d=1\), there is evidence that the density threshold of \(n \gg \sqrt{N}\) is likely the best one can hope for. Szemerédi and Vu [4] constructed a spread set \(A\) of size \(O(\sqrt{N})\) such that \(|\mathcal{S}(A)|=\Omega(N^{3/2})\) but the longest arithmetic progression in \(\mathcal{S}(A)\) has length of \(O(N^{3/4})\). This suggests that the density threshold for \(d=1\) is sharp.

For \(d\geq 2\), however, things are far from clear in two aspects: first, the density threshold is much higher than that for \(d=1\), and second, the ellipsoid given by Freiman [8], Plagne [9] and Chaimovich [10] is a very small area that covers, as we will give details later, only an \(o(1)\) fraction of the points in \(\mathcal{S}(A)\). Hence, it is natural to ask the following question.

For \(d \geq 2\), is it possible to reduce the density threshold and enlarge the area inside which all the integer points belong to \(\mathcal{S}(A)\)? In particular, can we obtain a bound that matches the 1-dimensional case?

We shall provide an affirmative answer to the above question. We remark that our approach is fully combinatorial, while all the prior results for \(d \geq 2\) are based on analytic number theory. (For \(d =1\), both the combinatorial approach [1][4] and analytical approach [11] have been explored.) This is partly because the analytical approach can be extended to a higher dimension in a more systematic way, while new tools are needed to extend the combinatorial approach to even \(d=2\). But the analytic approach has certain limitations so that it cannot obtain a sharp bound even for \(d = 1\), as we will explain below.

The analytical approach addresses the decision problem by showing that when \(\vb*{t}\) lies in some ellipsoid centered at the average of \(A\), the number of feasible solutions to subset sum, can be approximated by a Gaussian distribution. One way to interpret such a result is to view the subset sum problem from a different perspective: suppose we are given \(n\) independent random variables \(X_i\), where \(\Pr(X_i=\vb*{a}_i)=1/2\) and \(\Pr(X_i=0)=1/2\). The number of solutions to \(\sum_i\vb*{a}_ix_i=\vb*{t}\) can be calculated via the probability \(\Pr(\sum_i X_i=\vb*{t})\). While the central limit theorem (CLT) is not applicable as \(X_i\) depends on \(n\), it turns out surprisingly that for large \(n\) this probability can still be approximated by a Gaussian distribution. This elegant idea was first introduced by Alon and Freiman [11] where they considered 1-dimensional dense subset sum, and later extended to the multidimensional case in the follow-up works. However, Gaussian approximation for subset sum also has a fundamental limitation, namely \(\vb*{t}\) has to be sufficiently close to the expectation \(\sum_i \vb*{a}_i/2\), otherwise the approximation error will dominate. For \(d=1\), the analytical approach by Alon and Freiman [11] requires \(n\gg N^{2/3+\epsilon}\) and \(A\) is spread, and only guarantees the existence of a feasible solution within an interval of length \(O(\sqrt{\sum_i a_i^2})\). The case where \(d\geq 2\) faces essentially the same issue.

1.1 Our Results↩︎

To ease our discussion, we consider the case where \(A\) is a set and present our results informally in this section. Formal statements of the theorems for multiset \(A\) can be found in Section 6. We use \(\widetilde{O}_d(\cdot)\) and \(\widetilde{\Omega}_d(\cdot)\) to further hide factors dependent only on \(d\).

We first introduce some notation. Recall that \(\mathcal{L}(A)\) is the lattice generated by the vectors in \(A\). At this stage, for simplicity of discussion, one can assume that the lattice \(Z\) in the following definition is \(\mathbb{Z}^d\) and \(\mathrm{det}(Z) = 1\).

definitiondefdenseandspread(Density, Spreadness, Nondegeneracy for Sets) Let \(A \subseteq [N_1]\times \cdots \times [N_d]\) be a set of vectors. Let \(\Phi := \prod_{j=1}^d N_j\). Let \(\tau := \sqrt{\frac{\Phi}{\mathrm{det}(Z)}}\), where \(Z := \mathcal{L}(A)\).

  • We say that \(A\) is \(\rho\)-dense if \(|A| \geq \rho \tau\);

  • We say that \(A\) is \(\gamma\)-spread if \(|A \setminus \Lambda| \geq \gamma\tau\) for any lattice \(\Lambda \subsetneq Z\).

  • We say that \(A\) is \(\delta\)-nondegenerate if \(|A \setminus \mathcal{V}| \geq \delta\tau\) for any lower dimensional subspace \(\mathcal{V} \subseteq \mathbb{R}^d\).

Note that spread is stronger than nondegenerate in the sense that \(A\) must be \(\gamma\)-nondegenerate if \(A\) is \(\gamma\)-spread, but not vice versa.

1.1.0.1 Long Progressions in Dense Subset Sums

Our first result is the existence of long progressions in dense subset sums.

Theorem 1 (Informal Version of Theorem 21). Let \(A\subseteq [N_1]\times [N_2]\times\cdots\times [N_d]\) be a set of vectors with \(\mathcal{L}(A) = \mathbb{Z}^d\). If \(A\) is \(\widetilde{O}_d(1)\)-dense, \(\widetilde{O}_d(1)\)-spread, and \(\widetilde{O}_d(1)\)-nondegenerate, then \[\mathcal{S}(A) \supseteq \{ \vb*{v_0} + z_1\vb*{e}_1+ z_2\vb*{e}_2 +\cdots+z_d\vb*{e}_d : 0 \leq z_j \leq N_j, z_j \in \mathbb{Z}\},\] for some \(\vb*{v}_0\in\mathbb{Z}^d\), where \(\{\vb*{e}_1,\cdots,\vb*{e}_d\}\) is the standard basis.

We remark that in this informal version, since we assume that \(\mathcal{L}(A) = \mathbb{Z}^d\), the \(\widetilde{O}_d(1)\)-nondegenerate condition is actually dominated by the \(\widetilde{O}_d(1)\)-spread condition, and hence, is redundant.

Note that when \(d=1\), our theorem matches (up to polylogarithmic factors) the previous theorem for the 1-dimensional case [1][5].

1.1.0.2 A John-Type Theorem for Dense Subset Sum

Note that the vectors in \(\mathcal{S}(A)\) must belong to the zonotope \(\{x_1\vb*{a}_1 + \cdots + x_n\vb*{a}_n : 0 \leq x_i \leq 1\}.\) Our second result shows that when \(A\) is \(\widetilde{O}_d(1)\)-dense, \(\widetilde{O}_d(1)\)-spread, and \(\widetilde{O}_d(1)\)-nondegenerate, almost all the integer points inside this zonotope belong to \(\mathcal{S}(A)\).

Theorem 2 (Informal version of Theorem 22). Let \(A\subseteq [N_1]\times [N_2]\times\cdots\times [N_d]\) be a set of vectors with \(\mathcal{L}(A) = \mathbb{Z}^d\). If \(A\) is \(\rho\)-dense, \(\widetilde{O}_d(1)\)-spread, and \(\delta\)-nondegenerate for some \(\rho, \delta \geq \widetilde{\Omega}_d(1)\), then \[\mathbb{Z}^d \cap \{x_1\vb*{a}_1 + \cdots + x_n\vb*{a}_n : \varepsilon \leq x_i \leq 1 - \varepsilon\} \subseteq \mathcal{S}(A) ,\] where \(\varepsilon = \widetilde{O}_d(\frac{1}{\rho\delta})\).

Recall that the nondegenerate condition is weaker than the spread condition. Therefore, one can replace the \(\delta\)-nondegenerate condition in the above theorem with \(\delta\)-spread condition, and the theorem still holds.

Corollary 1. Let \(A\subseteq [N_1]\times [N_2]\times\cdots\times [N_d]\) be a set of vectors with \(\mathcal{L}(A) = \mathbb{Z}^d\). If \(A\) is \(\rho\)-dense, \(\delta\)-spread, for some \(\rho, \delta \geq \widetilde{\Omega}_d(1)\), then \[\mathbb{Z}^d \cap \{x_1\vb*{a}_1 + \cdots + x_n\vb*{a}_n : \varepsilon \leq x_i \leq 1 - \varepsilon\} \subseteq \mathcal{S}(A) ,\] where \(\varepsilon = \widetilde{O}_d(\frac{1}{\rho\delta})\).

Theorem 2 implies that for multidimensional dense subset sum, its natural linear program relaxation essentially captures \(\mathcal{S}(A)\), except for the points that are sufficiently close to the boundary of the zonotope.

When \(d = 1\), the region is essentially the same as \([\varepsilon \sigma(A), (1 - \varepsilon)\sigma(A)]\), so Theorem 2 matches prior results for the 1-dimensional case. (Note that in the 1-dimensional case, the nondegenerate condition holds automatically, and therefore, can be ignored.)

When \(d \geq 2\), our result gives a substantial improvement upon prior results in the following aspects.

  • Density threshold: Prior results require \(n \gg \Phi^{2/3}\) for \(d=2\) [8], [9], and \(n \gg \Phi^{\frac{d-1}{d}}\) for \(d\ge 3\) [10]. Our result unifies the threshold to \(n\gg \sqrt{\Phi}\) for every positive constant \(d\). This density threshold is sharp (up to some poly-logarithmic factors). See Appendix 10 for details.

  • Structured area: our result gives a convex area that captures \(1 - o(1)\) fraction of \(\mathcal{S}(A)\), while prior results characterize only a small area of \(\mathcal{S}(A)\). To see the latter, consider \(A = \{(a_i, b_i)\}_i\). Freiman [8] showed that when density and spreadness conditions hold, \(\mathcal{S}(A)\) contains all integer points \(\vb*{t}\) within an ellipsoid given by \(|(\frac{\sigma(A)}{2}-\vb*{t})M^{-1}(\frac{\sigma(A)}{2}-\vb*{t})^{\top}|=O(1)\), where \[M= \frac{1}{4} \begin{bmatrix} \sum_i a_i^2 & \sum_i a_ib_i \\ \sum_i a_ib_i & \sum_i b_i^2 \end{bmatrix}\] Consider the following specific set \(A := A_1 \cup A_2\), where \[\begin{align} A_1 &=: \{(a,a+b): \frac{3}{2}N\leq a\leq 2N, 1\leq b\leq \frac{1}{2}N^{1/3}\};\\ A_2 &=: \{(a,a+b): N\leq a\leq \frac{3}{2}N, \frac{1}{2}N^{1/3}\leq b\leq N^{1/3}\}. \end{align}\] One can verify that the number of integer points within the ellipsoid is \(\widetilde{O}(N^{8/3})\). However, \(\mathcal{S}(A)\) contains \(\Omega(N^4)\) points. So the ellipsoid captures only \(O(N^{-4/3})\) fraction of all the points. In a follow-up paper, Plagne [9] slightly enlarged the ellipsoid by a logarithmic factor, which hardly changes the situation.

1.1.0.3 A Linear Time Algorithm for Dense Subset Sum

Theorem 3 (Informal version of Theorem 23). Let \(A\subseteq [N_1]\times [N_2]\times\cdots\times [N_d]\) be a set of vectors with \(\mathcal{L}(A) = \mathbb{Z}^d\). If \(A\) is \(\rho\)-dense and \(\delta\)-nondegenerate for some \(\rho, \delta \geq \widetilde{\Omega}_d(1)\), then for any \[\vb*{t}\in \{x_1\vb*{a}_1 + \cdots + x_n\vb*{a}_n : \varepsilon \leq x_i \leq 1 - \varepsilon\} ,\] where \(\varepsilon =\widetilde{O}_d(\frac{1}{\rho\delta})\), we can determine whether \(\vb*{t} \in \mathcal{S}(A)\) in \(\widetilde{O}_d(n)\) time with \(\Phi^{-\Omega(d)}\) error probability.

We also show that in \(\widetilde{O}_d(n)\) time, one can determine whether a set \(A\) is \(\delta\)-degenerate or not, as well as whether \(\vb*{t}\in \{x_1\vb*{a}_1 + \cdots + x_n\vb*{a}_n : \varepsilon \leq x_i \leq 1 - \varepsilon\}\) or not. See Appendix 11 and Appendix 12 for details.

Comparing with the algorithms for the 1-dimensional case [3], [7], our theorem additionally requires \(A\) to be \(\delta\)-nondegenerate. But when \(d=1\), this condition holds automatically, so our theorem matches the previous algorithms for the 1-dimensional case. In particular, the bound on \(\varepsilon\) matches (up to polylogarithmic factors) that in Bringmann and Wellnitz’s algorithm, and is sharp for the set case under Strong Exponential Time Hypothesis [7].

For \(d \geq 2\), this requirement seems to be unavoidable. Basically, if a majority of \(A\) degenerates to a lower dimensional subspace, then it is not dense enough along some direction in the original space, and therefore, the techniques for the dense case cannot be applied. We claim that removing this requirement is as hard as developing an \(\widetilde{O}(N^{1 + o(1)})\) algorithm for the 1-D subset sum, which would require techniques beyond those for the dense case. (So far the best-known algorithm has a running time \(\widetilde{O}(N^{5/4})\) due to Chen, Lian, Mao and Zhang [12])

To see the claim, consider an arbitrary set \(A \subseteq [N]\) of integers. We shall embed it into a 2-dimensional dense case. Let \(A'\subseteq [N^{1+\delta}]\times [N]\) for some \(\delta =o(1)\). \(A'\) consists of two subsets \(A_x\) and \(A_y\), with \(A_x=\{(x,0):x\in [N^{1+\delta}]\}\) being on the \(x\)-axis, and \(A_y=\{(0,y):y\in B\}\) on the \(y\)-axis. Let \(\sigma_x=\sum_{x:(x,0)\in A_x}x\) and \(\sigma_y=\sum_{y:(0,y)\in A_y} y\). It is easy to see that \(A'\) is dense. Given any \(\vb*{t}=(t_x,t_y)\in [o(1)\sigma_x,(1-o(1))\sigma_x]\times [o(1)\sigma_y,(1-o(1))\sigma_y]\), determining whether \(\vb*{t}\in\mathcal{S}(A)\) is equivalent to determining whether \(t_y\in\mathcal{S}(B)\).

Subset Sum is a fundamental NP-hard problem in theoretical computer science [13]. There have been extensive studies on pseudo-polynomial time algorithms for Subset Sum [3], [6], [7], [12], [14][22].

Multidimensional Subset Sum is related to the lattice basis computation problem. Specifically, our algorithm relies on efficient algorithms for computing Hermite normal form of given vectors, which has been studied extensively in [23][28]. Given \(n\) column vectors in \(\mathbb{R}^d\), the algorithm of Storjohann and Labahn [23] computes the Hermite normal form of the \(d\times n\) matrix \(B\) formed by these vectors in \(\widetilde{O}(nd^{\omega}\log\|B\|)\)-time, where \(\omega\) denotes the exponent for matrix multiplication and is currently \(\omega\le 2.371552\) [29]. For our purpose, \(d\) is a fixed constant, thus the running time is near-linear in \(n\) and serves our needs.

Multidimensional Subset Sum is closely related to integer (linear) programming. Consider an arbitrary integer programming \(\min \{\vb*{c} \vb*{x}: H\vb*{x}=\vb*{t}, \vb*{\ell}\le \vb*{x}\le \vb*{u}\}\) where \(H\in \mathbb{Z}^{d\times n}\), and let \(N\) denote the upper bound on the absolute value of all entries in the constraint matrix \(H\). There are two classes of algorithms for integer programming. The first class has a running time exponential in the number of variables \(n\). Lenstra [30] presented a \(2^{O(n^3)}\cdot\text{poly}(|I|)\)-time algorithm, where \(\textrm{poly}(|I|)\) denotes a polynomial in the input length \(|I|\). The running time has been improved in several subsequent works [31][34]. Very recently, Reis and Rothvoss [34] proved that integer programming can be solved in \((\log n)^{O(n)}\cdot\text{poly}(|I|)\)-time. The second class has a running time dependent on \(d\) and \(N\). Papadimitriou [35] provided an algorithm running in \(n^{O(d)}(m\cdot\max\{N,\|\vb*{t}\|_{\infty}\})^{O(d^2)}\)-time. The running time was later improved by Eisenbrand and Weismantel [36], and Jansen and Rohwedder [37].

In recent years, there has been extensive algorithmic research in subset-sum-related optimization problems by utilizing additive combinatorics results, see, e.g. [12], [21], [38][49].

In this paper, we study the decision version of Multidimensional Dense Subset Sum, and our algorithmic result extends the dense subset sum algorithm by Bringmann and Wellnitz [7] to a higher dimension. It is worth mentioning that very recently, Chen, Mao and Zhang [50] studied the search version of dense Subset Sum and showed that in near-linear time it is also possible to return a feasible solution if the answer is “yes”. Unfortunately, our algorithm in this paper cannot address the search version of Multidimensional Dense Subset Sum. However, since our method is combinatorial, we are optimistic that searching for a feasible solution is also achievable in near-linear time.

2 Preliminaries↩︎

2.1 Notation↩︎

All logarithms in this paper are base 2.

We use \(\mathbb{R}\) to denote the set of all reals and \(\mathbb{Z}\) to denote the set of all integers. The set of integers from \(0\) to \(N-1\) is written as \([N]\). That is, \([N] := \{0, 1, \ldots, N-1\}.\) Throughout the paper, we always assume that \(N\) is sufficiently large. By sufficiently large, we mean that there exists a universal constant \(C\) such that \(N \geq C\).

We use \(\vb*{e}_1, \vb*{e}_2, \ldots, \vb*{e}_d\) to denote the standard basis of \(\mathbb{R}^d\), \(\vb*{0}\) to denote the vectors \((0, \ldots, 0)\), and \(\vb*{1}\) to denote \((1, \ldots, 1)\). The Euclidean norm of a vector \(\vb*{a}\) is represented by \(\|\vb*{a}\|_2\), and the inner product of two vectors \(\vb*{a}\) and \(\vb*{b}\) is represented by \(\vb*{a} \cdot \vb*{b}\).

Let \(P \subseteq \mathbb{R}^d\) be a set of vectors. For any vector \(\vb*{v}\), we use \(P + \vb*{v}\) to denote the translate of \(P\) along \(\vb*{v}\). That is, \(P + \vb*{v} := \{\vb*{p} + \vb*{v}: \vb*{p} \in P\}.\) Let \(Q\) be another set of vectors. The sumset of \(P\) and \(Q\) is defined by the following formula. \[P + Q := \{\vb*{p} + \vb*{q} : \vb*{p} \in P, \vb*{q} \in Q\}\] The \(k\)-fold sumset of \(P\) is denoted as \(kP\). That is, \(kP = P\) if \(k = 1\), and \(kP = (k-1)P + P\) for \(k \geq 2\). We remark that when \(P\) is convex, \(kP\) can also be viewed as a set obtained by stretching the vectors in \(P\) by a factor of \(k\). We slightly abuse the notion. When \(P\) is convex, for any real \(a \geq 0\), we use \(aP\) to denote the set obtained by stretching the vectors in \(P\) by a factor of \(a\). That is, \(a P := \{a\vb*{p} : \vb*{p} \in P\}.\)

Let \(A = \{\vb*{a}_1, \ldots, \vb*{a}_n\}\) be a finite set of vectors. We define \(\sigma(A) := \sum_{i}\vb*{a}_i\) to be the sum of \(A\). We define two sets \(\mathcal{S}(A)\) and \(\mathcal{P}(A)\) as follows. \[\begin{align} \mathcal{S}(A) &:= \{x_1 \vb*{a}_1 + \cdots + x_n\vb*{a}_n : x_j \in \{0,1\}\}\\ \mathcal{P}(A) &:= \{x_1 \vb*{a}_1 + \cdots + x_n\vb*{a}_n : |x_j| \leq 1/2\} \end{align}\] Basically, \(\mathcal{S}(A)\) is the set of all subset sums of \(A\), and \(\mathcal{P}(A)\) is a zonotope generated by the vectors in \(A\). One can make the following two easy observations.

  • \(\mathcal{S}(A) \subseteq \mathcal{P}(A) + \frac{\sigma(A)}{2} \subseteq 2\mathcal{P}(A)\).

  • for any partition \(A_1 \cup A_2\) of \(A\), we have \(\mathcal{S}(A) = \mathcal{S}(A_1) + \mathcal{S}(A_2)\) and \(\mathcal{P}(A) = \mathcal{P}(A_1) + \mathcal{P}(A_2).\)

2.2 Progressions and Lattices↩︎

A generalized arithmetic progression (or progression for short) in an additive group \(G\) is defined to be any set of the form \[\left\{a_0 + z_1a_1 + z_2a_2 + \cdots + z_na_n: 0 \leq z_j \leq m_j, z_j \in \mathbb{Z}\right\},\] where \(a_0, a_1, \ldots, a_n \in G\) and \(m_j \in \mathbb{Z}\). We call \(a_1, \ldots, a_n\) the basis of the progression. (See [51] for more discussion of progressions.) Throughout this paper, we consider only the case where \(G = \mathbb{Z}^d\). In other words, we consider only the progressions of the form \[\{\vb*{a}_0 + z_1\vb*{a}_1 + z_2\vb*{a}_2 + \cdots + z_n\vb*{a}_n: 0 \leq z_j \leq m_j, z_j \in \mathbb{Z}\},\] where \(\vb*{a}_0, \vb*{a}_1, \ldots, \vb*{a}_m \in \mathbb{Z}^d\) and \(m_j \in \mathbb{Z}\).

A lattice can be regarded as an infinite version of progression. Let \(A = \{\vb*{a}_1, \vb*{a}_2, \ldots, \vb*{a}_n\}\) be a set of \(n\) vectors in \(\mathbb{Z}^d\). The lattice generated by \(A\) is defined as \[\mathcal{L}(A) := \{z_1\vb*{a}_1 + z_2\vb*{a}_2 + \cdots + z_n\vb*{a}_n : z_j \in \mathbb{Z}\}.\] If the vectors in \(A\) are linearly independent, then we say that \(A\) is a basis of \(\mathcal{L}(A)\). If we further have \(n = d\), then we say that \(\mathcal{L}(A)\) is full-dimensional. Sometimes it is more convenient to view \(A\) as a matrix whose column vectors are \(\vb*{a}_1, \ldots, \vb*{a}_n\). For \(i \in \{1, \ldots, d\}\) and for \(j \in \{1, \ldots, n\}\), we use \(a_{ij}\) to denote the entry of \(A\) in the \(i\)-th row and \(j\)-th column. We shall switch between the set notation and the matrix notation without mentioning it explicitly.

A lattice can be represented by its basis. The basis of a lattice is not unique, but they are all equivalent in the sense that one can always convert a basis into another one by multiplying a unimodular matrix. Throughout the paper, we always represent a lattice by its basis in Hermite normal form. Therefore, whenever we obtain a lattice, we actually obtain its basis in Hermite normal form.

Definition 1 (Hermite Normal Form). Let \(B \in \mathbb{Z}^{d \times n}\) be a matrix of rank \(r\). We say that \(B\) is in Hermite normal form if it satisfies the following properties.

  1. \(b_{ij} = 0\) if \(j > r\). (Only the first \(r\) columns are non-zero.)

  2. There exist \(1 \leq i_1 < i_2 < \cdots < i_r \leq d\) such that \(b_{ij} > 0\) if \(i = i_j\) and \(b_{ij} = 0\) if \(i < i_j\). (The heights of non-zero columns decrease strictly)

  3. For \(j \leq r\) and \(j' < j\), \(0 \leq b_{i_jj'} < b_{i_jj}\). (The top non-zero entry of each non-zero column is the greatest in that row, and the entries in that row are non-negative)

A classic result from Hermite [52] states that for any integer matrix \(A\), there is a unique matrix \(B\) in Hermite normal form such that \(\mathcal{L}(B) = \mathcal{L}(A)\). It is easy to see that the non-zero columns of \(B\) are linearly independent, and form a basis of \(\mathcal{L}(B)\). There are various algorithms to compute the Hermite normal form of a given integer matrix, and the current fastest is due to Storjohann and Labahn [23], which runs in \(\widetilde{O}(d^{\omega}n\log N)\), where \(N\) is the maximum absolute entry value of \(A\) and \(\omega\) denotes the exponent for matrix multiplication. Since the dependence on \(d\) does not really matter for our purpose, we use the trivial bound with \(\omega = 3\).

Lemma 1. For any matrix \(A \subseteq [N]^{d\times n}\), there is a unique matrix \(B\) in Hermite normal form such that \(\mathcal{L}(B) = \mathcal{L}(A)\). Moreover, \(B\) can be computed in \(\widetilde{O}(d^3n\log N)\) time.

Let \(\Gamma \subseteq \mathbb{Z}^d\) be a lattice with basis \(B\). If \(\Gamma\) is full-dimensional, we define \(\mathrm{det}(\Gamma)\) to be the absolute value of the determinant of its basis. That is, \(\mathrm{det}(\Gamma): = |\mathrm{det}(B)|\). Note that \(|\mathrm{det}(B)| \geq 1\) since \(B\) is a full-rank integer matrix. (We remark that although the basis is not unique, their determinants all have the same absolute value, so the definition of \(\mathrm{det}(\Gamma)\) does not depend on the choice of basis.) If \(\Gamma\) is not full-dimensional, we define \(\mathrm{det}(\Gamma)\) to be \(0\). Intuitively, \(\mathrm{det}(\Gamma)\) represents the \(d\)-dimensional volume of a cell of the lattice, which is a parallelepiped formed by its basis.

Let \(\Gamma\) and \(\Gamma'\) be two lattices. If \(\Gamma\) is a (proper) subset of \(\Gamma'\), then we say that \(\Gamma\) is a (proper) sublattice of \(\Gamma\), and \(\Gamma'\) is a (proper) suplattice of \(\Gamma\).

Fact 4. Let \(\Gamma \subseteq \mathbb{Z}^d\) be a full-dimensional lattice. For any proper suplattice \(\Gamma' \supsetneq \Gamma\), we have \(\mathrm{det}(\Gamma')\) is a proper divisor of \(\mathrm{det}(\Gamma)\).

2.3 Remainders Modulo A Lattice↩︎

Let \(\Gamma \subseteq \mathbb{Z}^d\) be a full-dimensional lattice. We say two vectors \(\vb*{u}, \vb*{v} \in \mathbb{Z}^d\) are congruent (modulo \(\Gamma\)) if \(\vb*{u} - \vb*{v} \in \Gamma\), denoted as \(\vb*{u} \equiv \vb*{v} \pmod \Gamma\). When \(\Gamma\) is clear from the context, we simply say that \(\vb*{u}\) and \(\vb*{v}\) are congruent.

Let \(b_{11}, b_{22}, \ldots, b_{dd}\) be the diagonal entries of the basis of \(\Gamma\) in Hermite normal form. (Note that \(b_{ii} > 0\) for all \(i\) since \(\Gamma\) is full-dimensional.) We define \(\mathbb{Z}^d_\Gamma = [b_{11}] \times [b_{22}] \times \cdots \times [b_{dd}]\). Note that \(|\mathbb{Z}^d_{\Gamma}| = \prod_{i=1}^d b_{ii} = \mathrm{det}(\Gamma)\). By the definition of Hermite normal form (Definition 1), it is easy to see that the vectors in \(\mathbb{Z}^d_{\Gamma}\) are not congruent to each other and that for every \(\vb*{v} \in \mathbb{Z}^d\), there is a unique vector in \(\mathbb{Z}^d_{\Gamma}\) that is congruent to \(\vb*{v}\) modulo \(\Gamma\). In group theory language, \(\mathbb{Z}^d_{\Gamma}\) is an additive group isomorphic to the quotient group \(\mathbb{Z}^d/\Gamma\). (See Chapter 3 of [51] for more details.) When \(d = 1\), \(\mathbb{Z}^d_{\Gamma}\) is exactly the cyclic group \(\mathbb{Z}_{b_{11}}\) that contains all the remainders modulo \(b_{11}\). We generalize the definition of remainders to multi-dimension.

Definition 2 (Remainders). Let \(\Gamma \subseteq \mathbb{Z}^d\) be a full-dimensional lattice. For every \(\vb*{v} \in \mathbb{Z}^d\), we define the remainder of \(\vb*{v}\) modulo \(\Gamma\), denoted as \(\vb*{v} \bmod \Gamma\), to be the unique vector in \(\mathbb{Z}^d_{\Gamma}\) that is congruent to \(\vb*{v}\).

Let \(A\subseteq \mathbb{Z}^d\) be a set of vectors. We define \(A \bmod \Gamma = \{\vb*{a} \bmod \Gamma : \vb*{a} \in A\}\) to be the set of all remainders (modulo \(\Gamma\)) of the vectors in \(A\).

Below is a useful fact about the number of remainders.

Fact 5. \(|\mathbb{Z}^d \bmod \Gamma| = \mathrm{det}(\Gamma)\). More generally, \(|\Gamma' \bmod \Gamma| = \frac{\mathrm{det}(\Gamma)}{\mathrm{det}(\Gamma')}\) for any suplattice \(\Gamma' \supseteq \Gamma\).

When two sets \(A\) and \(B\) contain the same set of remainders modulo \(\Gamma\), (that is, \(A \bmod \Gamma = B \bmod \Gamma\)), we simply write \(A \equiv B \pmod \Gamma\). Recall that \(\mathcal{S}(A)\) is the set of all subset sums of \(A\). We write \(\mathcal{S}(A) \bmod \Gamma\) as \(\mathcal{S}_{\Gamma}(A)\). Basically, \(\mathcal{S}_{\Gamma}(A)\) is the set of subset sums (modulo \(\Gamma\)) of \(A\). Like the case of \(\mathcal{S}(A)\), for any partition \(A_1 \cup A_2\) of \(A\), we have \[\mathcal{S}_{\Gamma}(A) = (\mathcal{S}_{\Gamma}(A_1) + \mathcal{S}_{\Gamma}(A_2)) \bmod \Gamma.\]

For a remainder \(\vb*{r} \in \mathbb{Z}^d_{\Gamma}\), we define its multiplicity in \(A\) to be the number of elements in \(A\) that are congruent (modulo \(\Gamma\)) to \(\vb*{r}\). We use \(\mu(A, \Gamma)\) to denote the largest multiplicity of any remainder (modulo \(\Gamma\)) in \(A\).

The remainders can be computed efficiently. Recall that when we are given a lattice, we are actually given its basis in Hermite normal form.

lemmalemcomputesinglerem Let \(\Gamma \subseteq \mathbb{Z}^d\) be a full-dimensional lattice.

  1. Given a vector \(\vb*{v} \in \mathbb{Z}^d\), we can compute \(\vb*{v} \bmod \Gamma\) in \(O(d^2)\) time.

  2. Given a suplattice \(\Gamma' \supseteq \Gamma\), we can compute \(\Gamma' \bmod \Gamma\) in \(O(d^2\ell)\) time, where \(\ell := \frac{\mathrm{det}(\Gamma)}{\mathrm{det}(\Gamma')}\).

  3. Given a vector \(\vb*{h} \in \mathbb{Z}^d\), we can compute \(\Gamma' := \Gamma + \mathcal{L}(\vb*{h})\) in \(O(d^2 \log \ell)\) time, where \(\ell := \mathrm{det}(\Gamma)\).

The proof of the above lemma is deferred to Appendix 13.

2.4 Symmetry Sets and Kneser’s Theorem↩︎

The symmetry set is a tool of great importance when we discuss the remainders (modulo some lattice \(\Gamma\)) contained in a set \(S\). Basically, the symmetry set is the set of vectors in \(\mathbb{Z}^d_{\Gamma}\) such that the translate of \(S\) along these vectors does not change the remainders (modulo \(\Gamma\)) contained in \(S\). We remark that there is a much more concise description of symmetry sets if one considers \(+\) as the group operation of the additive group \(\mathbb{Z}^d_{\Gamma}\), but this may cause confusion in the future where we have to switch between different groups. To avoid such confusion, we instead use the mod operation to describe symmetry sets.

Definition 3. Let \(\Gamma \subseteq \mathbb{Z}^d\) be a full-dimensional lattice. Let \(S \subseteq \mathbb{Z}^d\). The symmetry set of \(S\) (with respect to \(\Gamma\)) is defined to be \[\mathrm{Sym}_{\Gamma}(S) := \{\vb*{h} \in \mathbb{Z}^d_\Gamma: \vb*{h} + S \equiv S \pmod \Gamma\}.\]

An easy but important observation is that if \(\vb*{h} + S \equiv S \pmod \Gamma\), then \(\vb*{h} + S + S' \equiv S + S' \pmod \Gamma\) for any \(S'\). This also implies that if \(\vb*{h} + \mathcal{S}(A) \equiv \mathcal{S}(A) \pmod \Gamma\), then \(\vb*{h} + \mathcal{S}(A') \equiv \mathcal{S}(A') \pmod \Gamma\) for any superset \(A' \supseteq A\).

Suppose that \(\mathrm{Sym}_{\Gamma}(S)\) contains a non-zero vector \(\vb*{h}\). Let \(\Gamma' = \Gamma + \mathcal{L}(\vb*{h})\). We have \(\Gamma' + S \equiv S \pmod \Gamma\), which implies \(\Gamma' + (S \bmod \Gamma') \equiv S \pmod \Gamma.\) Therefore, instead of discussing \(S \bmod \Gamma\), we can discuss \(S \bmod \Gamma'\). Note that \(\Gamma'\) is a proper suplattice of \(\Gamma\) (since \(\vb*{h} \in \mathbb{Z}^d_{\Gamma}\) and \(\vb*{h}\) is non-zero), so by Fact 4, \(\mathrm{det}(\Gamma') \leq \mathrm{det}(\Gamma)/2\). So we can reduce our discussion to a smaller group \(\mathbb{Z}^d_{\Gamma'}\).

The following celebrated theorem by Kneser gives a sufficient condition for \(\mathrm{Sym}_{\Gamma}(S)\) to contain a non-zero vector.

Theorem 6 (Kneser’s Theorem [51]). Let \(\Gamma \subseteq \mathbb{Z}^d\) be a full-dimensional lattice. Let \(S_1, S_2\) be two sets of vectors in \(\mathbb{Z}^d\). Let \(S := S_1 + S_2\). Then \[\mathrm{Sym}_{\Gamma}(S_1 + S_2) \geq |S_1 \bmod \Gamma| + |S_2 \bmod \Gamma| - |(S_1 + S_2) \bmod \Gamma|.\]

Corollary 1. Let \(\Gamma \subseteq \mathbb{Z}^d\) be a full-dimensional lattice. Let \(S_1, \ldots, S_m\) be \(m\) sets of vectors in \(\mathbb{Z}^d\). Let \(S := S_1 + \cdots + S_m\). If \[|S_1 \bmod \Gamma| + \cdots + |S_m \bmod \Gamma| \geq |S \bmod \Gamma| + m,\] then \(\mathrm{Sym}_{\Gamma}(S)\) contains a non-zero vector \(\vb*{h}\).

Proof. If for some \(j \in \{1, \ldots, m-1\}\), we have \[\label{eq:coro-keneser-2} |(S_1 + \cdots + S_j) \bmod \Gamma| + |S_{j+1} \bmod \Gamma| \geq |(S_1 + \cdots + S_{j+1}) \bmod \Gamma| + 2,\tag{1}\] then by Theorem 6, \(\mathrm{Sym}_{\Gamma}(S_1 + \cdots + S_{j+1})\) contains a non-zero vector \(\vb*{h}\), so does \(\mathrm{Sym}_{\Gamma}(S_1 + \cdots + S_{m})\) since \(\vb*{h}\) also belongs to it.

Suppose that 1 does not hold for any \(j\). Then, by summing the reverse inequality of 1 over all \(j \in \{1, \ldots, m-1\}\), we have \[|(S_1 + \cdots + S_{m}) \bmod \Gamma| \geq \sum_{i=1}^m|S_i \bmod \Gamma| - (m-1).\] But this contradicts the condition stated in the lemma. ◻

We will frequently invoke the above corollary with \(S_i\) of the form \(\mathcal{S}(A_i)\). For convenience, we restate it as the following.

Corollary 2. Let \(\Gamma \subseteq \mathbb{Z}^d\) be a full-dimensional lattice. Let \(A_1, \ldots, A_m\) be \(m\) sets of vectors in \(\mathbb{Z}^d\). If \[|\mathcal{S}_{\Gamma}(A_1)| + \cdots + |\mathcal{S}_{\Gamma}(A_m)| \geq |\mathcal{S}_{\Gamma}(A)| + m,\] then there is a vector \(\vb*{h} \notin \Gamma\) such that \(\vb*{h} + \mathcal{S}(A) \equiv \mathcal{S}(A) \pmod \Gamma\).

2.5 Convex Analysis Tools↩︎

We also need tools from convex analysis to show that a zonotope is contained in another zonotope.

Definition 4 (Support Functions). Let \(P \subseteq \mathbb{R}^d\) be a polytope. The support function of \(P\) is defined to be \[f_P(\vb*{v}) := \max\{\vb*{p}\cdot \vb*{v} : \vb*{p} \in P\}.\]

Lemma 2 (Implied by the proof of [53]). Let \(P \subseteq \mathbb{R}^d\) be a polytope. Let \(\vb*{u} \in \mathbb{R}^d\) be a vector. Then \(\vb*{u} \in P\) if and only if \(\vb*{u}\cdot \vb*{v} \leq f_{P}(\vb*{v})\) for all facet normals \(\vb*{v}\) of \(P\).

The following corollary follows straightforwardly by Lemma 2.

Corollary 3. Let \(P, Q \subseteq \mathbb{R}^d\) be two polytopes. Then \(Q \subseteq P\) if and only if \(f_Q(\vb*{v}) \leq f_{P}(\vb*{v})\) for all facet normals \(\vb*{v}\) of \(P\).

The following lemma is a direct consequence of Lemma 2 and Corollary 3.

Lemma 3. Let \(P \subseteq \mathbb{R}^d\) be a polytope symmetric about the origin. Let \(\varepsilon, \varepsilon' < 1\) be two positive reals. Then

  1. for any two vectors \(\vb*{p} \in \varepsilon P\) and \(\vb*{p}' \in \varepsilon' P\), we have \(\{\vb*{p} + \vb*{p}', \vb*{p} - \vb*{p}'\} \subseteq (\varepsilon + \varepsilon')P.\)

  2. for any polytope \(Q \subseteq \varepsilon P\) and any vector \(\vb*{p}' \in \varepsilon' P\), we have \(Q + \vb*{p}' \subseteq (\varepsilon + \varepsilon')P.\)

  3. for any polytope \(Q\) with \(Q + \varepsilon P \supseteq P\) , we have \((1 - \varepsilon)P \subseteq Q.\)

Proof. We first prove (i). Since \(P\) is symmetric about the origin, we have that for any \(\vb*{p} \in P\) and any \(\vb*{v} \in \mathbb{R}^d\), \(|\vb*{p} \cdot \vb*{v}| \leq f_P(\vb*{v}).\) Now consider \(\vb*{p} + \vb*{p}'\). For any \(\vb*{v} \in \mathbb{R}^d\), we have \[(\vb*{p} + \vb*{p}')\cdot \vb*{v} \leq |\vb*{p} \cdot \vb*{v}| + |\vb*{p}' \cdot \vb*{v}| \leq (\varepsilon + \varepsilon')f_P(\vb*{v}).\] By Lemma 2, we have \(\vb*{p} + \vb*{p}' \in (\varepsilon + \varepsilon')P\). Similarly, we can show \(\vb*{p} - \vb*{p}' \in (\varepsilon + \varepsilon')P\).

(ii) follows straightforwardly by (i).

We prove (iii). Fix an arbitrary \(\vb*{v} \in \mathbb{R}^d\). Since \(Q + \varepsilon P \supseteq P\), by Lemma 2, we have \[f_Q(\vb*{v}) + \varepsilon f_P(\vb*{v}) \geq f_P(\vb*{v}),\] or in equivalent form, \[(1 - \varepsilon)f_P(\vb*{v}) \leq f_Q(\vb*{v}).\] Again by Lemma 2, we have \((1 - \varepsilon)P \subseteq Q\). ◻

3 Long Progressions in Dense Subset Sums↩︎

Recall the following definition.

In this section, we consider only the case where \(A\) is a subset of \([N]^d\) for simplicity. (Later, we will discuss how to extend the result to a more general case in Section 6.) We shall prove that if \(A\) is \(\widetilde{O}(1)\)-dense, \(\widetilde{O}(1)\)-spread, and \(\widetilde{O}(1)\)-nondegenerate, then \(\mathcal{S}(A)\) contains a long progression whose basis is \(\mathrm{det}(Z)\vb*{e}_1, \ldots, \mathrm{det}(Z)\vb*{e}_d\), where \(Z: = \mathcal{L}(A)\). To ease the understanding, one may also assume that \(Z = \mathbb{Z}^d\).

The proof consists of three steps. In Subsection 3.1, we will show that if \(A\) is \(\widetilde{O}(1)\)-nondegenerate, then \(\mathcal{S}(A)\) contains a long progression whose basis consists of \(d\) linearly independent vectors \(\vb*{b}_1, \ldots, \vb*{b}_d\). In Subsection 3.3, we shall fill the “gaps” of the progression by generating all remainders (modulo \(\Gamma\)) of \(Z\), where \(\Gamma := \mathcal{L}(\vb*{b}_1, \ldots, \vb*{b}_d)\). As a result, we will show that \(\mathcal{S}(A)\) contains all the points of \(Z\) inside a large hypercube. In Subsection 3.4, we will prove the main result of this section.

3.1 Long Progressions with Independent Basis↩︎

We need the following technical lemma, which is due to a result of Erdős and Sárközy [54]. We defer its proof to Section 7.

lemmalemhdespetals Let \(A\) be a multiset of vectors from \([N]^d\), where \(N\) is sufficiently large. Then \(A\) has at least \(|A|/(d\log N)^{3d}\) disjoint subsets \(A_1, \ldots, A_m\) such that \(1 \leq |A_1| = \cdots = |A_m| \leq (d\log N)^{2d}\) and \(\sigma(A_1) = \cdots = \sigma(A_m)\).

Basically, Lemma [lem:hd-es-petals] states that there is a small vector \(\vb*{b}\) such that \(A\) has many disjoint subsets with sum \(\vb*{b}\). This implies that \(\mathcal{S}(A)\) contains many multiples of \(\vb*{b}\). We shall iteratively use Lemma [lem:hd-es-petals] to construct \(\vb*{b}_1, \ldots, \vb*{b}_d\) so that \(A\) has many disjoint subsets with sum \(\vb*{b}_j\) for each \(\vb*{b}_j\). In \(j\)-th iteration, we shall apply Lemma [lem:hd-es-petals] to the vectors in \(A\) that do not fall into the subspace generated by \(\vb*{b}_1, \ldots, \vb*{b}_{j-1}\). Since \(A\) is \(\widetilde{O}(1)\)-nondegenerate, there must be lots of such vectors, and therefore, there must be many disjoint subsets with sum \(\vb*{b}_j\).

Lemma 4. Let \(A \subseteq [N]^d\) be a set of \(n\) vectors that is \(\delta\)-nondegenerate. Let \(\tau := \sqrt{N^d/\mathrm{det}(Z)}\), where \(Z := \mathcal{L}(A)\). Assume that \(N\) is sufficiently large and that \(\delta\tau \geq 2d\). Then there exists \(d\) linearly independent vectors \(\vb*{b}_1, \ldots, \vb*{b}_d\) such that the following properties hold.

  1. \(A\) contains disjoint subsets \(\{A_{j,k} \subseteq A: 1 \leq j \leq d, 1\leq k \leq m\}\), where \(m \geq \frac{\delta\tau}{(d\log N)^{4d}}\) and \(1\leq |A_{j,k}| \leq (d\log N)^{2d}\) and \(\sigma(A_{j,k}) = \vb*{b}_j\) for all \(j,k\).

  2. \(|A \cap \{x_1\vb*{b}_1 + \cdots + x_d\vb*{b}_d: |x_j| \leq 2^{d-1}\}| \geq n - \frac{\delta\tau}{2}\).

  3. \(\frac{n}{2^{3d^2}} \leq \frac{\mathrm{det}(\Gamma)}{\mathrm{det}(Z)} \leq (d\log N)^{3d^2}\tau^2\), where \(\Gamma := \mathcal{L}(\vb*{b}_1, \ldots, \vb*{b}_d)\).

Proof. We shall iteratively generate \(\vb*{b}_j\) for \(j = 1, \ldots, d\) using Lemma [lem:hd-es-petals]. Initially, \(j := 1\) and \(\vb*{o}_1 := \vb*{e}_1\) and \(R_1 := A\). Basically, \(\vb*{o}_j\) is a unit length vector that is orthogonal to \(\vb*{b}_1, \ldots, \vb*{b}_{j-1}\), and \(R_j\) is a subset of elements in \(A\) that can be used to generate \(\vb*{b}_j\). In iteration \(j\), we select \(\lfloor \frac{\delta\tau}{2d}\rfloor\) vectors from \(R_j\) that have the longest projection onto \(\vb*{o}_j\), and denote them by \(R^*_j\). (Recall that \(\delta\tau \geq 2d\) and that \(N\) is sufficiently large.) At least half of the vectors in \(R^*_j\) have the same direction when projected onto \(\vb*{o}_j\), and applying Lemma [lem:hd-es-petals] to them yields at least \[m \geq \frac{\delta\tau}{4d} \cdot \frac{1}{(d\log N)^{3d}} \geq \frac{\delta\tau}{(d\log N)^{4d}}\] non-empty disjoint subsets \(A_{j,1}, \ldots, A_{j, m}\) of cardinality at most \((d\log N)^{2d}\) and \(\sigma(A_{j,1}) = \ldots = \sigma(A_{j, m})\). Let \(\vb*{b}_j := \sigma(A_{j,1})\). If \(j = d\), then we stop. Otherwise, let \(\vb*{o}_{j+1}\) be a unit-length vector that is orthogonal to \(\vb*{b}_1, \ldots, \vb*{b}_{j}\), let \(R_{j+1} := R_j \setminus R^*_j\), and then proceed with the next iteration.

We first show that \(\vb*{b}_1, \ldots, \vb*{b}_d\) are linearly independent. Consider an arbitrary iteration \(j\). Since we remove at most \(\frac{\delta\tau}{2d}\) elements of \(A\) in each iteration, we have \(|R_j| \geq |A| - \frac{\delta\tau}{2}\). Recall that \(A\) is \(\delta\)-nondegenerate. \(A\) must have at least \(\delta\tau\) elements that are not orthogonal to \(\vb*{o}_j\), and therefore, \(R_j\) has at least \(\delta\tau/2\) elements that are not orthogonal to \(\vb*{o}_j\). By the construction of \(R^*_j\), all vectors in \(R^*_j\) must have non-zero projection onto \(\vb*{o}_j\). This implies that the projection of vectors in \(A_{j,1}\) onto \(\vb*{o}_j\) is either all positive or all negative. Therefore, \(\vb*{b}_j \cdot \vb*{o}_j \neq 0\). On the other hand, we have that \(\vb*{o}_j \cdot \vb*{b}_{j'} = 0\) for \(j' \in \{1, \ldots, j-1\}\). It follows that \(\vb*{b}_j\) cannot be a linear combination of \(\vb*{b}_1, \ldots, \vb*{b}_{j-1}\). This holds for all \(j \in \{1, \ldots, d\}\), so \(\vb*{b}_1, \ldots, \vb*{b}_d\) are linearly independent.

Property (i) follows straightforwardly. Next we prove property (ii). Let \(R_{d+1} := R_d/R^*_d\). Since \(|R^*_j| \leq \frac{\delta\tau}{2d}\) for all \(j\), we have \(|R_{d+1}| \geq n - \frac{\delta\tau}{2}\). To prove property (ii), it suffices to show that \[\label{eq:hd-ap-3} R_{d+1} \subseteq \{x_1\vb*{b}_1 + \cdots + x_d\vb*{b}_d: |x_j| \leq 2^{d-1}\}.\tag{2}\] For \(j \in \{1, \ldots, d\}\), let \(n_j = |A_{j,1}|\). That is, \(\vb*{b}_j\) is the sum of \(n_j\) vectors in \(A\).

Claim 7. For \(j \in \{1, \ldots, d\}\), for any \(\vb*{a} \in R_{j+1}\), we have that \(|\vb*{b}_j \cdot \vb*{o}_j| \geq n_j \cdot |\vb*{a} \cdot \vb*{o}_j|.\)

Proof. Recall that \(R_{j+1} = R_j\setminus R^*_j\). By the construction of \(R^*_j\), for any \(\vb*{a}^* \in R^*_j\) and for any \(\vb*{a} \in R_{j+1}\), we have \(|\vb*{a}^* \cdot \vb*{o}_j| \geq |\vb*{a} \cdot \vb*{o}_j|.\) Since \(\vb*{b}_j\) is the sum of \(n_j\) vectors from \(R^*_j\), we have that for any \(\vb*{a} \in R_{j+1}\), \[|\vb*{b}_j \cdot \vb*{o}_j| \geq n_j\cdot |\vb*{a} \cdot \vb*{o}_j| \qedhere\] ◻

Now we are ready to prove 2 . Let \(\vb*{a}\) be an arbitrary vector in \(R_{d+1}\). Since \(\vb*{b}_1, \ldots, \vb*{b}_d\) are linearly independent, \(\vb*{a}\) can be represented as a linear combination of them. That is, for some \(x_1, \ldots, x_d\), \[\vb*{a} = x_1\vb*{b}_1 + \cdots + x_d \vb*{b}_d.\] We shall show that \(|x_j| \leq \frac{2^{(d-j)}}{n_j}\) for all \(j \in \{1, \ldots, d\}\), which immediately implies 2 . When \(j = d\), the inequality holds since \[\frac{1}{n_d} \cdot |\vb*{b}_d \cdot \vb*{o}_d| \geq |\vb*{a} \cdot \vb*{o}_d| = |x_d| |\vb*{b}_d \cdot \vb*{o}_d|.\] The first inequality is due to Claim 7 and the second is due to our choice of \(\vb*{o}_j\). Now suppose that the inequality holds for \(x_{j+1}, \ldots , x_d\). We show it also holds for \(x_j\). Consider \(\vb*{a} \cdot \vb*{o}_{j}\). By the choice of \(\vb*{o}_j\), we have \[\label{eq:hd-ap-4} \vb*{a} \cdot \vb*{o}_{j} = x_j \vb*{b}_j \cdot \vb*{o}_j + x_{j+1} \vb*{b}_{j+1} \cdot \vb*{o}_j + \cdots + x_d\vb*{b}_d \cdot \vb*{o}_j\tag{3}\] For \(j' > j\), we have \(\vb*{b}_{j'}\) is the sum of \(n_{j'}\) vectors in \(R^*_{j'} \subsetneq R_{j'} \subsetneq R_{j+1}\). By Claim 7, \[|\vb*{b}_{j'} \cdot \vb*{o}_j| \leq \frac{n_{j'}}{n_j} \cdot |\vb*{b}_j \cdot \vb*{o}_j|.\] By the inductive hypothesis, \[|x_{j'} \vb*{b}_{j'} \cdot \vb*{o}_j| \leq \frac{2^{(d-{j'})}}{n_{j'}} \cdot \frac{n_{j'}}{n_j} \cdot |\vb*{b}_j \cdot \vb*{o}_j| = \frac{2^{(d-{j'})}}{n_j}\cdot |\vb*{b}_j \cdot \vb*{o}_j|.\] In view of 3 , we have \[\label{eq:hd-ap-5} |\vb*{a} \cdot \vb*{o}_{j}| \geq \left(|x_j| - \frac{2^{d - j} - 1}{n_j}\right) \cdot |\vb*{b}_j \cdot \vb*{o}_j|\tag{4}\] Since \(\vb*{a} \in R_{d+1} \subseteq R_{j+1}\), Claim 7 implies that \(|\vb*{a} \cdot \vb*{o}_{j}| \leq \frac{1}{n_j} \cdot |\vb*{b}_j \cdot \vb*{o}_j|\). In view of 4 , we have \[|x_j| \leq \frac{2^{d-j}}{n_j}.\]

It remains to prove property (iii). By property (i), we have \(\vb*{b}_j \in [(d\log N)^{2d}N]^d\) for all \(j\), which implies \[\frac{\mathrm{det}(\Gamma)}{\mathrm{det}(Z)} \leq \frac{(d(d\log N)^{2d}N)^d}{\mathrm{det}(Z)} \leq (d\log N)^{3d^2}\tau^2.\] Let \[A' = A \cap \{x_1\vb*{b}_1 + \cdots + x_d\vb*{b}_d: |x_j| \leq 2^{d-1}\}.\] Property (ii) implies that \[\mu: = \mu(A', \Gamma) \leq (2^d + 1)^d.\] Then we have \[\frac{\mathrm{det}(\Gamma)}{\mathrm{det}(Z)} \geq |A' \bmod \Gamma| \geq \frac{|A'|}{\mu} \geq \frac{n - \delta\tau/2}{(2^d + 1)^d} = \frac{n}{2(2^d + 1)^d} \geq \frac{n}{2^{3d^2}}. \qedhere\] ◻

3.2 Large Inradius of Zonotopes↩︎

The above lemma also implies that if \(A\) is \(\widetilde{O}(1)\)-dense and \(\widetilde{O}(1)\)-nondegenerate, then \(\mathcal{P}(A)\) has a large inradius. This corollary will be useful in Section 4 and Section 5.

Lemma 5. Let \(\vb*{b}_1, \ldots, \vb*{b}_d \in [N]^d\) be \(d\) linearly independent vectors, and let \(\Gamma\) be the lattice generated by them. Then \[\left\{x_1\vb*{e}_1 + \cdots + x_d\vb*{e}_d : |x_j| \leq \frac{\mathrm{det}(\Gamma)}{d^{d}N^{d-1}}\right\} \subseteq \left\{x_1\vb*{b_1} + \cdots + x_d\vb*{b_d}: |x_j| \leq 1\right\}\]

Proof. Let \(P := \{x_1\vb*{b}_1 + \cdots + x_d\vb*{b}_d: |x_j| \leq 1\}\). We have \[\mathrm{vol}(P) = 2^d\mathrm{det}(\Gamma).\] Note that \(P\) is a parallelepiped, and its facets are defined by the following formula. For each \(k\in[d]\), \[\begin{align} F^+_k &:= \{\text{x_1\vb*{b}_1 + \cdots + x_d\vb*{b}_d : x_k = 1 and |x_{j}| \leq 1 for j \neq k}\},\\ F^-_k &:= \{\text{x_1\vb*{b}_1 + \cdots + x_d\vb*{b}_d : x_k = -1 and |x_{j}|\leq 1 for j \neq k}\}. \end{align}\] Note that \(F^+_k\) and \(F^-_k\) are parallel, and have \((d-1)\)-dimensional volume at most \((2\sqrt{d}N)^{d-1}\) (since \(\|\vb*{b}_i\|_2 \leq \sqrt{d}N\) for all \(i\)). Let \(h_k\) be the distance between them. We have \[h_k \ge \frac{\mathrm{vol}(P)}{(2\sqrt{d}N)^{d-1}} = \frac{2\mathrm{det}(\Gamma)}{d^{(d-1)/2}N^{d-1}} \geq 2\sqrt{d} \cdot \frac{\mathrm{det}(\Gamma)}{d^{d}N^{d-1}}.\] Therefore, \(P\) contains a ball centered at the origin of radius at least \(\sqrt{d} \cdot \frac{\mathrm{det}(\Gamma)}{d^{d}N^{d-1}}\), which implies \[\left\{x_1\vb*{e}_1 + \cdots + x_d\vb*{e}_d : |x_j| \leq \frac{\mathrm{det}(\Gamma)}{d^{d}N^{d-1}}\right\}\subseteq P. \qedhere\] ◻

Corollary 4. Let \(A \subseteq [N]^d\) be a set of \(n\) vectors that is \(\rho\)-dense and \(\delta\)-nondegenerate. Let \(\tau := \sqrt{N^d/\mathrm{det}(Z)}\), where \(Z := \mathcal{L}(A)\). Assume that \(N\) is sufficiently large and that \(\delta\tau \geq 2d\). Then we have that \[\mathcal{P}(A) \supseteq \left\{x_1\vb*{e}_1 + \cdots + x_d \vb*{e}_d: |x_j| \leq \frac{\rho\delta N}{(d\log N)^{7d^2}}\right\}.\]

Proof. Let \(\vb*{b}_1, \ldots, \vb*{b}_d\) be given as in Lemma 4. By Lemma 4(i), we have that \[\mathcal{S}(A) \supseteq \{z_1\vb*{b}_1 + \cdots + z_d \vb*{b}_d: |z_j| \leq m, z_j \in \mathbb{Z}\} \quad\text{and}\quad m \geq \frac{\delta\tau}{(d\log N)^{4d}}.\] Since \(\mathcal{S}(A) \subseteq 2\mathcal{P}(A)\), we have \[\label{eq:large-inradius} \mathcal{P}(A) \supseteq \{x_1\vb*{b}_1 + \cdots + x_d \vb*{b}_d: |x_j| \leq \frac{\delta\tau}{2(d\log N)^{4d}}\}.\tag{5}\] By Lemma 4(i), \(\vb*{b}_j \in [(d\log N)^{2d}N]^d\) for all \(j\) . By Lemma 5, we have \[\mathcal{P}(A) \supseteq \{x_1\vb*{e}_1 + \cdots + x_d \vb*{e}_d: |x_j| \leq L\},\] where \[\begin{align} L &\geq \frac{\delta\tau}{2(d\log N)^{4d}} \cdot \frac{\mathrm{det}(\Gamma)}{d^d (d\log N)^{2d^2} N^{d-1}}\\ &\geq \frac{\delta\tau}{2(d\log N)^{4d}} \cdot \frac{1}{d^d (d\log N)^{2d^2} N^{d-1}} \cdot \frac{\rho\tau\mathrm{det}(Z)}{2^{3d^2}}\\ &\geq \frac{\rho\delta N}{(d\log N)^{7d^2}}\cdot \frac{\tau^2 \mathrm{det}(Z)}{N^d}\\ & = \frac{\rho\delta N}{(d\log N)^{7d^2}}. \end{align}\] The second inequality is due to Lemma 4(iii). ◻

3.3 All Lattice Points in a Large Hypercube↩︎

Let \(\vb*{b}_1, \ldots, \vb*{b}_d\) be the vectors given by Lemma 4. Let \(\Gamma := \mathcal{L}(\vb*{b}_1, \ldots, \vb*{b}_d)\). Clearly, \(\Gamma \subseteq Z\), where \(Z: = \mathcal{L}(A)\), since each \(\vb*{b}_j\) is a subset sum of \(A\). We already have a progression with basis \(\vb*{b}_1, \ldots, \vb*{b}_d\). We shall fill the progression with remainders (modulo \(\Gamma\)) of \(Z\), and show that \(\mathcal{S}(A)\) contains all the lattice points of \(Z\) inside a large hypercube.

To generate all these remainders, we need the following technical lemma, which states that we need only \(O(\frac{\ell}{n})\) vectors to generate all the remainders of \(Z\), where \(\ell: = \mathrm{det}(\Gamma)/\mathrm{det}(Z)\). The lemma is due to Kneser’s Theorem and a densification technique by Szemerédi and Vu [55], and we defer its proof to Section 8.

Recall that \(\mu(A, \Gamma)\) is the largest multiplicity of any remainder (modulo \(\Gamma\)) in \(A\).

lemmalemgenremdense There exists a constant \(c\) such that the following holds. Let \(A\) be a set of \(n\) vectors from \(\mathbb{Z}^d\), where \(Z : = \mathcal{L}(A)\) is full-dimensional. Let \(\Gamma \subseteq Z\) be a full-dimensional lattice, and let \(\ell := \mathrm{det}(\Gamma)/\mathrm{det}(Z)\). Let \(A'\) be a subset of \(A\), and let \(\mu := \mu(A', \Gamma)\). Assume that \[\label{eq:gen-rem-dense-0} 32\mu\ell(\log (\mu\ell))^{3d} \leq |A'|^2.\tag{6}\] If \(|A \setminus \Lambda| \geq \frac{c\mu\ell}{|A'|}\) for any lattice \(\Lambda\) with \(\Gamma \subseteq \Lambda \subsetneq Z\), then \(A\) contains a subset \(R\) of at most \(\frac{c\mu\ell}{|A'|}(\log (\mu\ell))^{4d}\) vectors such that \(\mathcal{S}_{\Gamma}(R) = Z \bmod \Gamma\).

Comparing to Lemma 4, Lemma 6 additionally requires \(A\) to be \(\widetilde{O}(1)\)-dense and \(\widetilde{O}(1)\)-spread. This is to ensure that Lemma [lem:gen-rem-dense] is applicable to \(A\). Basically, when \(A\) is \(\widetilde{O}(1)\)-dense, then 6 will hold. When \(A\) is \(\widetilde{O}(1)\)-spread, \(A\) will have lots of vectors not on \(\Lambda\) for any \(\Lambda \subsetneq Z\).

Lemma 6. Let \(A \subseteq [N]^d\) be a set of vectors that is \(\rho\)-dense, \(\gamma\)-spread, and \(\delta\)-nondegenerate. Assume that \(N\) is sufficiently large and that \[\label{eq:all-lattice-pts-0} \rho \geq (d\log N)^{4d^2}\quad \text{and} \quad \rho\gamma \geq (d\log N)^{4d^2} \quad \text{and} \quad \rho\delta \geq (d\log N)^{13d^2}.\qquad{(1)}\] Then \[\mathcal{S}(A) \supseteq Z \cap (\vb*{v}_0 + \{z_1\vb*{e}_1 + \cdots + z_d\vb*{e}_d : 0 \leq z_j \leq \frac{\rho\delta N}{(d\log N)^{7d^2}}, z_j\in \mathbb{Z}\}),\] where \(Z := \mathcal{L}(A)\) and \(\vb*{v}_0 \in Z\).

Proof. Let \(\tau: = \sqrt{N^d/\mathrm{det}(Z)}\). The hypercube \([N]^d\) can contain at most \(2^d\tau^2\) vectors from \(Z\). Therefore, \(\rho\tau \leq 2^d\tau^2,\) or equivalently, \[\label{eq:all-lattice-pts-rou-tau} \rho \leq 2^d\tau.\tag{7}\] Since \(\rho\delta \geq (d\log N)^{12d^2}\) and \(N\) is sufficiently large, we have \[\label{eq:all-lattice-pts-bound-gamma-tau} \delta\tau \geq \frac{\rho\delta}{2^d} \geq \frac{(d\log N)^{12d^2}}{2^d} \geq (d\log N)^{11d^2}.\tag{8}\] So Lemma 4 is applicable to \(A\). Let \(\vb*{b}_1, \ldots, \vb*{b}_d\) be the \(d\) linearly independent vectors given by Lemma 4. We have that \(\vb*{b}_j \in [(d\log N)^{2d}N]^d\) for all \(j\). Let \(\Gamma := \mathcal{L}(\vb*{b}_1, \ldots, \vb*{b}_d)\). Clearly, \(\Gamma \subseteq Z\) since each \(\vb*{b}_j\) is a subset sum of \(A\). Let \[\label{eq:all-lattice-pts-4} A' = A \cap \{x_1\vb*{b}_1 + \cdots + x_d\vb*{b}_d: |x_j| \leq 2^{d-1}\}.\tag{9}\] Lemma 4(ii) guarantees that \[\label{eq:all-lattice-pts-bound-mu} |A'| \geq \frac{\rho\tau}{2}\quad\text{and}\quad \mu: = \mu(A', \Gamma) \leq (2^d + 1)^d.\tag{10}\] Let \(\ell := \mathrm{det}(\Gamma)/\mathrm{det}(Z)\). Lemma 4(iii) guarantees that \[\label{eq:all-lattice-pts-bound-ell} \frac{\rho\tau}{2^{3d^2}} \leq \ell \leq (d\log N)^{3d^2}\tau^2.\tag{11}\]

Claim 8. \(A\) contains a subset \(R\) of at most \(\frac{\tau}{8\rho}(d\log N)^{9d^2}\) vectors such that \(\mathcal{S}_{\Gamma}(R) = Z \bmod \Gamma\) and \[\label{eq:all-lattice-pts-3} \mathcal{P}(R) \subseteq \{x_1\vb*{b}_1 + \cdots + x_d\vb*{b}_d: |x_j| \leq \frac{\tau}{8\rho}(d\log N)^{9d^2}\}.\qquad{(2)}\]

Proof. We shall apply Lemma [lem:gen-rem-dense] to \(A\), \(A'\) and \(\Gamma\). Before that, we need to show that Lemma [lem:gen-rem-dense] is applicable. Let \(c\) be the constant in Lemma [lem:gen-rem-dense]. Recall that \(N\) is sufficiently large. In view of 10 and 11 , one can verify that \[\label{eq:all-lattice-pts-2} c\mu\ell (\log (\mu\ell))^{4d} \leq \ell(d\log N)^{6d^2}.\tag{12}\] Then \[|A'|^2 \geq \frac{\rho^2\tau^2}{4} \geq \frac{(d\log N)^{8d^2}\tau^2}{4} \geq c\mu\ell (\log (\mu\ell))^{3d}.\] The second inequality is due to ?? . Since \(A\) is \(\gamma\)-spread, for any lattice \(\Lambda \subsetneq Z\), we have \[|A \setminus \Lambda| \geq \gamma\tau \geq \frac{(d\log N)^{4d^2}\tau}{\rho} \geq \frac{(d\log N)^{4d^2}\tau^2}{n} \geq \frac{c\mu\ell}{n}.\] The second inequality is due to ?? , and the last is due to 11 .

Therefore, Lemma [lem:gen-rem-dense] is applicable, and \(A\) contains a subset \(R\) with \(\mathcal{S}_{\Gamma}(R) = Z \bmod \Gamma\) and \[|R| \leq \frac{c\mu\ell (\log \mu\ell)^{4d}}{|A'|} \leq \frac{2\ell}{\rho\tau}(d\log N)^{6d^2} \leq \frac{\tau}{8\rho}(d\log N)^{9d^2}.\] The second inequality follows from \(|A'| \geq \frac{\rho\tau}{2}\) and 12 , and the last follows from 11 . Since \(\vb*{a} \in [N]^d\) for every \(\vb*{a} \in R\), we have \[\mathcal{P}(R) \subseteq \{x_1\vb*{e}_1 + \cdots + x_d\vb*{e}_d: |x_j| \leq \frac{\ell N}{\rho\tau}(d\log N)^{6d^2}\}.\] Recall that \(\vb*{b}_j \in [(d\log N)^{2d}N]^d\) for all \(j\). By Lemma 5, we have that \[\mathcal{P}(R) \subseteq \{x_1\vb*{b}_1 + \cdots + x_d\vb*{b}_d: |x_j| \leq L\},\] where \[L \leq \frac{\ell N}{\rho\tau}(d\log N)^{6d^2} \cdot \frac{d^d (d\log N)^{2d^2}N^{d-1}}{\mathrm{det}(\Gamma)} = \frac{d^d(d\log N)^{8d^2}}{\rho} \cdot \frac{\ell N^d}{\tau \mathrm{det}(\Gamma)} \leq \frac{ (d\log N)^{9d^2}}{8\rho} \cdot \tau.\] The last inequality is due to the definition of \(\ell\) and \(\tau\). ◻

Let \(m\) be defined as in Lemma 4(i). We have \[\label{eq:all-lattice-pts-bound-m} m \geq \frac{\delta\tau}{(d\log N)^{4d}} \geq \frac{\tau}{\rho}(d\log N)^{9d^2} \geq 4.\tag{13}\] The second inequality is due to ?? and the last is due to 7 . Lemma 4(i) also gives \(md\) disjoint subsets \(\{A_{j,k} : 1 \leq j \leq d, 1\leq k \leq m\}\) of \(A\). Let \(G := \bigcup_{j,k} A_{j,k}\) be the union of these subsets.

Claim 9. Let \(\vb*{b}_0 := \frac{m}{4}(\vb*{b}_1 + \cdots + \vb*{b}_d)\). We have \[\mathcal{S}(G \cup R) \supseteq Z \cap (\vb*{b}_0 + \{x_1\vb*{b}_1 + \cdots + x_d\vb*{b}_d: 0\leq x_j \leq \frac{m}{4}\}).\]

Proof. Take an arbitrary \(\vb*{v}\) in \(Z \cap (\vb*{b}_0 + \{x_1\vb*{b}_1 + \cdots + x_d\vb*{b}_d: 0\leq x_j \leq \frac{m}{4}\})\). We shall show that \(\vb*{v} \in \mathcal{S}(G \cup R)\). Recall that \(\mathcal{S}_{\Gamma}(R) = Z \bmod \Gamma\), where \(\Gamma := \mathcal{L}(\vb*{b}_1, \ldots, \vb*{b}_d)\). So there must be a vector \(\vb*{u} \in \mathcal{S}(R)\) such that \(\vb*{v} - \vb*{u} \in \Gamma\). To show that \(\vb*{v} \in \mathcal{S}(G \cup R)\), it suffices to show that \(\vb*{v} - \vb*{u} \in \mathcal{S}(G \setminus R)\).

Consider \(G \setminus R\). Removing \(R\) from \(G\) affects at most \(|R|\) disjoint subsets stated in Lemma 4(i); for each \(\vb*{b}_j\), there are still \(m - |R|\) disjoint subsets of \(G\setminus R\) that with sum \(\vb*{b}_j\). In view of 13 , we have \(m > 4|R|\). Therefore, we have that \[\mathcal{S}(G \setminus R) \supseteq \{z_1\vb*{b}_1 + \cdots + z_d\vb*{b}_d: 0\leq z_j \leq \frac{3m}{4}, z_j \in \mathbb{Z}\}.\] Since we already have \(\vb*{v} - \vb*{u} \in \Gamma\), to show that \(\vb*{v} - \vb*{u} \in \mathcal{S}(A \setminus R)\), it suffices to show that \[\label{eq:all-lattice-pts-5} \vb*{v} - \vb*{u} \in \{x_1\vb*{b}_1 + \cdots + x_d\vb*{b}_d: 0\leq x_j \leq \frac{3m}{4}\}.\tag{14}\]

Since \(\vb*{u} \in \mathcal{S}(R)\) and \(\mathcal{S}(R) \subseteq 2\mathcal{P}(R)\), in view of ?? and 13 , we have that \[\vb*{u} \in \{x_1\vb*{b}_1 + \cdots + x_d\vb*{b}_d: |x_j| \leq \frac{m}{4}\}.\] Note that \[\vb*{v} \in \{x_1\vb*{b}_1 + \cdots + x_d\vb*{b}_d: \frac{m}{4} \leq x_j \leq \frac{m}{2}\}.\] Therefore, \[\vb*{v} - \vb*{u} \in \{x_1\vb*{b}_1 + \cdots + x_d\vb*{b}_d: 0 \leq x_j \leq \frac{3m}{4}\}. \qedhere\] ◻

Given Claim [clm:all-latt-pts-2], to prove the Theorem, it suffices to show that \[P := \{x_1\vb*{b}_1 + \cdots + x_d\vb*{b}_d: 0\leq x_j \leq \frac{m}{4}\}\] contains a hypercube of length at least \(\frac{\rho\delta N}{(d\log N)^{7d^2}} + N\). This can be shown using exactly the same argument as that in Corollary 4. We omit the details. ◻

3.4 Long Progressions with Axis-Parallel Basis↩︎

We prove the main theorem of this Section. We first show that the all the lattice points of \(Z\) in a large hypercube must contain a long progression with basis \(\mathrm{det}(Z) \vb*{e}_1, \ldots, \mathrm{det}(Z) \vb*{e}_d\).

Lemma 7. Let \(Z\) be a full-dimensional lattice. Let \[P := \{x_1\vb*{e}_1 + \cdots + x_d\vb*{e}_d : 0 \leq x_j \leq N_j\mathrm{det}(Z)\},\] where \(N_1, \ldots, N_j\) are positive integers. Then \[P \cap Z \supseteq \{z_1\mathrm{det}(Z)\vb*{e}_1 + \cdots + z_d\mathrm{det}(Z)\vb*{e}_d : 0 \leq z_j \leq N_j, z_j \in \mathbb{Z}\}.\]

Proof. Let \(B = (\vb*{b}_1, \ldots, \vb*{b}_d)\) be the basis of \(Z\). Without loss of generality, we assume that \(\mathrm{det}(B) > 0\), since otherwise, we can pick an arbitrary column \(\vb*{b}_j\) and set \(\vb*{b}_j:= -\vb*{b}_j\). Let \(B^*\) be the adjugate matrix of \(B\), then \(B^*\) is also an integer matrix, and \(BB^*=\mathrm{det}(B) I\), where \(I\) is the identity matrix. Let \(\vb*{q}_j\) be the \(j\)-th column of \(B^*\), then we have \[B\vb*{q}_j =\mathrm{det}(B)\vb*{e}_j.\] Note that \(B\vb*{q}_j = q_{1j}\vb*{b}_1 + \cdots + q_{dj}\vb*{b}_d\). Therefore, \(\mathrm{det}(B)\vb*{e}_j \in Z\), which implies \(z_j\mathrm{det}(B)\vb*{e}_j \in P \cap Z\) for any integer \(z_j\) with \(0\leq z_j \leq N_j\). Since this holds for all \(j\), we have \[P \cap Z \supseteq \{z_1\mathrm{det}(Z)\vb*{e}_1 + \cdots + z_d\mathrm{det}(Z)\vb*{e}_d : 0 \leq z_1 \leq N_j\}. \qedhere\] ◻

The main theorem of this section follows straightforwardly by Lemma 6 and Lemma 7.

Theorem 10. Let \(A \subseteq [N]^d\) be a set of vectors that is \(\rho\)-dense, \(\gamma\)-spread, and \(\delta\)-nondegenerate. Assume that \(N\) is sufficiently large and that \[\rho \geq (d\log N)^{4d^2}\quad \text{and} \quad \rho\gamma \geq (d\log N)^{4d^2} \quad \text{and} \quad \rho\delta \geq (d\log N)^{13d^2}\mathrm{det}(Z).\] Then \[\mathcal{S}(A) \supseteq \vb*{v}_0 + \{z_1\cdot \mathrm{det}(Z)\vb*{e}_1 + \cdots + z_d\cdot \mathrm{det}(Z)\vb*{e}_d : 0 \leq z_j \leq N, z_j\in \mathbb{Z}\},\] where \(Z := \mathcal{L}(A)\) and \(\vb*{v}_0 \in Z\).

4 A John-Type Theorem for Dense Subset Sum↩︎

Again, we consider only the case where \(A\) is a subset of \([N]^d\), and to ease the understanding, one may also assume that \(Z = \mathbb{Z}^d\).

We shall show that when \(A\) is \(\widetilde{O}(1)\)-dense, \(\widetilde{O}(1)\)-spread, and \(\widetilde{O}(1)\)-nondegenerate, then \(\mathcal{S}(A)\) contains almost all the lattice points of \(\mathcal{L}(A)\) inside the zonotope. That is, \[\mathcal{S}(A) \supseteq Z \cap \left((1-o(1))\mathcal{P}(A) + \frac{\sigma(A)}{2}\right)\]

We first show that for any lattice point in the above zonotope, \(\mathcal{S}(A)\) must contain a point that is close to it. This is a direct consequence of integer programming theory.

Lemma 8. Let \(A \subseteq [N]^d\) be a set of vectors. For each \(\vb*{t} \in \mathcal{P}(A) + \frac{\sigma(A)}{2}\), there exists \(\vb*{t}' \in \mathcal{S}(A)\) such that \[\vb*{t} - \vb*{t}' \in \{x_1\vb*{e}_1 + \cdots + x_d\vb*{e}_d: 0 \leq x_j \leq dN\}.\]

Proof. Let \(\vb*{a}_1, \ldots, \vb*{a}_n\) be the vectors in \(A\). Take an arbitrary \(\vb*{t} \in \mathcal{P}(A) + \frac{\sigma(A)}{2}\). Consider the polytope \[K := \{(y_1, \ldots, y_n) : y_1\vb*{a}_1 + \cdots + y_n\vb*{a}_n = \vb*{t}, 0 \leq y_j \leq 1 \}.\] \(K\) has \(n\) variables and \(d + 2n\) constraints. Also \(K\) is non-empty since \(\vb*{t} \in \mathcal{P}(A) + \frac{\sigma(A)}{2}\). We take an arbitrary vertex \((y_1, \ldots, y_n)\) of \(K\). Classic integer programming theory implies that all but at most \(d\) variables of \((y_1, \ldots, y_n)\) must be integral [56]. Without loss of generality, assume that only variables \(y_1, \ldots, y_{d}\) may be non-integral. Let \[\vb*{t}' := y_{d+1} \vb*{a}_{d+1} + \cdots + y_{n}\vb*{a}_n.\] Since \(y_{d+1}, \ldots, y_{n} \in \{0,1\}\), we have \(\vb*{t}' \in \mathcal{S}(A)\). Note \(\vb*{t} - \vb*{t'} = y_1\vb*{a}_1 + \cdots + y_{d}\vb*{a}_{d}.\) It is easy to verify that \(\vb*{t} - \vb*{t}' \in \{x_1\vb*{e}_1 + \cdots + x_d\vb*{e}_d: 0 \leq x_i \leq dN\}.\) ◻

The above lemma implies that the “holes” between the elements of \(\mathcal{S}(A)\) cannot be too large – it can be covered by a hypercube of edge-length \(dN\). Therefore, if we have a “patch” that contains all the lattice points inside a hypercube of edge-length \(dN\), then we can cover the holes using the patch and obtain all the lattice points in the zonotope.

The following lemma states that if we can use only a small subset \(A^*\) of \(A\) to generate the patch, then we only lose a small fraction of the zonotope in which all the lattice points belong to \(\mathcal{S}(A)\). By small, we mean \(\mathcal{P}(A^*) \subseteq \varepsilon \mathcal{P}(A)\).

Lemma 9. Let \(A \subseteq [N]^d\) be a set of vectors where \(Z:= \mathcal{L}(A)\) is full-dimensional. Suppose that \(A\) contains a subset \(A^*\) such that \(\mathcal{P}(A^*) \subseteq \varepsilon \mathcal{P}(A)\) for some \(\varepsilon \leq 1/4\) and that for some vector \(\vb*{v}_0 \in Z\), \[\label{eq:frac2int-1} \mathcal{S}(A^*) \supseteq Z \cap (\vb*{v}_0 + \{z_1\vb*{e}_1 + \cdots + z_d\vb*{e}_d : z_j \in \mathbb{Z}, 0 \leq z_j \leq dN\}),\qquad{(3)}\] then \[\mathcal{S}(A) \supseteq Z \cap \left((1-4\varepsilon)\mathcal{P}(A) + \frac{\sigma(A)}{2}\right).\]

Proof. We first show that \[\label{eq:frac2int-2} \mathcal{S}(A) \supseteq Z \cap \left(\mathcal{P}(A\setminus A^*) + \vb*{v}_0 - \frac{\sigma(A^*)}{2} + \frac{\sigma(A)}{2}\right).\tag{15}\] Take an arbitrary \(\vb*{t}\) from the set on the right-hand side of 15 . We have \[\vb*{t} - \vb*{v}_0 \in \mathcal{P}(A\setminus A^*) - \frac{\sigma(A^*)}{2} + \frac{\sigma(A)}{2} = \mathcal{P}(A\setminus A^*) + \frac{\sigma(A \setminus A^*)}{2}.\] By Lemma 8, there exists \(\vb*{t}' \in \mathcal{S}(A\setminus A^*)\) such that \[\vb*{t} - \vb*{v}_0 - \vb*{t'}\in \{x_1\vb*{e}_1 + \cdots + x_d\vb*{e}_d: 0 \leq x_j \leq dN\},\] or in equivalent form, \[\vb*{t} - \vb*{t'} \in \vb*{v}_0 + \{x_1\vb*{e}_1 + \cdots + x_d\vb*{e}_d: 0 \leq x_j \leq dN\},\] Also note that \(\vb*{t} - \vb*{t'} \in Z\). In view of ?? , we have \(\vb*{t} - \vb*{t}' \in \mathcal{S}(A^*)\). Therefore, \(\vb*{t} \in \mathcal{S}(A)\).

In view of 15 , to prove the lemma, it suffices to show that \[\label{eq:frac2int-3} (1-4\varepsilon)\mathcal{P}(A) \subseteq \mathcal{P}(A\setminus A^*) + \vb*{v}_0 - \frac{\sigma(A^*)}{2}.\tag{16}\] Take an arbitrary \(\vb*{v} \in (1-4\varepsilon)\mathcal{P}(A)\). Note that \(\vb*{v}_0 \in \mathcal{S}(A^*) \subseteq 2\mathcal{P}(A^*) \subseteq 2\varepsilon \mathcal{P}(A)\) and that \(\frac{\sigma(A^*)}{2} \in \mathcal{P}(A^*) \subseteq \varepsilon \mathcal{P}(A)\). By Lemma 3(i), \[\label{eq:frac2int-4} \vb*{v} - \vb*{v}_0 + \frac{\sigma(A^*)}{2} \in (1 - \varepsilon)\mathcal{P}(A).\tag{17}\] Recall that \(\mathcal{P}(A^*) \subseteq \varepsilon\mathcal{P}(A)\). Also note that \(\mathcal{P}(A \setminus A^*) + \mathcal{P}(A^*) = \mathcal{P}(A)\). By Lemma 3(iii), \[(1 - \varepsilon)\mathcal{P}(A) \subseteq \mathcal{P}(A \setminus A^*).\] In view of 17 , \[\vb*{v} - \vb*{v}_0 + \frac{\sigma(A^*)}{2} \in \mathcal{P}(A \setminus A^*),\] or, in equivalent form, \[\vb*{v} \in \mathcal{P}(A \setminus A^*) + \vb*{v}_0 - \frac{\sigma(A^*)}{2}.\] Therefore, 16 holds. ◻

Now we are very close to the main result of this section. Lemma 6 already implies that we can generate a patch using vectors in \(A\). It remains to show only a small subset of \(A\) is needed.

The major part of the proof of Lemma 10 is the same as that of Lemma 6 – we apply Lemma 4 to \(A\) and obtain a set \(G\) such that \(\mathcal{S}(G)\) contains a long progression with basis \(\vb*{b}_1, \ldots, \vb*{b}_1\), and then obtain a subset \(R\) of \(A\) that can generate all remainders \(Z \bmod \Gamma\), where \(\Gamma := \mathcal{L}(\vb*{b}_1, \ldots, \vb*{b}_d)\). Then it turns out that \(\mathcal{S}(G \cup R)\) contains all the lattice points in \(Z\) inside a large hypercube.

It is actually easy to bound \(\mathcal{P}(R)\) in terms of \(\mathcal{P}(A)\). The main challenge is \(\mathcal{P}(G)\). To bound \(\mathcal{P}(G)\), we use a probabilistic argument. Instead of including all the disjoint subsets \(\{A_{jk}\}_{j,k}\) returned by Lemma 4, we will sample them with probability \(p \approx (d\log N)^{12d^2}/(\rho\tau)\) and include only the sampled ones into \(G\). Then on average, \(\mathcal{P}(G) \subseteq p\cdot \mathcal{P}(A)\). We will also show that \(\mathcal{S}(G \cup R)\) still contains all the lattice points in \(Z\) inside a large hypercube.

Lemma 10. Let \(A \subseteq [N]^d\) be a set of vectors that is \(\rho\)-dense, \(\gamma\)-spread, and \(\delta\)-nondegenerate. Assume that \(N\) is sufficiently large and that \[\rho \geq (d\log N)^{4d^2}\quad \text{and} \quad \rho\gamma \geq (d\log N)^{4d^2} \quad \text{and} \quad \rho\delta \geq 5(d\log N)^{13d^2}.\] Then \(A\) contains a subset \(A^*\) such that \[\mathcal{S}(A^*) \supseteq Z \cap (\vb*{v}_0 + \{z_1\vb*{e}_1 + \cdots + z_d\vb*{e}_d : 0 \leq z_j \leq dN, z_j\in \mathbb{Z}\}),\] where \(Z := \mathcal{L}(A)\) and \(\vb*{v}_0 \in Z\), and that \[\mathcal{P}(A^*) \subseteq \varepsilon \mathcal{P}(A),\] where \(\varepsilon := \frac{5(d\log N)^{13d^2}}{\rho\delta}\).

Proof. Let \(\tau : = \sqrt{N^d/\mathrm{det}(Z)}\). Using exactly the same argument as that in the proof of Lemma 6, one can show that Lemma 4 is applicable to \(A\). Let \(\vb*{b}_1, \ldots, \vb*{b}_d\) and \(\{A_{j,k}: 1\leq j \leq d, 1 \leq k \leq m\}\) be the linearly independent vectors and disjoint subsets of \(A\) returned by Lemma 4. We have \(|A_{j,k}| \leq (d\log N)^{2d}\) and \(m \geq \frac{\delta\tau}{(d\log N)^{4d}}\). Let \(\ell := \mathrm{det}(\Gamma)/\mathrm{det}(Z)\). Lemma 4(iii) guarantees that \[\label{eq:small-set-small-region-3} \frac{\rho\tau}{2^{3d^2}} \leq \ell \leq (d\log N)^{3d^2}\tau^2.\tag{18}\]

Let \(p = \frac{2(d\log N)^{13d^2}}{\rho\delta}\). We randomly sample the subsets \(\{A_{j,k}: 1\leq j \leq d, 1 \leq k \leq m\}\) with probability \(p\), and let \(G\) be the union of the sampled subsets.

Claim 11. With error probability at most \(N^{-d}\), \(G\) contains disjoint subsets \(\{G_{j,k}: 1\leq j \leq d, 1 \leq k \leq m'\}\), where \(m' := \lceil \frac{\tau}{\rho}(d\log N)^{9d^2} \rceil\) and \(\sigma(G_{j,k}) = \vb*{b}_j\) for all \(j, k\).

Proof. For each \(j\), let \(X_j\) be the number of sampled subsets from \(\{A_{j,k}: 1 \leq k \leq m\}\). To prove the claim, it suffices to bound \(\mathbf{Pr}[X_j \leq \frac{\tau}{\rho}(d\log N)^{9d^2}]\).

It is easy to see that \(\mathbf{E}[X_j] = pm \geq \frac{2\tau}{\rho}(d\log N)^{9d^2}\). Note that \(X_j\) is a sum of independent Bernoulli trials. By standard Chernoff bound, we have \[\mathbf{Pr}[X_j \leq \frac{\tau}{\rho}(d\log N)^{9d^2}] \leq \exp(- \frac{\tau}{4\rho}(d\log N)^{9d^2}) \leq \exp(- \frac{(d\log N)^{9d^2}}{2^{d+2}}) \leq N^{-d^2}.\] The second inequality is due to 7 . The claim follows by union bound. ◻

Then using exactly the same argument (Claim 8 and 9) as that in Lemma 6, one can show that \(A\) contains a subset \(R\) of at most \(\frac{\tau}{8\rho}(d\log N)^{9d^2}\) vectors such that \(\mathcal{S}_{\Gamma}(R) = Z \bmod \Gamma\) and \[\label{eq:small-set-small-region-1} \mathcal{P}(R) \subseteq \{x_1\vb*{b}_1 + \cdots + x_d\vb*{b}_d: |x_j| \leq \frac{\tau}{8\rho}(d\log N)^{9d^2}\},\tag{19}\] and \[\label{eq:small-set-small-region-2} \mathcal{S}(G \cup R) \supseteq Z \cap (\vb*{b}_0 + \{x_1\vb*{b}_1 + \cdots + x_d\vb*{b}_d: 0\leq x_j \leq \frac{m'}{4}\}),\tag{20}\] where \(\vb*{b}_0 := \frac{m'}{4}(\vb*{b}_1 + \cdots + \vb*{b}_d)\).

We shall show that \(A^*:= G \cup R\) satisfies all the stated properties.

In view of 20 , we have \[\mathcal{S}(G \cup R) \supseteq Z \cap (\vb*{v}_0 + \{z_1\vb*{e}_1 + \cdots + z_d\vb*{e}_d : 0 \leq z_j \leq dN, z_j\in \mathbb{Z}\}),\] where \(\vb*{v}_0 \in Z\), since using exactly the same argument as that in Corollary 4, the polytope \(\{x_1\vb*{b}_1 + \cdots + x_d\vb*{b}_d: 0\leq x_j \leq \frac{m'}{4}\}\) contains a hypercube of length at least \(dN + N\). We omit the details.

It remains to bound \(\mathcal{P}(G \cup R)\) in terms of \(\mathcal{P}(A)\). It suffices to bound \(\mathcal{P}(R)\) and \(\mathcal{P}(G)\) separately.

We first show that \(\mathcal{P}(A)\) is large. Note that \(\mathcal{S}(A) \subseteq 2\mathcal{P}(A)\). Lemma 4(i) implies that \[\label{eq:small-set-small-region-4} \mathcal{P}(A) \supseteq \left\{x_1\vb*{b}_1 + \cdots + x_d \vb*{b}_d: |x_j| \leq \frac{\delta\tau}{2(d\log N)^{4d}}\right\}.\tag{21}\] By Corollary 4, we have \[\label{eq:small-set-small-region-5} \mathcal{P}(A) \supseteq \left\{x_1\vb*{e}_1 + \cdots + x_d \vb*{e}_d: |x_j| \leq \frac{\rho\delta N}{(d\log N)^{7d^2}}\right\}.\tag{22}\]

Now we can bound \(\mathcal{P}(R)\). In view of 19 and 21 , we have that \[\mathcal{P}(R) \subseteq \varepsilon_R\mathcal{P}(A),\] where \[\varepsilon_R \leq \frac{(d\log N)^{13d^2}}{4\rho\delta}.\]

Next we show that \(\mathcal{P}(G) \subseteq 2p \mathcal{P}(A)\), which will immediately imply that \[\mathcal{P}(G \cup R) \subseteq \mathcal{P}(G) + \mathcal{P}(R) \subseteq (\varepsilon_R + 2p) \mathcal{P}(A) \subseteq \frac{5(d\log N)^{13d^2}}{\rho\delta}.\] By Corollary 3, \(\mathcal{P}(G) \subseteq 2p \mathcal{P}(A)\) if and only if \(f_{P'}(\vb*{v}) \leq 2pf_{P}(\vb*{v})\), where \(P' := \mathcal{P}(G)\) and \(P := \mathcal{P}(A)\), for all facet normals \(\vb*{v}\) of \(\mathcal{P}(A)\). Below we show that this happens with error probability at most \(N^{-d}\). This will finish the proof, since the total error probability of the construction of \(G\) and \(R\) is at most \(2N^{-d} < 1\), which implies the existence of the target \(G\) and \(R\).

Fix an arbitrary vector \(\vb*{v} \in \mathbb{R}^d\) with \(\|\vb*{v}\|_2 = 1\). By definition, it is easy to observe that \(f_{P'}(\vb*{v}) = \frac{1}{2}\sum_{\vb*{a} \in A'}|\vb*{a} \cdot \vb*{v}|\). For each \(A_i\), let \(f_i(\vb*{v}) = \frac{1}{2}\sum_{\vb*{a} \in A_i}|\vb*{a} \cdot \vb*{v}|\). Then \(f_{P'}(\vb*{v})\) can be viewed as the sum of a set of reals that are sampled with probability \(p\) from \(\{f_1(\vb*{v}), \ldots, f_m(\vb*{v})\}\), and therefore, we have \[\begin{align} \mathbf{E}[f_{P'}(\vb*{v})] &= \sum_{i}p f_{i}(\vb*{v}) = \frac{p}{2}\sum_{i}\sum_{\vb*{a} \in A_{i}}|\vb*{a} \cdot \vb*{v}| \leq \frac{p}{2}\sum_{\vb*{a} \in A}|\vb*{a} \cdot \vb*{v}| = p\cdot f_P(\vb*{v})\\ \mathbf{Var}[f_{P'}(\vb*{v})] &= p(1-p)\sum_{i}f_{i}(\vb*{v})^2 \leq p \cdot \max_{i}f_{i}(\vb*{v}) \cdot \sum_{i}f_{i}(\vb*{v}) \leq p \cdot \max_{i}f_{i}(\vb*{v}) \cdot f_P(\vb*{v}). \end{align}\] Let \(\eta = p f_P(\vb*{v})\). By Bernstein’s inequality, we have \[\begin{align} \mathbf{Pr}[f_{P'}(\vb*{v}) \geq 2p \cdot f_P(\vb*{v})] \leq & \mathrm{exp}\left(-\frac{\eta^2}{2\mathbf{Var}[f_{P'}(\vb*{v})] + \frac{2}{3}\eta\max_{i} f_{i}(\vb*{v})}\right) \nonumber\\ \leq & \mathrm{exp}\left(- \min\left\{\frac{\eta^2}{4\mathbf{Var}[f_{P'}(\vb*{v})]}, \frac{\eta}{2\max_{i} f_{i}(\vb*{v})}\right\}\right)\\ \leq & \mathrm{exp}\left(- \min\left\{ \frac{\eta}{4\max_{i} f_{i}(\vb*{v})}, \frac{\eta}{2\max_{i} f_{i}(\vb*{v})}\right\}\right) \\ \leq& \mathrm{exp}\left(-\frac{pf_P(\vb*{v})}{4\max_{i} f_{i}(\vb*{v})}\right).\\ \end{align}\] In view of 22 , we have \[f_p(\vb*{v}) \geq \frac{\rho\delta N}{(d\log N)^{7d^2}}.\] Since \(|A_i| \leq (d\log N)^{2d}\) and \(\vb*{a} \in [N]^d\) for all \(\vb*{a} \in A_i\), we have \[f_i(\vb*{v}) \leq \frac{1}{2} \cdot (d\log N)^{2d} \cdot \sqrt{d}{N} \leq \frac{\sqrt{d}N}{2}(d\log N)^{2d}.\] Therefore, we have \[\begin{align} &\mathbf{Pr}[f_{P'}(\vb*{v}) \geq 2p \cdot f_P(\vb*{v})]\\ \leq &\exp(- \frac{2(d\log N)^{12d^2}}{\rho\delta} \cdot \frac{\rho\delta N}{(d\log N)^{7d^2}} \cdot \frac{2}{\sqrt{d}(d\log N)^{2d} N}) \leq N^{-2d^2}\\ \end{align}\] Note that \(\mathcal{P}(A)\) can have at most \(|A|^d \leq N^{d^2}\) facets, therefore, by union bound, we have \[\mathbf{Pr}[\text{f_{P'}(\vb*{v}) \geq 2p\cdot f_{P}(\vb*{v}) for some facet normal of \mathcal{P}(A)} ] \leq N^{-2d^2} \cdot N^{d^2} \leq N^{-d}. \qedhere\] ◻

The main theorem of this section follows by Lemma 9 and Lemma 10.

Theorem 12. Let \(A \subseteq [N]^d\) be a set of vectors that is \(\rho\)-dense, \(\gamma\)-spread, and \(\delta\)-nondegenerate. Assume that \(N\) is sufficiently large and that \[\rho \geq (d\log N)^{4d^2}\quad \text{and} \quad \rho\gamma \geq (d\log N)^{4d^2} \quad \text{and} \quad \rho\delta \geq (d\log N)^{14d^2}.\] Then \[Z \cap \left((1 - \varepsilon) \mathcal{P}(A) + \frac{\sigma(A)}{2}\right) \subseteq \mathcal{S}(A) \subseteq Z \cap \left(\mathcal{P}(A) + \frac{\sigma(A)}{2}\right),\] where \(Z := \mathcal{L}(A)\) and \(\varepsilon := \frac{(d\log N)^{14d^2}}{\rho\delta}\).

5 An Algorithm for Dense Subset Sum↩︎

We shall show that given a set \(A \subseteq [N]^d\) that is \(\widetilde{O}(1)\)-dense and \(\widetilde{O}(1)\)-nondegenerate, then for any \(\vb*{t} \in (1 - o(1))\mathcal{P}(A) + \frac{\sigma(A)}{2}\), we can decide whether \(\vb*{t} \in \mathcal{S}(A)\) in \(\widetilde{O}(n \cdot d^d \cdot \mathrm{poly}(d))\) time.

Basically, we will extract a subset \(A^*\) of \(A\) that is \(\widetilde{O}(1)\)-dense, \(\widetilde{O}(1)\)-spread, and \(\widetilde{O}(1)\)-nondegenerate. Using this subset and Theorem 12, we will be able to obtain a lattice \(\Gamma\) such that \(\vb*{t} \in \mathcal{S}(A)\) if and only if \(\vb*{t} \in \mathcal{S}_{\Gamma}(A)\). Then it suffices to solve the modular subset sum problem.

Our algorithm relies on the fact that modular subset sum and symmetry set can be computed efficiently. The proof of the following lemma is deferred to Section 9.

lemmalemfastermodularss Let \(A \subseteq \mathbb{Z}^d\) be a set of vectors, where \(Z := \mathcal{L}(A)\) is full-dimensional. Let \(\Gamma \subseteq Z\) be a full-dimensional lattice. We can compute \(\mathcal{S}_{\Gamma}(A)\) and \(\mathrm{Sym}_{\Gamma}(\mathcal{S}(A))\) in \(\widetilde{O}((n + 2^d\ell) \cdot \mathrm{poly}(d))\) time, where \(\ell := \mathrm{det}(\Gamma)/\mathrm{det}(Z)\).

5.1 Computing Almost Common Lattice↩︎

To extract an \(\widetilde{O}(1)\)-spread subset of \(A\), we need to compute almost common lattices of \(A\). By almost common lattice, we mean a proper sublattice \(\Gamma \subsetneq \mathcal{L}(A)\) such that most of the vectors in \(A\) fall in \(\Gamma\). In \(1\)-D case, assuming the greatest common divisor of \(A\) is \(1\), an almost common lattice corresponds to a divisor that divides most of the integers in \(A\), and can be computed in \(\widetilde{O}(n + \sqrt{N})\) time via an algorithm by Bringmann and Wellnitz [7]. Below we summarize their algorithm.

Theorem 13 ([7]). The prime factorization of \(n\) given integers in \([N]\) can be computed in \(\widetilde{O}(n + \sqrt{N})\) time.

Although in a slightly different form, the following lemma is essentially the same as Theorem 4.12 in [7]. We provide a proof for completeness.

Lemma 11. Given a multiset \(A\) of \(n\) integers in \([N]\), and an integer \(k\), we can decide whether \(A\) contains \(k\) elements that have a common divisor greater than \(1\), and compute such a divisor if it exists, in \(\widetilde{O}(n + \sqrt{N})\) time.

Proof. Note that if some integers have a common divisor greater than \(1\), then they must have a prime common divisor. We first use Theorem 13 to compute the prime factorization of all integers in \(A\) in \(\widetilde{O}(n + \sqrt{N})\) time. Then for each prime \(p\), we can determine the number of integers in \(A\) that are divisible by \(p\). If some \(p\) divides at least \(k\) integers in \(A\), then we return \(p\). Otherwise, no \(k\) elements of \(A\) have a common divisor greater than \(1\). ◻

We shall generalize the above result to multi-dimension as follows. For \(j \in \{1, \ldots, d\}\), let \(A_j\) be the projection of \(A\) onto the subspace spanned by \(\vb*{e}_1, \ldots, \vb*{e}_j\). We will iteratively check whether \(A_j\) has an almost common lattice. If some \(A_j\) has an almost common lattice, then so does \(A\). Suppose that \(A_j\) does not have an almost common lattice. Then using Observation 14, we show that deciding whether \(A_{j+1}\) has an almost common lattice can be reduced to deciding whether a certain multiset of determinants have an almost common divisor, which can be solved via Lemma 11.

Observation 14. Let \(A \subseteq \mathbb{Z}^d\) be a finite set of vectors. If \(A\) is on some full-dimensional lattice \(\Gamma\), then \(\mathrm{det}(\Gamma)\) is a common divisor of the integers in the following multiset. \[\left\{\mathrm{det}(\vb*{a}_1, \ldots, \vb*{a}_d) : \vb*{a}_i \in A\right\}\]

Proof. Since \(A \subseteq \Gamma\), the lattice generated by \(\vb*{a}_1, \ldots, \vb*{a}_d\) must be a sublattice of \(\Gamma\). Therefore, \(\mathrm{det}(\Gamma)\) divides \(\mathrm{det}(\vb*{a}_1, \ldots, \vb*{a}_d)\). ◻

Lemma 12. Let \(A \subseteq [N]^d\) be a finite set of \(n\) vectors, where \(N\) is sufficiently large and \(Z : =\mathcal{L}(A)\) is full-dimensional. Let \(\tau := \sqrt{N^d/\mathrm{det}(Z)}\). For any integer \(k \geq 1\), in \(\widetilde{O}((n + d^d\tau)\cdot \mathrm{poly}(d))\) time, with error probability at most \(N^{-\Omega(d)}\), we can

  • either find a proper sublattice \(\Gamma \subsetneq Z\) such that \[|A \setminus \Gamma| \leq k\cdot (d\log N)^{2d};\]

  • or assert that \(|A \setminus \Gamma| \geq k\) for any proper sublattice \(\Gamma \subsetneq Z\).

Proof. When \(k = 1\), the lemma holds trivially since \(|A \setminus \Gamma| \geq 1\) for any proper sublattice \(\Gamma \subsetneq \mathcal{L}(A)\). Assume that \(k \geq 2\).

For \(j \in \{1, \ldots, d\}\), let \(A_j\) be the projection of \(A\) onto the \(j\)-dimensional space spanned by \(\vb*{e}_1, \ldots, \vb*{e}_j\). (Note that \(A_j\) can be a multiset.) Let \(Z_j := \mathcal{L}(A_j)\). Note that \(Z_j\) must be full-dimensional. Let \(k_j := k\cdot (d\log N)^{2(d-j)}\). We say that \(A_j\) is bad if \(|A_j \setminus \Gamma_j| \leq k_j\) for some proper sublattice \(\Gamma_j \subsetneq Z_j\), and good otherwise. We shall iteratively determine whether \(A_j\) is good or bad for \(j \in \{1, \ldots, d\}\). If some \(\Gamma_j\) certifies that \(A_j\) is bad, then by lifting \(\Gamma_j\) to \(d\)-dimension, we can obtain a proper sublattice \(\Gamma \subsetneq Z\) such that \[|A \setminus \Gamma| \leq k_j \leq k\cdot (d\log N)^{2d};\] Otherwise, we will have \(A_d\) is good. (Note that \(A_d = A\) and \(k_d = k\).) This implies \(|A \setminus \Gamma| \geq k\) for any \(\Gamma \subsetneq Z\).

Consider the base case where \(j = 1\). Note that \(A_1\) is a multiset of integers from \([N]\) and they are all multiples of \(\mathrm{det}(Z_1)\). Let \(A'_1\) be obtained by dividing each element of \(A_1\) by \(\mathrm{det}(Z_1)\). To determine whether \(A_1\) is bad or not, it suffices to check whether \(n - k_1\) integers in \(A'_1\) have a common divisor greater than \(1\), and find such a divisor if it exists. This can be done by Lemma 11 in \(\widetilde{O}(n + \sqrt{N})\) time.

If \(A_{j-1}\) is bad, then we are done. Suppose that \(A_{j-1}\) is good. We need to check whether \(A_j\) is bad or not. We shall show that if \(A_j\) is bad, then in \(\widetilde{O}((n + \sqrt{N}) \cdot \mathrm{poly}(j))\) time and with error probability at most \(\frac{1}{8}\), we can obtain a lattice \(\Gamma^*_j \subsetneq Z_j\) certifying that \(A_j\) is bad. By repeating the procedure for \(O(d\log N)\) times, we can reduce the error probability to \(N^{-\Omega(d)}\). The lemma follows straightforwardly by simply iterating over \(j \in \{1, \ldots, d\}\).

Suppose that \(A_j\) is bad. That is, \(|A_j \setminus \Gamma_j| \leq k_j\) for some \(\Gamma_j \subsetneq Z_j\). We sample the elements of \(A_j\) with probability \(\frac{1}{k_j}\), and let \(S\) be the set of sampled elements. Let \(S'\) be the projection of \(S\) onto the \((j-1)\)-dimensional space spanned by \(\vb*{e}_1, \ldots, \vb*{e}_{j-1}\).

Claim 15. With probability at least \(\frac{1}{8}\), we have \(S \subseteq \Gamma_j\) and \(\mathcal{L}(S') = Z_{j-1}\).

Proof. It suffices to show that \[\begin{align} \mathbf{Pr}[\text{S \subseteq \Gamma_j}] \geq \frac{1}{4},\tag{23}\\ \mathbf{Pr}[\mathcal{L}(S') = Z_{j-1}] \geq \frac{7}{8}\tag{24} \end{align}\] Then the lemma holds by union bound.

Inequality 23 is easy to prove. Note that \(S \subseteq \Gamma_j\) if none of the elements in \(A_j \setminus \Gamma_j\) are sampled. (Recall that \(k_j \geq k \geq 2\).) Therefore, \[\mathbf{Pr}[\text{S \subseteq \Gamma_j}] \geq (1- \frac{1}{k_j})^{k_j} \geq \frac{1}{4}.\]

Next we show 24 . Since \(S' \subseteq Z_{j-1}\), we have \(\mathcal{L}(S') \neq Z_{j-1}\) if and only if \(S' \subseteq \Gamma\) for some lattice \(\Gamma \subsetneq Z_{j-1}\). It suffices to bound the probability of the latter. Note that \(S'\) can be regarded as a multiset whose elements are sampled from \(A_{j-1}\) with probability \(\frac{1}{k_j}\). Fix an arbitrary proper sublattice \(\Gamma \subsetneq Z_{j-1}\). Since \(A_{j-1}\) is good, we have that \[|A_{j-1} \setminus \Gamma| \geq k_{j-1}.\] Note that \(S' \subseteq \Gamma\) if and only if none of the elements in \(A_{j-1} \setminus \Gamma\) are sampled. Therefore, we have \[\mathbf{Pr}[S' \subseteq \Gamma] \leq (1 - \frac{1}{k_j})^{k_{j-1}} \leq \exp(-k_{j-1}/k_j) = \exp(-d^2\log^2 N) \leq N^{-d^2\log N}.\] We claim that if \(S'\) is on some proper sublattice of \(Z_{j-1}\), it must be also on some proper sublattice of \(Z_{j-1}\) generated by vectors in \([N]^{j-1}\). To see the claim, just consider \(\mathcal{L}(S')\). It is a proper sublattice of \(Z_{j-1}\) generated by vectors in \([N]^{j-1}\) and \(S'\) is on it. Since there are at most \(N^{(j-1)^2}\) lattices that can be generated by vectors in \([N]^{j-1}\), by union bound, we have \[\mathbf{Pr}[\text{S' \subseteq \Gamma for some \Gamma \subsetneq Z_{j-1}}] \leq N^{-d^2\log N} \cdot N^{(j-1)^2} \leq N^{-d^2\log N+d^2} \leq \frac{1}{8},\] which implies 24 . ◻

Claim 16. Suppose that \(S \subseteq \Gamma_j\) and \(\mathcal{L}(S') = Z_{j-1}\). In \(\widetilde{O}((n + \sqrt{N})\cdot \mathrm{poly}(j))\) time, we can compute a lattice \(\Gamma^*_j \subsetneq Z_j\) such that \(|A_j \setminus \Gamma^*_j| \leq k_j\).

Proof. Consider the lattice \(\mathcal{L}(S)\). Let \(\vb*{b}_1, \ldots, \vb*{b}_{j-1}, \vb*{b}_j\) be the basis of \(\mathcal{L}(S)\) in Hermite Normal Form. (Note that \(\vb*{b}_j\) can be \(\vb*{0}\) if \(\mathcal{L}(S)\) is of rank \(j-1\), but \(\vb*{b}_1, \ldots, \vb*{b}_{j-1}\) must be non-zero since \(\mathcal{L}(S') = Z_{j-1}\).) They can be obtained in \(\widetilde{O}(j^3n\log N)\) time via Lemma 1. Now consider the following multiset of integers. \[D := \{|\mathrm{det}(\vb*{b}_1, \ldots, \vb*{b}_{j-1}, \vb*{a})| : \vb*{a} \in A_j\}\] Note that \(\max(D) \leq \mathrm{det}(Z_j) \cdot \sqrt{j} N\) since \(\|\vb*{a}\|_{2} \leq \sqrt{j}N\). Moreover, all the integers in \(D\) are multiples of \(\mathrm{det}(Z_j)\) due to \(S \subseteq A_j \subseteq Z_j\). Since \(|A_j \setminus \Gamma_j| \leq k_j\) and \(S \subseteq \Gamma_j\), by Lemma 14, \(D\) contains at least \(n - k_j\) integers that are divided by \(q\cdot \mathrm{det}(Z_j)\) for some \(q > 1\). Such a \(q\) can be found in \(\widetilde{O}((n + \sqrt{N}) \cdot \mathrm{poly}(j))\) time by first dividing all the elements in \(D\) by \(\mathrm{det}(Z_j)\) and then applying Lemma 11. Let \[A^*_j := \{\text{\vb*{a} \in A_j : q \cdot \mathrm{det}(Z_j) divides \mathrm{det}(\vb*{b}_1, \ldots, \vb*{b}_{j-1}, \vb*{a})}\}.\] Note that \(|A^*_j| \geq n - k_j\). Let \(\Gamma^*_j := \mathcal{L}(A^*_j)\). We show that \(\Gamma^*\) is our target lattice.

It is easy to see that \(|A_j \setminus \Gamma^*_j| = |A_j| - |A^*_j| \leq k_j\). It remains to show that \(\Gamma^*_j \subsetneq Z_j\). Since \(A^*_j \subseteq A_j \subseteq Z_j\), we have \(\Gamma^*_j \subseteq Z_j\). If \(\Gamma^*_j\) is not full-dimensional, then it must be that \(\Gamma^*_j \neq Z_j\) since \(Z_j\) is full-dimensional; we are done. Suppose that \(\Gamma^*_j\) is full-dimensional. To show \(\Gamma^*_j \neq Z_j\), it suffices to show that \(\mathrm{det}(\Gamma^*_j) > \mathrm{det}(Z_j)\). Recall that \(\mathcal{L}(S') = Z_{j-1}\). It implies that the projections of \(\vb*{b}_1, \ldots, \vb*{b}_{j-1}\) on the \((j-1)\)-dimensional space form the basis of \(Z_{j-1}\). Since \(A^*_j \subseteq Z_j\), for any \(\vb*{a} \in A^*_j\), it can be represented as \[\vb*{a} = z_1\vb*{b}_1 + \cdots + z_{j-1}\vb*{b}_{j-1} + z_j \vb*{e}_j,\] and therefore, we have \(\mathrm{det}(\vb*{b}_1, \ldots, \vb*{b}_{j-1}, \vb*{a}) =z_j \cdot \mathrm{det}(Z_{j-1})\). By definition of \(A^*_j\), we have \(q\cdot \mathrm{det}(Z_{j})\) divides \(z_j \cdot \mathrm{det}(Z_{j-1})\). It implies that \(A^*_j\) is on the following lattice whose basis are \[\vb*{b}_1, \ldots ,\vb*{b}_{j-1}, \frac{q\cdot \mathrm{det}(Z_{j})}{\mathrm{det}(Z_{j-1})}\cdot \vb*{e}_j.\] The determinant of this lattice is at least \(q\cdot \mathrm{det}(Z_{j}) > \mathrm{det}(Z_{j})\). Recall that \(\Gamma^*_j = \mathcal{L}(A^*_j)\). It follows that \(\mathrm{det}(\Gamma^*_j) \geq q\cdot \mathrm{det}(Z_{j}) > \mathrm{det}(Z_{j})\). ◻

One can verify that the total time cost of the construction is \(\widetilde{O}((n + \sqrt{N}) \cdot \mathrm{poly}(d))\). We briefly explain how to reduce it to \(\widetilde{O}((n + d^d\tau) \cdot \mathrm{poly}(d))\). Basically, using a linear map \(B^{-1}\), where \(B\) represents a Mahler’s basis of \(Z\), one can map \(A\) to a set \(A'\) of integer vectors in \([-N' ,N']^d\), where \[N' = d^{2d}\cdot \frac{N^d}{\mathrm{det}(Z)} = (d^d\tau)^2.\] Then we apply the above procedure to \(A'\). The Mahler’s basis \(B\) can be computed in \(O(d^3n\log N)\) time and applying the above procedure to \(A'\) takes time \[\widetilde{O}((n + \sqrt{N'})\cdot \mathrm{poly}(d)) = \widetilde{O}((n + d^d\tau)\cdot \mathrm{poly}(d)). \qedhere\] ◻

5.2 Extracting Spread Subsets↩︎

Once we can compute almost common lattice, we are able to do the following: given an \(\widetilde{O}(1)\)-dense and \(\widetilde{O}(1)\)-nondegenerate set \(A \subseteq [N]^d\), extract a subset \(A^*\) that is \(\widetilde{O}(\sqrt{\ell})\)-dense, \(\widetilde{O}(\sqrt{\ell})\)-spread, and \(\widetilde{O}(\sqrt{\ell})\)-nondegenerate, where \(\ell: = \frac{\mathrm{det}(Z^*)}{\mathrm{det}(Z)}\) and \(Z^* := \mathcal{L}(A^*)\) and \(Z: = \mathcal{L}(A)\).

The approach is simple. If \(A\) is not spread, then there must be a proper sublattice \(\Gamma\) of \(\mathcal{L}(A)\) such that only a few vectors in \(A\) are not in \(\Gamma\). Then we remove those vectors not in \(\Gamma\). We repeat the procedure until the remaining vectors form a spread subset.

Lemma 13. Let \(A \subseteq [N]^d\) be a set of \(n\) vectors that is \(\rho\)-dense and \(\delta\)-nondegenerate, and let \(\gamma\) be a positive real. Let \(\tau := \sqrt{N^d/\mathrm{det}(Z)}\). Assume that \(\rho \geq \delta > 2(d\log N)^{4d}\cdot \gamma\). In \(\widetilde{O}((n + d^d\tau)\cdot \mathrm{poly}(d))\) time, with error probability at most \(N^{-\Omega(d)}\), we can compute a subset \(A^* \subseteq A\) that is \(\frac{\rho}{2}\sqrt{\ell}\)-dense, \(\gamma\sqrt{\ell}\)-spread, and \(\frac{\delta}{2}\sqrt{\ell}\)-nondegenerate, where \(\ell: = \frac{\mathrm{det}(Z^*)}{\mathrm{det}(Z)}\) and \(Z^* := \mathcal{L}(A^*)\) and \(Z: = \mathcal{L}(A)\).

Proof. Let \(k := \gamma \cdot \sqrt{N^d/\mathrm{det}(Z)}\). We shall construct a sequence \(A_0 \supsetneq A_1 \supsetneq \cdots \supsetneq A_r\) until \(Z_r := \mathcal{L}(A_r)\) is not full-dimensional or \(|A_r \setminus \Gamma| \geq k\) for any \(\Gamma \subsetneq Z_r\). Initially, \(i := 0\) and \(A_0 := A\). Given \(A_i\), we can check whether \(Z_i := \mathcal{L}(A_i)\) is full-dimensional or not in \(\widetilde{O}(d^3n\log N)\) time via Lemma 1. If not, then we stop and set \(r := i\). Suppose that \(Z_i\) is full-dimensional. Then we invoke Lemma 12 on \(A_i\) and \(k\), which takes \(\widetilde{O}((n + d^d\cdot \tau)\cdot \mathrm{poly}(d))\) time. If it asserts that \(|A_i \setminus \Gamma| \geq k\) for any \(\Gamma \subsetneq Z_i\), then we stop and set \(r := i\). Otherwise, it returns a \(\Gamma_i \subsetneq Z\) such that \[|A_i \setminus \Gamma_i| \leq k\cdot (d\log N)^{2d}.\] We set \(A_{i+1} := A_i \cap \Gamma_i\), and then proceed with \(i := i+1\).

We first show that \(r \leq 1 + d\log (dN)\). Suppose not. Note that \(Z_{r-1}\) must be full-dimensional. Observing that \(Z_{i} \subsetneq Z_{i-1}\) for all \(i\), we have \[\mathrm{det}(Z_{r-1}) \geq 2^{r-1} \cdot \mathrm{det}(Z_0) > (dN)^{d}.\] But this is impossible since \(Z_{r-1} = \mathcal{L}(A_{r-1})\) and the vectors in \(A_{r-1}\) have \(\ell_2\)-norm at most \(\sqrt{d} N\).

Note that \(|A_{i}| - |A_{i+1}| \leq k\cdot (d\log N)^{2d}\). We have \[|A_r| \geq |A| - rk\cdot (d\log N)^{2d} \geq |A| - k\cdot (d\log N)^{4d}.\] \(Z_r\) must be full-dimensional since \(A\) is \(\delta\)-nondegenerate and \(\delta > 2(d\log N)^{4d}\cdot \gamma\). By the stopping condition, it must be that \(|A_r \setminus \Gamma| \geq k\) for any \(\Gamma \subsetneq Z_r\). Note that \[k = \gamma \cdot \sqrt{N^d/\mathrm{det}(Z)} = \gamma \sqrt{\frac{\mathrm{det}(Z_r)}{\mathrm{det}(Z)}} \cdot \sqrt{\frac{N^d}{\mathrm{det}(Z_r)}}.\] So \(A_r\) is \(\gamma\sqrt{\frac{\mathrm{det}(Z_r)}{\mathrm{det}(Z)}}\)-spread. Also \(A_r\) is \(\frac{\rho}{2}\sqrt{\frac{\mathrm{det}(Z_r)}{\mathrm{det}(Z)}}\)-dense and \(\frac{\delta}{2}\sqrt{\frac{\mathrm{det}(Z_r)}{\mathrm{det}(Z)}}\)-nondegenerate, since \(A_r\) loses at most \(\frac{\delta}{2} \cdot \sqrt{N^d/ \mathrm{det}{Z}}\) elements when comparing to \(A\).

It is easy to verify that the total running time is \(\widetilde{O}((n + d^d\tau)\cdot \mathrm{poly}(d))\) time and the total error probability is at most \(N^{-\Omega(d)}\). ◻

5.3 Reducing to Modular Subset Sum↩︎

Using \(\frac{\rho}{2}\sqrt{\ell}\)-dense, \(\gamma\sqrt{\ell}\)-spread, and \(\frac{\delta}{2}\sqrt{\ell}\)-nondegenerate subset \(A^*\) obtained via Lemma 13, we show that we can obtain a lattice \(\Gamma\) so that deciding whether \(\vb*{t} \in \mathcal{S}(A)\) is equivalent to deciding whether \(\vb*{t} \in \mathcal{S}_{\Gamma}(A)\). That is, subset sum problem can be reduced to a modular subset sum problem, which can be solved efficiently via Lemma [lem:faster-modular-ss].

The lattice \(\Gamma\) is obtained via the following lemma, which heavily relies on Kneser’s theorem.

Lemma 14. Let \(A \in [N]^d\) be a set of \(n\) vectors, where \(Z: = \mathcal{L}(A)\) is full-dimensional. For any full-dimensional lattice \(Z^* \subseteq Z\), in \(\widetilde{O}((n + 2^d\ell) \cdot \mathrm{poly}(d))\) time, where \(\ell := \mathrm{det}(Z^*)/\mathrm{det}(Z)\), we can obtain a lattice \(\Gamma\) with \(Z^* \subseteq \Gamma \subseteq Z\) such that the following holds. \(A\) can be partitioned into \(R \cup G\) so that

  1. \(|R| \leq 2\ell\) and \(G \subseteq \Gamma\)

  2. for any \(\vb*{t}\) with \(\vb*{t} \bmod \Gamma \in \mathcal{S}_{\Gamma}(A)\), we have \(\vb*{t} \bmod Z^* \in \mathcal{S}_{Z^*}(R)\).

Proof. We shall derive a sequence of lattices \(\Gamma_0 \subsetneq \Gamma_1 \subsetneq \cdots \subsetneq \Gamma_r \subseteq Z\) as follows. Initially, \(i = 0\) and \(\Gamma_0 := Z^*\). Given \(\Gamma_i\), let \(\ell_i := \mathrm{det}(\Gamma_i)/\mathrm{det}(Z)\). If \(|A \setminus \Gamma_i| < \ell_i\), then we stop, let \(A_i := A \setminus \Gamma_i\), and let \(r := i\). Otherwise, \(A\) has at least \(\ell_i\) elements not in \(\Gamma_i\). Let them be \(\{\vb*{a}_1, \ldots, \vb*{a}_{\ell_i}\} =: A_i\). Note that \[|\{0, \vb*{a}_1\}| + \cdots + |\{0, \vb*{a}_{\ell_i}\}| \geq 2\ell_i.\] Also note that \(|\mathcal{S}_{\Gamma_i}(A_i)| \leq |Z \bmod \Gamma_i| \leq \mathrm{det}(\Gamma_i)/\mathrm{det}(Z) \leq \ell_i\). So by Corollary 2, there is a vector \(\vb*{h}_i \notin \Gamma_i\) such that \[\label{eq:fill-lattice} \vb*{h}_i + \mathcal{S}(A_i) \equiv \mathcal{S}(A_i) \pmod {\Gamma_i}.\tag{25}\] We set \(\Gamma_{i+1} := \Gamma_i + \mathcal{L}(\vb*{h}_i)\), and repeat the procedure with \(i := i+1\).

We first show that \(\Gamma_0 \subsetneq \Gamma_1 \subsetneq \cdots \subsetneq \Gamma_r \subseteq Z\). Since \(\vb*{h}_{i} \notin \Gamma_i\), by the construction of \(\Gamma_{i+1}\), it is easy to see that \(\Gamma_i \subsetneq \Gamma_{i+1}\). It remains to prove that \(\Gamma_i \subseteq Z\) for all \(i\). We prove this by induction on \(i\). The base case is trivial since \(\Gamma_0 = Z^* \subseteq Z\). Assume that \(\Gamma_i \subseteq Z\). We show that \(\Gamma_{i+1} \subseteq Z\). Since \(\vb*{0} \in \mathcal{S}(A_i)\), in view of 25 , \(\vb*{h}_i \in \mathcal{S}(A_i) + \Gamma_i\). Note that \(A_i \subseteq A \subseteq Z\), so \(\vb*{h}_i\in Z\), which implies \(\Gamma_{i+1} \subseteq Z\).

Since \(\mathrm{det}(\Gamma_i) \geq 2\mathrm{det}(\Gamma_{i-1})\) for all \(i \geq 1\), we have that \[r \leq \log \frac{\mathrm{det}(Z^*)}{\mathrm{det}(Z)} = \log \ell.\]

Let \(R := A_0 \cup \cdots \cup A_r\) and let \(\Gamma := \Gamma_r\). We show that \(R\) and \(\Gamma\) satisfy the stated property in the lemma. By construction, we have \(|A_i| \leq \mathrm{det}(\Gamma_i)/\mathrm{det}(Z)\). So \[|R| \leq (\mathrm{det}(\Gamma_0) + \cdots + \mathrm{det}(\Gamma_r))/\mathrm{det}(Z) \leq 2\mathrm{det}(Z^*)/\mathrm{det}(Z) = 2\ell.\] Also since \(A_r = A \setminus \Gamma_r\), we have \(A \setminus R \subseteq \Gamma_r\). Property (i) is satisfied.

It remains to show property (ii). We claim that \[\label{eq:reduce-1-key} \Gamma + \mathcal{S}(R) = \mathcal{S}(R) + Z^*.\tag{26}\] Suppose that the claim holds. Pick an arbitrary \(\vb*{t} \bmod \Gamma \in \mathcal{S}_{\Gamma}(A)\). Since \(G \subseteq \Gamma\), we have that \(\vb*{t} \bmod \Gamma \in \mathcal{S}_{\Gamma}(R)\). In other words, \(\vb*{t} \in \Gamma + \mathcal{S}(R)\). In view of 26 , we have \(\vb*{t} \in \mathcal{S}(R) + Z^*\), or equivalently, \(\vb*{t} \bmod Z^* \in \mathcal{S}_{Z^*}(R)\). So property (ii) holds.

Now we prove 26 . We shall prove, by induction on \(i\), that \(\Gamma_i + \mathcal{S}(R) = \mathcal{S}(R) + Z^*\) for all \(i = 0, \ldots, r\). The base case holds trivially, since \(\Gamma_0 = Z^*\). Suppose the equation holds for some \(i\). We show it also holds for \(i+1\). Recall that \(\Gamma_{i+1} = \Gamma_i + \mathcal{L}(\vb*{h}_i)\), where \(\vb*{h}_i\) satisfies \[\vb*{h}_i + \mathcal{S}(A_i) \equiv \mathcal{S}(A_i) \pmod {\Gamma_i},\] or in equivalent form, \[\vb*{h}_i + \Gamma_i + \mathcal{S}(A_i) = \mathcal{S}(A_i) + \Gamma_i.\] Therefore, \[\Gamma_{i+1} + \mathcal{S}(A_i) = \mathcal{S}(A_i) + \Gamma_i.\] Adding \(\mathcal{S}(R \setminus A_i)\) to both sides gives \[\Gamma_{i+1} + \mathcal{S}(R) = \mathcal{S}(R) + \Gamma_i.\] By the inductive hypothesis, we have \[\Gamma_{i+1} + \mathcal{S}(R) = \mathcal{S}(R) + Z^*.\]

We bound the time cost of the construction. There are at most \(\log \ell\) iterations. In the \(i\)-th iteration, we need to do the following.

  • Select elements of \(A\) that do not belong to \(\Gamma_i\), which takes \(O(d^2n)\) time via Lemma [lem:compute-rem](i).

  • Compute a non-zero \(\vb*{h}_i \in \mathrm{Sym}_{\Gamma}(\mathcal{S}(A_i))\), which takes \(\widetilde{O}((n + 2^d\ell) \cdot \mathrm{poly}(d))\) via Lemma [lem:faster-modular-ss].

  • Compute \(\Gamma_{i+1} := \Gamma_i + \mathcal{L}(\vb*{h}_i)\) via Lemma [lem:compute-rem](iii), which takes \(O(d^2\log \ell')\) time. Note that \(\ell' = \mathrm{det}(\Gamma_i) \leq \ell \mathrm{det}(Z) \leq \ell N^d\).

Therefore, the total time cost is \(\widetilde{O}((n + 2^d\ell) \cdot \mathrm{poly}(d))\). ◻

Next we show that using \(\Gamma\), we can reduce subset sum problem to modular subset sum problem.

Lemma 15. Let \(A \subseteq [N]^d\) be a set of vectors, and let \(A^*\) be a \(\rho\sqrt{\ell}\)-dense, \(\gamma\sqrt{\ell}\)-spread, and \(\delta\sqrt{\ell}\)-nondegenerate subset of \(A\), where \(\ell := \mathrm{det}(Z^*)/\mathrm{det}(Z)\), \(Z := \mathcal{L}(A)\) and \(Z^* := \mathcal{L}(A^*)\). Assume that \(N\) is sufficiently large and \[\rho \geq (d\log N)^{4d^2} \quad \text{and} \quad \rho\gamma \geq (d\log N)^{4d^2} \quad \text{and} \quad \rho\delta \geq (d\log N)^{15d^2}.\] Then in \(\widetilde{O}((n + 2^d \ell) \cdot \mathrm{poly}(d))\) time, we can obtain a lattice \(\Gamma\) with \(Z^* \subseteq \Gamma \subseteq Z\) such that the following holds. For every \[\vb*{t} \in (1- \varepsilon)\mathcal{P}(A) + \frac{\sigma(A)}{2},\] we have \[\vb*{t} \in \mathcal{S}(A) \text{ if and only if } \vb*{t} \bmod \Gamma \in \mathcal{S}_{\Gamma}(A),\] where \(\varepsilon := \frac{(d\log N)^{15d^2} }{\rho\delta}\).

Proof. We first apply Lemma 14 to \(A\) and \(Z^*\). It gives a lattice \(\Gamma\) with \(Z^* \subseteq \Gamma \subseteq Z\) and a partition \(R \cup G\) of \(A\) such that

  1. \(|R| \leq 2\ell\) and \(G \subseteq \Gamma\)

  2. for any \(\vb*{t}\) with \(\vb*{t} \bmod \Gamma \in \mathcal{S}_{\Gamma}(A)\), we have \(\vb*{t} \bmod Z^* \in \mathcal{S}_{Z^*}(R)\).

Note that \(\Gamma\) can be obtained in \(\widetilde{O}((n + 2^d \ell) \cdot \mathrm{poly}(d))\) time via Lemma 14. We shall show that \(\Gamma\) satisfies the stated property.

Let \(R^* := R \setminus A^*\) and \(G^* := G \setminus A^*\). Then \(A^* \cup R^* \cup G^*\) forms a partition of \(A\). Since \(A^* \subseteq Z^*\), it is easy to see that \(R^*\) and \(G^*\) also satisfy property (i) and (ii) of \(R\) and \(G\).

Let \(\varepsilon' := \frac{(d\log N)^{14d^2}}{\rho\delta}\).

Claim 17. \(2\mathcal{P}(R^*)\subseteq \varepsilon'\mathcal{P}(A^*)\) and \(\{x_1\vb*{e_1} + \cdots + x_d\vb*{e}_d: 0\leq x_j \leq dN\}\subseteq \varepsilon'\mathcal{P}(A^*)\).

Proof. Since \(A^*\) is \(\rho\sqrt{\ell}\)-dense and \(\delta\sqrt{\ell}\)-nondegenerate, by Corollary 4, we have \[\label{eq:struct-1-1} \mathcal{P}(A^*) \supseteq \left\{x_1\vb*{e}_1 + \cdots + x_d\vb*{e}_d : |x_j| \leq \frac{\rho\delta\ell N}{(d\log N)^{7d^2}}\right\}.\tag{27}\] Since \(|R^*| \leq 2\mathrm{det}(Z^*)/\mathrm{det}(Z) = 2\ell\), we have \[\mathcal{P}(R^*) \subseteq \left\{x_1\vb*{e}_1 + \cdots + x_d\vb*{e}_d : |x_j| \leq 2\ell N\right\}.\] Then the two inequalities in the lemma follow straightforwardly. ◻

Claim 18. For every \[\vb*{t} \in (1 - 2\varepsilon')\mathcal{P}(A^*) + \frac{\sigma(A^*)}{2},\] \(\vb*{t} \in \mathcal{S}(A^* \cup R^*)\) if and only if \(\vb*{t}\bmod \Gamma\in \mathcal{S}_{\Gamma}(A^* \cup R^*)\).

Proof. The only-if part is trivial. We prove the if part. Fix an arbitrary \(\vb*{t} \in (1 - 2\varepsilon')\mathcal{P}(A^*) + \frac{\sigma(A^*)}{2}\). Note that \(\vb*{t}\bmod \Gamma\in \mathcal{S}_{\Gamma}(A^* \cup R^*)\) implies that \(\vb*{t} \bmod \Gamma \in \mathcal{S}_{\Gamma}(A)\). Then by property (ii), we have that there exists \(\vb*{r} \in \mathcal{S}(R^*)\) such that \(\vb*{t} \equiv \vb*{r} \pmod {Z^*}\). Let \(\vb*{t'} = \vb*{t} - \vb*{r}\). To show \(\vb*{t} \in \mathcal{S}(A^* \cup R^*)\), it suffices to show that \(\vb*{t'} \in \mathcal{S}(A^*)\).

Since \(\vb*{t} \equiv \vb*{r} \pmod {Z^*}\), we have \(\vb*{t}' \in Z^*\). In view of Claim 17, we have \(\vb*{r} \in \mathcal{S}(R^*) \subseteq 2\mathcal{P}(R^*) \subseteq \varepsilon' \mathcal{P}(A^*)\). By Lemma 3(i), we have \[\vb*{t}' \in \left((1 - \varepsilon')\mathcal{P}(A^*) + \frac{\sigma(A^*)}{2}\right).\] Recall that \(A^*\) is \(\rho\sqrt{\ell}\)-dense, \(\gamma\sqrt{\ell}\)-spread, and \(\delta\sqrt{\ell}\)-nondegenerate. By Theorem 12, we have \(\vb*{t}' \in \mathcal{S}(A^*)\). ◻

Claim 19. For any \[\vb*{t} \in (1 - 3\varepsilon')\mathcal{P}(A^* \cup G^*) + \frac{\sigma(A^* \cup G^*)}{2},\] \(\vb*{t} \in \mathcal{S}(A)\) if and only if \(\vb*{t} \bmod \Gamma \in \mathcal{S}_{\Gamma}(A)\).

Proof. The only-if part is trivial. We prove the if part.

Take an arbitrary \(\vb*{t} \in (1 - 3\varepsilon')\mathcal{P}(A^* \cup G^*) + \frac{\sigma(A^* \cup G)}{2}\) with \(\vb*{t} \bmod \Gamma \in \mathcal{S}_{\Gamma}(A)\). The vector \(\vb*{t}\) can be written as \(\vb*{t} = \vb*{t}_{A^*} + \vb*{t}_{G^*}\) where \(\vb*{t}_{A^*} \in (1 - 3\varepsilon')\mathcal{P}(A^*) + \frac{\sigma(A^*)}{2}\) and \(\vb*{t}_{G^*} \in (1 - 3\varepsilon')\mathcal{P}(G^*) + \frac{\sigma(G^*)}{2}\). By Lemma 8, there is \(\vb*{t}'_{G^*} \in \mathcal{S}(G^*)\) such that \[\label{eq:struct-3-1} \vb*{t}_{G^*} - \vb*{t}'_{G^*} \in \{x_1\vb*{e}_1 + \cdots + x_d\vb*{e}_d : 0 \leq x_i \leq dN\}.\tag{28}\]

Now consider \(\vb*{t} - \vb*{t}'_{G^*} = \vb*{t}_{A^*} + \vb*{t}_{G^*} - \vb*{t}'_{G^*}\). To prove the claim, it suffices to show \(\vb*{t} - \vb*{t}'_{G^*} \in \mathcal{S}(A^* \cup R^*)\). In view of Claim 17 and 28 , we have \(\vb*{t}_{G^*} - \vb*{t}'_{G^*} \in \varepsilon' \mathcal{P}(A^*)\). By Lemma 3(i), \[\vb*{t}_{A^*} + \vb*{t}_{G^*} - \vb*{t}'_{G^*} \in (1 - 2\varepsilon')\mathcal{P}(A^*) + \frac{\sigma(A^*)}{2},\] or equivalently, \[\label{eq:struct-3-2} \vb*{t} - \vb*{t}'_{G^*} \in (1 - 2\varepsilon')\mathcal{P}(A^*) + \frac{\sigma(A^*)}{2}.\tag{29}\] Recall that \(G^* \subseteq \Gamma\). So \(\vb*{t} - \vb*{t}'_{G^*} \equiv \vb*{t} \pmod {\Gamma}.\) Since \(\vb*{t} \bmod \Gamma \in \mathcal{S}_{\Gamma}(A)\), we have \[(\vb*{t} - \vb*{t}'_{G^*}) \bmod \Gamma \in \mathcal{S}_{\Gamma}(A) = \mathcal{S}_{\Gamma}(A^* \cup R^*).\] The last equality is follow from \(G^* \subseteq \Gamma\). Then by Claim 18 and 29 , \[\vb*{t} - \vb*{t}'_{G^*} \in \mathcal{S}(A^* \cup R^*). \qedhere\] ◻

Note that \(5\varepsilon' \leq \varepsilon\). Given Claim 19, to prove the theorem, it suffices to show that \[(1 - 5\varepsilon')\mathcal{P}(A) + \frac{\sigma(A)}{2} \subseteq (1 - 3\varepsilon')\mathcal{P}(A^* \cup G^*) + \frac{\sigma(A^* \cup G^*)}{2},\] or equivalently, \[\label{eq:struct-4-1} (1 - 5\varepsilon')\mathcal{P}(A) + \frac{\sigma(R^*)}{2} \subseteq (1 - 3\varepsilon')\mathcal{P}(A^* \cup G^*).\tag{30}\] Recall Claim 17. Since \(\frac{\sigma(R^*)}{2} \in \mathcal{P}(R^*) \subseteq \varepsilon' \mathcal{P}(A^*) \subseteq \varepsilon' \mathcal{P}(A)\), by Lemma 3(ii), we have \[(1 - 5\varepsilon')\mathcal{P}(A) + \frac{\sigma(R^*)}{2} \subseteq (1 - 4\varepsilon')\mathcal{P}(A).\] Note that \((1 - 4\varepsilon')\mathcal{P}(A) = (1 - 4\varepsilon')P(A^* \cup G^*) + (1 - 4\varepsilon')\mathcal{P}(R^*)\) and that \(\mathcal{P}(R^*) \subseteq \varepsilon \mathcal{P}(A^*)\subseteq \varepsilon \mathcal{P}(A^* \cup G)\). Again, by Lemma 3(ii), we have \[(1 - 4\varepsilon')\mathcal{P}(A) \subseteq (1 - 3\varepsilon')P(A^* \cup G^*).\] So Inequality 30 follows. ◻

5.4 Putting Things Together↩︎

Now we are ready to present a near-linear-time algorithm for dense subset sum in multi-dimension.

Theorem 20. Let \(A \subseteq [N]^d\) be a set of \(n\) vectors that is \(\rho\)-dense and \(\delta\)-nondegenerate, where \(N\) is sufficiently large, \(\rho \geq \delta\), and \[\rho \geq (d\log N)^{5d^2}\quad \text{and} \quad \rho\delta \geq (d\log N)^{16d^2}.\] Then for any \[\vb*{t} \in \left((1- \varepsilon)\mathcal{P}(A) + \frac{\sigma(A)}{2}\right)\] where \(\varepsilon: = \frac{(d\log N)^{16d^2}}{\rho\delta}\), in \(\widetilde{O}(n \cdot d^{d}\cdot \mathrm{poly}(d))\) time, with error probability at most \(N^{-\Omega(d)}\), we can decide whether \(\vb*{t} \in \mathcal{S}(A)\) or not.

Proof. Let \(Z := \mathcal{L}(A)\). Let \(\tau := \sqrt{N^d/\mathrm{det}(Z)}\). Since \(A\) is \(\rho\)-dense, we have that \(n \geq \rho\tau\).

Let \(\gamma : = (d\log N)^{4d^2}/\rho\). By Lemma 13, in \(\widetilde{O}((n + d^d \tau)\cdot \mathrm{poly}(d))\) time, with error probability at most \(N^{-\Omega(d)}\), we can obtain a subset \(A^*\) that is \(\frac{\rho}{2}\sqrt{\ell}\)-dense and \(\gamma \sqrt{\ell}\)-spread, and \(\frac{\delta}{2}\sqrt{\ell}\)-nondegenerate, where \(\ell :=\frac{\mathrm{det}(Z^*)}{\mathrm{det}(Z)}\) and \(Z^* := \mathcal{L}(A^*)\).

Then we apply Lemma 15 to obtain a lattice \(\Gamma\) such that for every \(\vb*{t} \in (1- \varepsilon)\mathcal{P}(A) + \frac{\sigma(A)}{2},\) \[\vb*{t} \in \mathcal{S}(A) \text{ if and only if } \vb*{t} \bmod \Gamma \in \mathcal{S}_{\Gamma}(A),\] where \[\varepsilon = \frac{4(d\log N)^{15d^2} \ell}{\rho\delta \ell} \leq \frac{(d\log N)^{16d^2}}{\rho\delta}.\] The time cost of Lemma 15 is \(O((n + 2^d \ell) \cdot \mathrm{poly}(d)).\) Note that \(|A^*| \geq |A|/2 \geq \sqrt{N^d/\mathrm{det}(Z)}\). Therefore, \[\mathrm{det}(Z^*) \leq \frac{2^d N^d}{|A^*|} \leq 2^d\sqrt{N^d\cdot \mathrm{det}(Z)},\] which implies \(\ell \leq 2^d n\). So the time cost of this step is \(\widetilde{O}(n\cdot 2^{2d}\cdot \mathrm{poly}(d))\).

Then to decide whether \(\vb*{t} \in \mathcal{S}(A)\), it suffices to decide whether \(\vb*{t} \bmod \Gamma \in \mathcal{S}_{\Gamma}(A)\), this can be done in \(\widetilde{O}((n + 2^d\ell') \cdot \mathrm{poly}(d))\) time via Lemma [lem:faster-modular-ss], where \(\ell' := \mathrm{det}(\Gamma)/\mathrm{det}(Z)\). Note that \(\mathrm{det}(\Gamma) \leq \mathrm{det}(Z^*)\) since \(Z^* \subseteq \Gamma\). So \(\ell' \leq \ell \leq 2^d n\). The running time of this step is bounded by \(\widetilde{O}(n\cdot d^{d}\cdot \mathrm{poly}(d))\). ◻

6 Extending to More General Cases↩︎

Section 34, and 5 deal with only the case where \(A\) is a set and \(A \subseteq [N]^d\). We shall briefly explain how to extend Theorem 10, Theorem 12, and Theorem 20 to a more general case where \(A\) is a multiset of vectors from \([-N_1, N_1] \times [-N_2, N_2] \times \cdots \times [-N_d, N_d]\).

We first extend to a set \(A \subseteq [N_1] \times \cdots \times [N_d]\). Let \(\Phi = \prod_{j=1}^d N_j\). Let \(D\) be the \(d\times d\) diagonal matrix where \(d_{jj} = \Phi/N_j\) for \(j \in \{1, \ldots, d\}\). In other words, \(D\) is a linear map that stretches the \(j\)th-coordinate by a factor of \(\Phi/N_j\) for each \(j\). Now consider \(A' := DA\). It is easy to see that \(A' \in [\Phi]^d\). Recall Definition [def:dense-and-spread]. One can verify that the linear map \(D\) does not change the value of \(\tau\), and therefore, preserves the denseness, the spreadness, and the nondegeneracy of \(A\). To extend Theorem 12, and Theorem 20, we can simply apply them to \(A'\) and then map the results back to the original space by left-multiplying \(D^{-1}\). Extending Theorem 10 is a bit different: we will apply Lemma 6 to \(A'\), map the result back to the original space by left-multiplying \(D^{-1}\), and then apply Lemma 7.

We further consider a set \(A \subseteq [-N_1, N_1] \times \cdots \times [-N_d, N_d]\). We claim that allowing \(A\) to contain negative integers only affects the terms in the original theorems by a factor of \(2^d\).

Finally, we consider the case of multisets. We claim that it suffices to extend Definition [def:dense-and-spread] to multisets. Let \(A\) be a multiset of vectors. For a vector in \(A\), we define its multiplicity to be the number of its occurrences in \(A\), and we define \(\mu(A)\) to be the largest multiplicity of any vector in \(A\).

Definition 5 (Density, Spreadness, Nondegeneracy for Multi-sets). Let \(A \subseteq [-N_1, N_1]\times \cdots \times [-N_d, N_d]\) be a multiset of vectors. Let \(\Phi := \prod_{j=1}^d N_j\). Let \(\mu:= \mu(A)\). Let \(\tau := \sqrt{\frac{\mu\Phi}{\mathrm{det}(Z)}}\), where \(Z := \mathcal{L}(A)\).

  • We say that \(A\) is \(\rho\)-dense if \(|A| \geq \rho \tau\);

  • We say that \(A\) is \(\gamma\)-spread if \(|A \setminus \Lambda| \geq \gamma\tau\) for any lattice \(\Lambda \subsetneq Z\).

  • We say that \(A\) is \(\delta\)-nondegenerate if \(|A \setminus \mathcal{V}| \geq \delta\tau\) for any lower dimensional subspace \(\mathcal{V} \subseteq \mathbb{R}^d\).

We summarize this section by the extended version of Theorem 10, Theorem 12, and Theorem 20.

Theorem 21. There exists a constant \(C_0\) such that the following holds. Let \(A\) be a multiset of vectors from \([-N_1, N_1] \times \cdots \times [-N_d, N_d]\) that is \(\rho\)-dense, \(\gamma\)-spread, and \(\delta\)-nondegenerate. Assume that \(\Phi := \prod_{j=1}^d N_j\) is sufficiently large and that \[\rho \geq (d\log \Phi)^{C_0d^2}\quad \text{and} \quad \rho\gamma \geq (d\log \Phi)^{C_0d^2} \quad \text{and} \quad \rho\delta \geq (d\log \Phi)^{C_0 d^2}\mathrm{det}(Z).\] Then \[\mathcal{S}(A) \supseteq \vb*{v}_0 + \{z_1\cdot \mathrm{det}(Z)\vb*{e}_1 + \cdots + z_d\cdot \mathrm{det}(Z)\vb*{e}_d : 0 \leq z_j \leq N_j, z_j\in \mathbb{Z}\},\] where \(Z := \mathcal{L}(A)\) and \(\vb*{v}_0 \in Z\).

Theorem 22. There exists a constant \(C_0\) such that the following holds. Let \(A\) be a multiset of vectors from \([-N_1, N_1] \times \cdots \times [-N_d, N_d]\) that is \(\rho\)-dense, \(\gamma\)-spread, and \(\delta\)-nondegenerate. Assume that \(\Phi := \prod_{j=1}^d N_j\) is sufficiently large and that \[\rho \geq (d\log \Phi)^{C_0d^2}\quad \text{and} \quad \rho\gamma \geq (d\log \Phi)^{C_0d^2} \quad \text{and} \quad \rho\delta \geq (d\log \Phi)^{C_0d^2}.\] Then \[Z \cap \left((1 - \varepsilon) \mathcal{P}(A) + \frac{\sigma(A)}{2}\right) \subseteq \mathcal{S}(A) \subseteq Z \cap \left(\mathcal{P}(A) + \frac{\sigma(A)}{2}\right),\] where \(Z := \mathcal{L}(A)\) and \(\varepsilon := \frac{(d\log \Phi)^{C_0d^2}}{\rho\delta}\).

Theorem 23. There exists a constant \(C_0\) such that the following holds. Let \(A\) be a multiset of vectors from \([-N_1, N_1] \times \cdots \times [-N_d, N_d]\) that is \(\rho\)-dense and \(\delta\)-nondegenerate, where \(\Phi := \prod_{j=1}^d N_j\) is sufficiently large and \[\rho \geq (d\log \Phi)^{C_0d^2}\quad \text{and} \quad \rho\delta \geq (d\log \Phi)^{C_0d^2}.\] Then for any \[\vb*{t} \in \left((1- \varepsilon)\mathcal{P}(A) + \frac{\sigma(A)}{2}\right)\] where \(\varepsilon: = \frac{(d\log \Phi)^{C_0d^2}}{\rho\delta}\), in \(\widetilde{O}(n \cdot d^{d}\cdot \mathrm{poly}(d))\) time, with error probability at most \(\Phi^{-\Omega(d)}\), we can decide whether \(\vb*{t} \in \mathcal{S}(A)\) or not.

7 Generating Disjoint Subsets with Equal Sum↩︎

We shall prove Lemma [lem:hd-es-petals], which can be regarded as a generalization of the following theorem by Erdős and Sárközy.

Theorem 24 ([54]). Let \(A\) be a multiset of integers from \([N]\), where \(N\) is sufficiently large. Then there exists at least \(\frac{|A|}{18(\log N)^2}\) disjoint subsets of \(A\) such that \(1\leq |A_1| = \cdots = |A_m| \leq \log N\) and \(\sigma(A_1) = \cdots = \sigma(A_m)\).

To generalize the above theorem to multi-dimension, the rough idea is to iteratively apply Theorem 24 to each dimension.

Proof. We prove the lemma by induction on \(d\). When \(d = 1\), the lemma holds by Theorem 24. Now assume that the lemma holds for all sets \(A \subseteq [N]^{d}\). We show that it also holds for all sets \(A \subseteq [N]^{d+1}\).

Let \(A\) be a multiset of vectors from \([N]^{d+1}\). We ignore the \((d+1)\)-th dimension, regard the vectors in \(A\) as \(d\)-dimensional vectors, and apply the inductive hypothesis. This gives at least \(|A|/(d\log N)^{3d}\) disjoint subsets \(A_1, \ldots, A_{g}\) of \(A\) such that \(\sigma(A_1), \ldots, \sigma(A_{g})\) have the same \(j\)-th coordinates for each \(j \in \{1, \ldots, d\}\) and that \(1 \leq |A_1| = \cdots = |A_g| \leq h\), where \(h := (d\log N)^{2d}\).

Let \(\vb*{b}_i = \sigma(A_i)\) for \(i \in \{1, \ldots, g\}\). Let \(B = \{\vb*{b}_1, \ldots, \vb*{b}_{g}\}\). Note that the vectors in \(B\) only differ in the \((d+1)\)-th coordinate, and their \((d+1)\)-th coordinates are in \([0, hN]\). Consider only the \((d+1)\)-th coordinate of \(B\) and apply Theorem 24. We can obtain at least \(\frac{|B|}{18(\log hN)^2}\) subsets \(B_1, \ldots, B_{g'}\) such that the \((d+1)\)-th coordinates of \(\sigma(B_1), \ldots, \sigma(B_{g'})\) are the same and that \(1 \leq |B_1| = \cdots = |B_{g'}| \leq h'\), where \(h' := \log(hN)\).

Since \(|B_1| = \cdots = |B_{g'}|\) and the vectors in \(B\) have the same \(j\)-th coordinate \(j \in \{1, \ldots, d\}\), we have that \(\sigma(B_1), \ldots, \sigma(B_{g'})\) also have the same \(j\)-th-coordinate for \(j \in \{1, \ldots, d\}\). Therefore, \[\sigma(B_1) = \cdots = \sigma(B_{g'}).\] It is easy to see that \(B_1, \ldots, B_{g'}\) corresponds to \(g'\) disjoint subsets of \(A\) which have the same sum and the same cardinality. Moreover, the cardinality of these subsets of \(A\) is at most \(hh'\). It remains to bound \(hh'\) and \(g'\). Since \(N\) is sufficiently large, we have \[\log(hN) = (2d\log d + 2d\log\log N + \log N) \leq (d\log N)^{1.1}.\] Then we have \[\begin{align} hh' &= h \log (hN) \leq (d\log N)^{2d} \cdot (d\log N)^{1.1} \leq ((d+1)\log N)^{2d+2}. \end{align}\] The last inequality is due to that \(N\) is sufficiently large. We also have that \[g' \geq \frac{g}{18(\log hN)^2} \geq \frac{|A|}{(d\log N)^{3d}}\cdot \frac{1}{18(d\log N)^{2.2}} \geq \frac{|A|}{((d+1)\log N)^{3d+3}}.\] This completes the inductive step. ◻

8 Generating Remainders↩︎

We shall prove Lemma [lem:gen-rem-dense]. The following lemma explains how we will use a non-zero vector \(\vb*{h}\) in \(\mathrm{Sym}_{\Gamma}(\mathcal{S}(A))\). Basically, instead of discussing \(\mathcal{S}_{\Gamma}(A)\), we can discuss \(\mathcal{S}_{\Gamma'}(A)\), where \(\Gamma' := \Gamma + \mathcal{L}(h)\). Note that \(\Gamma' \supsetneq \Gamma\), and therefore \(\mathrm{det}(\Gamma') \leq \mathrm{det}(\Gamma)/2\). So such a \(\vb*{h}\) helps us to reduce to a lattice with smaller determinant.

Lemma 16. Let \(A \subseteq \mathbb{Z}^d\) be a set of vectors. Let \(\Gamma\) be a full-dimensional lattice. Let \(\vb*{h}\) be a vector such that \(\vb*{h} + \mathcal{S}(A) \equiv \mathcal{S}(A) \pmod \Gamma\). Then we have that \[\mathcal{S}_{\Gamma}(A) = (\mathcal{S}_{\Gamma'}(A) + \Gamma') \bmod \Gamma,\] where \(\Gamma' := \Gamma + \mathcal{L}(\vb*{h})\).

Proof. Since \(\vb*{h} + \mathcal{S}(A) \equiv \mathcal{S}(A) \pmod \Gamma\), we have \[\mathcal{L}(\vb*{h}) + \mathcal{S}(A) \equiv \mathcal{S}(A) \pmod \Gamma,\] or in equivalent form, \[\Gamma + \mathcal{L}(\vb*{h}) + \mathcal{S}(A) \equiv \mathcal{S}(A) \pmod \Gamma.\] Note that \(\Gamma + \mathcal{L}(\vb*{h}) = \Gamma'\) and that \(\Gamma' + \mathcal{S}_{\Gamma'}(A) = \Gamma' + \mathcal{S}(A)\). Therefore, \[\Gamma' + \mathcal{S}_{\Gamma'}(A) \equiv \mathcal{S}(A) \pmod \Gamma. \qedhere\] ◻

The following lemma is a consequence of Kneser’s theorem and Lemma 16. Assuming \(Z = \mathbb{Z}^d\) for simplicity, it states that to generate all the remainders modulo a lattice \(\Gamma\), we need roughly \(O(\mathrm{det}(\Gamma))\) vectors.

Lemma 17. Let \(A\) be a set of vectors from \(\mathbb{Z}^d\), where \(Z:=\mathcal{L}(A)\) is full-dimensional. Let \(\Gamma \subseteq Z\) be a full-dimensional lattice, and let \(\ell := \mathrm{det}(\Gamma)/\mathrm{det}(Z)\). If \(|A \setminus \Lambda| \geq \ell\) for any lattice \(\Gamma \subseteq \Lambda \subsetneq Z\), then \(A\) contains a subset \(R\) of at most \(2\ell\) vectors such that \(\mathcal{S}_{\Gamma}(R) = Z \bmod \Gamma\).

Proof. Note that \(\ell\) must be a positive integer since \(\Gamma \subseteq Z\) and \(\Gamma\) is full-dimensional. We prove by induction on \(\ell\). When \(\ell = 1\), we have that \(\Gamma = Z\), and the lemma holds trivially. Suppose that the lemma holds for all \(\ell\) with \(\ell \leq k\) for some \(k \geq 1\). We show that it also holds when \(\ell = k+1\).

Since \(\ell = k+1 > 1\), it must be that \(\Gamma \subsetneq Z\). Therefore, \(A\) contains at least \(\ell\) vectors not belonging to \(\Gamma\). Let \(R_1 = \{\vb*{a}_1, \ldots, \vb*{a}_{\ell}\}\) be a set of \(\ell\) such vectors. It is easy to see that \[|\{0, \vb*{a}_1\}| + \cdots + |\{0, \vb*{a}_{\ell}\}| = 2\ell \geq |\mathcal{S}_{\Gamma}(R_1)| + \ell.\] The last inequality is due to that \(|\mathcal{S}_{\Gamma}(R_1)| \leq |Z \bmod \Gamma| = \ell\). By Corollary 2, there is a vector \(\vb*{h} \notin \Gamma\) such that \[\label{eq:gen-rem-std-1} \vb*{h} + \mathcal{S}(R_1) \equiv \mathcal{S}(R_1) \pmod {\Gamma}.\tag{31}\]

Let \(\Gamma' := \Gamma + \mathcal{L}(\vb*{h})\) and \(\ell' := \mathrm{det}(\Gamma')/\mathrm{det}(Z)\). We show that the inductive hypothesis is applicable to \(\Gamma'\). Since \(\vb*{0} \in \mathcal{S}(R_1)\), Equation 31 implies that \(\vb*{h} \in \mathcal{S}(R_1) + \Gamma\). Since \(R_1 \subseteq Z\) and \(\Gamma \subseteq Z\), we have \(\vb*{h} \in Z\), and therefore, \(\Gamma' \subseteq Z\). Since \(\vb*{h} \notin \Gamma\), we have \(\Gamma \subsetneq \Gamma'\). So \(\ell' \leq \ell/2 \leq k\). Also, for any \(\Lambda\) with \(\Gamma' \subseteq \Lambda \subsetneq Z\), we have \(\Gamma \subseteq \Lambda\), and therefore, \[|A \setminus \Lambda| \geq \ell > \ell'.\] By the inductive hypothesis, \(A\) contains a subset \(R_2\) of at most \(2\ell' \leq \ell\) vectors such that \[\label{eq:gen-rem-std-2} \mathcal{S}_{\Gamma'}(R_2) = Z \bmod \Gamma'.\tag{32}\]

Let \(R = R_1 \cup R_2\). Clearly, \(|R| \leq |R_1| + |R_2| \leq 2\ell\). It remains to show that \(\mathcal{S}_{\Gamma}(R) = Z \bmod \Gamma\). Equation 31 implies that \(\vb*{h} + \mathcal{S}(R) \equiv \mathcal{S}(R) \pmod {\Gamma},\) and Equation 32 implies that \(\mathcal{S}_{\Gamma'}(R) = Z \bmod \Gamma'\). By Lemma 16, we have \(\mathcal{S}_{\Gamma}(R) = Z \bmod \Gamma\). ◻

The above lemma is the best one can do in general. But in the dense case where \(|A|\) contains lots of distinct remainders modulo \(\Gamma\), one can do much better. We will show that in the dense case, we only need \(O(\frac{\mathrm{det}(\Gamma)}{|A|})\) to generate all the remainders modulo \(\Gamma\). To do that, we need the following densification technique by Szemerédi and Vu [55]. Using this technique, we can create a set of cardinality \(|A|\) using roughly \(\log |A|\) vectors from \(A\). Repeating the process, we can obtain roughly \(|A|/\log |A|\) sets of cardinality \(|A|\), and therefore, increase the total cardinality from \(|A|\) to roughly \(|A|^2\). As a consequence, Kneser’s theorem (more precisely, Corollary 2) can be applied to these sets, even when \(|A|\) is not large enough.

Lemma 18 (Implied by Lemma 7.9 in [55]). Let \(A \subseteq \mathbb{Z}^d\) be a finite set of vectors where \(|A|\) is sufficiently large. Then \(A\) contains a subset \(A'\) of at most \(20 \log |A|\) vectors such that \(|\mathcal{S}(A')| > |A|\).

We generalize their technique to the finite group \(\mathbb{Z}^d_{\Gamma}\).

Lemma 19. Let \(\Gamma \subseteq \mathbb{Z}^d\) be a full-dimensional lattice. Let \(A \subseteq \mathbb{Z}^d_\Gamma\) be a set of vectors where \(|A|\) is sufficiently large. Then \(A\) contains a subset \(A'\) of at most \(20 \log |A|\) vectors such that \[|\mathcal{S}_{\Gamma}(A')| > \frac{|A|}{20^{d}(\log |A|)^d}.\]

Proof. By Lemma 18, \(A\) contains a subset \(A'\) of at most \(20 \log |A|\) vectors such that \(|\mathcal{S}(A')| > |A|\). To prove the lemma, it suffices to show that \[|\mathcal{S}_{\Gamma}(A')| \geq \frac{|\mathcal{S}(A')|}{20^{d}(\log |A|)^d}.\] Let \(k := \lfloor 20\log |A| \rfloor\). Since \(A' \subseteq A \subseteq \mathbb{Z}^d_\Gamma\) and \(|A'| \leq k\), we have that \(\mathcal{S}(A') \subseteq k\mathbb{Z}^d_{\Gamma}.\) Therefore, each congruent class (modulo \(\Gamma\)) of \(\mathcal{S}(A')\) contains at most \(k^d\) vectors from \(\mathcal{S}(A')\). This implies that \[|\mathcal{S}_{\Gamma}(A')| \geq \frac{|\mathcal{S}(A')|}{k^d} \geq \frac{|\mathcal{S}(A')|}{20^{d}(\log |A|)^d}. \qedhere\] ◻

Lemma 20. Let \(\Gamma \subseteq \mathbb{Z}^d\) be a full-dimensional lattice. Let \(A \subseteq \mathbb{Z}^d_\Gamma\) be a set of vectors where \(|A|\) is sufficiently large. For any \(\ell\) with \(|A| \leq \ell \leq |A|^2/(\log |A|)^{3d}\), \(A\) contains disjoint subsets \(A_1, \ldots, A_m\) of at most \(\frac{\ell}{2|A|}(\log |A|)^{3d}\) vectors in total such that \[\label{eq:lemdensify-0} \sum_{i=1}^m |\mathcal{S}_{\Gamma}(A_i)| \geq \ell + m.\qquad{(4)}\]

Proof. We iteratively extract subsets \(A_1, \ldots, A_m\) from \(A\) as follows. Initially, \(m := 0\) and every vector in \(A\) is unmarked. If \(A\) contains fewer than \(|A|/2\) unmarked vectors or ?? is satisfied, then we stop. Otherwise, we pick any \(|A|/2\) unmarked vectors, apply Lemma 19 to them, and let \(A_{m+1}\) be the resulting subset. Then we mark all the vectors in \(A_{m+1}\) and repeat with \(m := m+1\).

It is easy to see that \(A_1, \ldots, A_m\) are disjoint. It remains to bound their total size and show that ?? holds. By Lemma 19, we have \[\label{eq:lemdensify-1} |A_i| \leq 20 \log (|A|/2) \leq 20 \log |A|\tag{33}\] and \[\label{eq:lemdensify-2} |\mathcal{S}(A_i)| \geq \frac{|A|}{2 \cdot 20^d (\log |A|)^d} \geq \frac{80|A|}{(\log |A|)^{2d}} + 1.\tag{34}\] The last inequality is due to that \(|A|\) is sufficiently large. In view of 34 , when the construction of \(A_1, \ldots, A_m\) terminates, we have \[\label{eq:lemdensify-3} m \leq \left\lceil \frac{\ell}{80|A|}(\log |A|)^{2d} \right\rceil \leq \frac{\ell}{40|A|}(\log |A|)^{2d}.\tag{35}\] In view of 33 and 35 , we have \[\label{eq:lemdensify-4} \sum_{i=1}^m |A_i| \leq 20 \log |A| \cdot \frac{\ell}{40|A|}(\log |A|)^{2d} = \frac{\ell}{2|A|}(\log |A|)^{3d}.\tag{36}\] Recall that \(\ell \leq |A|^2/(\log |A|)^{3d}\). Inequality 36 implies that \(|A|\) always has at least \(|A|/2\) unmarked elements during the construction of \(A_1, \ldots, A_m\). Therefore, ?? must hold when the construction terminates. ◻

Now we are ready to prove Lemma [lem:gen-rem-dense].

Proof. We prove a stronger lemma in which the bound on \(|R|\) is replaced by \(\frac{c\mu\ell}{|A'|}(\log (\mu\ell))^{3d}\log \ell\).

Let \(c\) be a sufficiently large constant. Note that \(\ell\) must be a positive integer since \(\Gamma \subseteq Z\) and \(\Gamma\) is full-dimensional. We prove by induction on \(\ell\). When \(\ell = 1\), we have that \(\Gamma = Z\), and the lemma holds trivially. Suppose that the lemma holds for all \(\ell\) with \(\ell \leq k\) for some \(k \geq 1\). We show that it also holds when \(\ell = k+1\).

If \(c \mu > |A'|\), the lemma follows straightforwardly by Lemma 17. Assume that \(c\mu \leq |A'|\).

Claim 25. \(A'\) contains a subset \(R_1\) of at most \(\frac{16\mu\ell}{|A'|}(\log (\mu\ell))^{3d}\) elements for which there exists a vector \(\vb*{h} \notin \Gamma\) such that \[\label{eq:gen-rem-dense-1} \vb*{h} + \mathcal{S}(R_1) \equiv \mathcal{S}(R_1) \pmod \Gamma.\qquad{(5)}\]

Proof. Let \(n : = |A'|\). We construct \(\mu\) disjoint subsets \(A_1, \ldots, A_{\mu}\) of \(A'\) such that \(|A_i| = |A_i \bmod \Gamma| = \lceil \frac{n}{4\mu} \rceil\) for each \(i\) as follows. Initially, all elements in \(A'\) are unmarked. For \(i = 1, \ldots, \mu\), find \(\lceil \frac{n}{4\mu}\rceil\) unmarked elements in \(A'\) that are not congruent to each other, mark them and put them into \(A_i\). We show that the construction always succeeds. Recall that \(c\mu\leq n\). Each \(A_i\) contains \(\lceil \frac{n}{4\mu}\rceil \leq \frac{n}{2\mu}\) elements. Therefore, at the beginning of each round, we have at least \(\frac{n}{2}\) unmarked elements. By the definition of \(\mu\), there are at least \(\frac{n}{2\mu} \geq \lceil \frac{n}{4\mu}\rceil\) unmarked elements not congruent to each other. Note that each \(A_i\) has cardinality \(\lceil \frac{n}{4\mu}\rceil \geq \frac{n}{4\mu} \geq \frac{c}{4}\). Thus, \(|A_i|\) is sufficiently large, and Lemma 20 is applicable to \(A_i\) (in fact, \(A_i \bmod \Gamma\)).

Define \[g: = \frac{n^2}{16\mu^2(\log (\mu\ell))^{3d}}.\] We consider the first case where \(\ell \leq g\). By definition of \(\mu\), we have \(\ell \geq n/\mu > |A_1|\). One can also verify that in this case \(\ell \leq \frac{|A_1|^2}{(\log |A_1|)^{3d}}.\) Lemma 20 is applicable to \(A_1\) and \(\ell\), and therefore, \(A_1\) contains disjoint subsets \(A_{1,1}, \ldots, A_{1,m_1}\) of at most \(\frac{\ell}{2|A_1|}(\log |A_1|)^{3d}\) elements in total such that \[\sum_{j=1}^{m_1} |\mathcal{S}_{\Gamma}(A_{1,j})| \geq \ell + m_1.\] Note that \(\mathcal{S}_{\Gamma}(R_1) \leq \ell\). By Lemma 2, there exists a vector \(\vb*{h} \notin \Gamma\) such that \(\vb*{h} + \mathcal{S}(R_1) \equiv \mathcal{S}(R_1) \pmod \Gamma\). Moreover, \[|R_1| \leq \sum_{j=1}^{m_1}|A_{1,j}| \leq \frac{\ell}{2|A_1|}(\log |A_1|)^{3d} \leq \frac{2\mu\ell}{n}(\log n)^{3d}.\]

Now we consider the second case where \(\ell > g\). By Lemma 20, each \(A_i\) contains disjoint subsets \(A_{i,1}, \ldots, A_{i, m_i}\) such that \[\sum_{j=1}^{m_i} |\mathcal{S}_{\Gamma}(A_{i,j})| \geq \frac{|A_i|^2}{(\log |A_i|)^{3d}} + m_i \geq g + m_i.\] In view of 6 , we have \[\left\lceil\frac{\ell}{g}\right\rceil \leq \frac{32\ell\mu^2(\log (\mu\ell))^{3d}}{n^2} \leq \mu.\] Summing the above inequality over all \(i\) with \(1 \leq i \leq \lceil\frac{\ell}{g}\rceil\), we have \[\sum_{i=1}^{\lceil\frac{\ell}{g}\rceil}\sum_{j=1}^{m_i} |\mathcal{S}_{\Gamma}(A_{i,j})| \geq \ell + \sum_{i=1}^{\lceil\frac{\ell}{g}\rceil}m_i.\] Let \(R_1 = \bigcup_{i=1}^{\lceil\frac{\ell}{g}\rceil}\bigcup_{j=1}^{m_i} A_{i,j}\). Note that \(\mathcal{S}_{\Gamma}(R_1) \leq \ell\). By Lemma 2, there exists a vector \(\vb*{h} \notin \Gamma\) such that \(\vb*{h} + \mathcal{S}(R_1) \equiv \mathcal{S}(R_1) \pmod \Gamma\). Moreover, \[|R_1| \leq \sum_{i=1}^{\lceil\frac{\ell}{g}\rceil}|A_{i}| \leq \frac{2\ell}{g} \cdot \frac{n}{2\mu} = \frac{16\mu\ell}{n} (\log (\mu\ell))^{3d}. \qedhere\] ◻

Let \(\Gamma' = \Gamma + \mathcal{L}(\vb*{h})\) and \(\ell' := \mathrm{det}(\Gamma')/\mathrm{det}(Z)\) and \(\mu' := \mu(A', \Gamma')\). We show that the inductive hypothesis in applicable to \(\Gamma'\). Since \(\vb*{0} \in \mathcal{S}(R_1)\), Equation 31 implies that \(\vb*{h} \in \mathcal{S}(R_1) + \Gamma\). Since \(R_1 \subseteq Z\) and \(\Gamma \subseteq Z\), we have \(\vb*{h} \in Z\), and therefore, \(\Gamma' \subseteq Z\). Since \(\vb*{h} \notin \Gamma\), we have \(\Gamma \subsetneq \Gamma'\). So \(\ell' \leq \ell/2 \leq k\). We also have that \[\frac{\mu'}{\mu} \leq \frac{\mathrm{det}(\Gamma)}{\mathrm{det}(\Gamma')} = \frac{\ell}{\ell'},\] which implies \(\ell'\mu'\leq \ell \mu \leq n^2/(\log n)^{3d}\). For any \(\Lambda\) with \(\Gamma' \subseteq \Lambda \subsetneq Z\), we have \(\Gamma \subseteq \Lambda\), and therefore, \[|A \setminus \Lambda| \geq c\mu\ell/n \geq c\mu'\ell'/n.\] By the inductive hypothesis, \(A\) contains a subset \(R_2\) of at most \(\frac{c\mu'\ell'}{n} (\log (\mu'\ell'))^{3d} \log \ell'\) vectors such that \[\label{eq:gen-rem-dense-2} \mathcal{S}_{\Gamma'}(R_2) = Z \bmod \Gamma'.\tag{37}\] Let \(R = R_1 \cup R_2\). We have \[\begin{align} |R| \leq |R_1| + |R_2| &= \frac{16\mu\ell}{n} (\log (\mu\ell))^{3d} + \frac{c\mu'\ell'}{n} (\log (\mu'\ell'))^{3d} \log \ell' \\ & \leq \frac{c\mu\ell}{n} (\log (\mu\ell))^{3d} (1 + \log \ell') \leq \frac{c\mu\ell}{n} (\log (\mu\ell))^{3d}\log \ell. \end{align}\] Equation ?? implies that \(\vb*{h} + \mathcal{S}(R) \equiv \mathcal{S}(R) \pmod {\Gamma},\) and Equation 37 implies that \(\mathcal{S}_{\Gamma'}(R) = Z \bmod \Gamma'\). By Lemma 16, we have \(\mathcal{S}_{\Gamma}(R) = Z \bmod \Gamma\). ◻

9 Computing Modular Sumsets in Multi-dimension↩︎

We shall prove Lemma [lem:faster-modular-ss]. We solve a more general problem of computing \((S_1 + \cdots + S_m) \bmod \Gamma\) for some full-dimensional lattice \(\Gamma\).

The modular sumset of two sets can be computed efficiently using Fast Fourier Transformation.

Lemma 21. Let \(\Gamma \subseteq \mathbb{Z}^d\) be a full-dimensional lattice with \(\ell: = \mathrm{det}(\Gamma)\). Let \(S_1, S_2 \subseteq \mathbb{Z}_{\Gamma}^d\) be two sets of vectors. We can compute \[S:= (S_1 + S_2) \bmod \Gamma\] in \(O(2^{d}|S| \cdot \mathrm{polylog}(2^d \ell))\) time.

Proof. Recall that \(S_1, S_2 \subseteq [b_{11}] \times \cdots \times [b_{dd}]\), where \(b_{11}, \ldots, b_{dd}\) are the diagonal elements of the basis of \(\Gamma\) in Hermite normal form. Note that \(\prod_{i=1}^d b_{ii} = \ell.\) It follows that \[S_1+S_2\subseteq [2b_{11}] \times \cdots \times [2b_{dd}].\] Each residue class modulo \(\Gamma\) contains at most \(2^d\) vectors in \([2b_{11}] \times \cdots \times [2b_{dd}]\). Therefore, \[|S_1+S_2|\leq 2^d |S|.\]

Each vector in \([2b_{11}] \times \cdots \times [2b_{dd}]\) can be mapped to a unique integer on \(\mathbb{Z}\) in the range \([\prod_{i=1}^{d} 2b_{ii}] = [2^d\ell]\). Then we can compute \(S_1 + S_2\) using algorithms for sparse convolution [57] in time \[O(|S_1 + S_2| \cdot \mathrm{polylog}(2^d \ell) = O(2^d |S| \cdot \mathrm{polylog}(2^d \ell).\] Given \(S_1 + S_2\), we can obtain \(S\) in \(O(|S_1 + S_2| d^2)=O(2^d |S|\cdot d^2)\) time via Lemma [lem:compute-rem](i). One can verify that the total time cost is bounded by \(O(2^d |S| \cdot \mathrm{polylog}(2^d\ell)).\) ◻

Recall Definition 3. Next we will present an efficient algorithm to compute the symmetry set. Below we give a closed form of the symmetry set.

Lemma 22. Let \(S \in \mathbb{Z}^d\) be a set of vectors. Let \(\Gamma\) be a full-dimensional lattice. Then we have \[\mathrm{Sym}_{\Gamma}(S) \equiv (S - S) \setminus (((S - S) + S )\setminus S - S) \pmod \Gamma.\]

Proof. Let \(H:=\mathrm{Sym}_{\Gamma}(S)\). For simplicity of notation, in this proof, all the operations \(+\) and \(-\) are modulo \(\Gamma\). That is, they are the group operation of the additive group \(\mathbb{Z}^d_{\Gamma}\). We first show that \(H \subseteq S - S\). For any \(\vb*{h} \in H\), by definition, we have \(\vb*{h} + S = S.\) Therefore, there exists \(\vb*{s}_1,\vb*{s}_2 \in S\) such that \(\vb*{h} + \vb*{s}_1 = \vb*{s}_2.\) This implies \(\vb*{h} \in S - S.\) Therefore, we have \(H \subseteq S - S\).

Let \(X := (S - S) \setminus H\).

Claim 26. Let \(\vb*{v} \in S - S\) be a vector. \(\vb*{v} \in X\) if and only if \[\{\vb*{v}\} \in ((X + S) \setminus S) - S\]

Proof. We first prove the only-if part. Assume that \(\vb*{v} \in X\). Since \(\vb*{v}\notin H\), we have \[\vb*{v} + S \neq S.\] This implies that \((\{\vb*{v}\} + S) \setminus S \neq \emptyset\) and therefore \[\vb*{v} \in ((\{\vb*{v}\} + S) \setminus S) - S.\] Note that \(((\{\vb*{v}\} + S) \setminus S) - S \subseteq ((X + S) \setminus S) - S\). This completes the proof of only-if part.

Next we prove the if part. Given \(\vb*{v} \in H\), we have \(\{\vb*{v}\} + S = S.\) Therefore, \[(\{\vb*{v}\} + S) \cap ((X + S) \setminus S) = \emptyset.\] This implies that \[\vb*{v} \notin ((X + S) \setminus S) - S. \qedhere\] ◻

Claim 27. \((X + S) \setminus S = ((S - S) + S) \setminus S\).

Proof. By the definition of \(H\) and \(X\), we have \[(S - S) + S = (X \cup H) + S = (X + S) \cup (H + S) = (X + S) \cup S.\] Removing the elements of \(S\) from both sides of the above equation, we obtain stated equation in the claim. ◻

Note that \(H = (S - S)\setminus X\). Claim 26 and Claim 27 imply that \[(S - S)\setminus X \equiv (S - S)\setminus ((X + S) \setminus S) - S) = (S - S) \setminus (((S - S) + S) \setminus S - S). \qedhere\] ◻

The following lemma follows straightforwardly by Lemma 21 and Lemma 22.

Lemma 23. Let \(\Gamma \subseteq \mathbb{Z}^d\) be a full-dimensional lattice and \(\ell :=\mathrm{det}(\Gamma)\). Let \(S \subseteq \mathbb{Z}^d_\Gamma\) be a set of vectors. We can compute \(\mathrm{Sym}_{\Gamma}(S)\) in \(O(2^d \ell\cdot \mathrm{polylog}(2^d \ell))\) time.

Figure 1: \mathtt{PARTIALSUM}(S_1, \ldots, S_m, \Gamma)

With Lemma 21 and Lemma 23, we compute \(n\)-fold modular sumset using an idea similar to that of Bringmann and Nakos [49]. Basically, we can either compute \((S_1 + \ldots + S_m) \bmod \Gamma\) or a non-zero vector \(\vb*{h}\in\mathrm{Sym}_{\Gamma}(S_1 + \ldots + S_m)\). In the latter case, we can use \(\vb*{h}\) to reduce the problem to a smaller space \(Z_{\Gamma'}^d\), where \(\Gamma' \supsetneq \Gamma\).

Lemma 24. Let \(\Gamma \subseteq \mathbb{Z}^d\) be a full-dimensional lattice and \(\ell:=\mathrm{det}(\Gamma)\). Let \(S_1, \ldots, S_m \subseteq \mathbb{Z}^d_{\Gamma}\) be \(m\) sets of vectors with total cardinality \(n\). In \(O(n + 2^d \ell\cdot \mathrm{polylog}(2^d \ell))\) time, we can obtain either \((S_1 + \cdots + S_m) \bmod \Gamma\) or a non-zero vector \(\vb*{h}\in\mathrm{Sym}_{\Gamma}(S_1 + \cdots + S_m)\).

Proof. For simplicity of notation, in this proof, all the operations \(+\) and \(-\) are modulo \(\Gamma\). That is, they are the group operation of the additive group \(\mathbb{Z}^d_{\Gamma}\). We also assume that \(m\) is a power of \(2\). This can be done by adding dummy sets of the form \(\{\vb*{0}\}\).

We shall invoke Algorithm 1. Basically, Algorithm 1 computes \(S_1 + \cdots + S_m\) recursively as follows. It computes \(S'_j = S_{2j-1} + S_{2j}\) via Lemma 21 for \(j \in \{1, \ldots, m/2\}\), and then recursively computes \(S'_1 + \cdots + S'_{m/2}\). The trick is that when \(|S'_1| + \cdots + |S'_j| \geq \ell + m/2\) for some \(j\), it stops computing the remaining sets (because \(\mathrm{Sym}_\Gamma(S'_1 + \cdots + S'_j)\) already contains a non-zero vector), and immediately starts recursion on \(S'_1, \ldots, S'_j\).

Claim 28. Algorithm 1 returns \(S_1 + \cdots + S_j\) for some \(j \leq m\). Moreover, if \(j < m\), then \(\mathrm{Sym}(S_1 + \cdots + S_j)\) contains a non-zero vector.

Proof. If the criterion \(t < \ell + m/2\) in line 4 is never violated, then Algorithm 1 will return \(S_1 + \cdots + S_m\). If this criterion is violated in some recursion, then Algorithm 1 returns \(S_1 + \cdots + S_j\) for some \(j < m\). Since \(S_1, \ldots, S_m \subseteq \mathbb{Z}^d_{\Gamma}\), we have \(|S_1+\dots+S_j|\leq \ell\) for any \(j\leq m\). It follows that \(|S_1| + \cdots + |S_j| \geq \ell + m/2 \geq |S_1+\dots+S_j| + j\), by Corollary 1, there exists a non-zero vector \(\vb*{h} \in \mathrm{Sym}(S_1 + \cdots + S_j)\). ◻

Let \(S\) be the result of Algorithm 1. Note that \(S\subseteq S_1 + \cdots + S_m\). We can compute \(\mathrm{Sym}_{\Gamma}(S)\) in \(O(2^d \ell\cdot \log(2^d\ell))\) time via Lemma 23. Suppose \(\mathrm{Sym}_{\Gamma}(S)\) contains a non-zero vector \(\vb*{h}\). Recall that if \(\vb*{h}\in \mathrm{Sym}_{\Gamma}(S)\), then \(\vb*{h}\in \mathrm{Sym(S_1 + \dots + S_m)}\). In this case, we are done. Otherwise, if we obtain no such vector, then by Claim 28, \(S = S_1 + \cdots + S_m\).

The recursion tree of Algorithm 1 has at most \(\log m\) levels. Note that \(|S'_j| \leq \mathbb{|}Z^d_{\Gamma}|= \ell\). In each level \(i\), when the criterion \(t < \ell + m/2^i\) is violated, the total cardinality (that is, \(t\)) is bounded by \(\ell + m/2^i + \ell\). Therefore, the total time cost of applying Algorithm 1 and Lemma 23 is \[\begin{align} &O(n) + O(2^d\ell\log(2^d\ell)) + \sum_{i = 1}^{\log m} O\left( 2^d (2\ell + \frac{m}{2^i}) \cdot \mathrm{polylog}(2^d \ell)\right)\nonumber\\ = &O\left( n+ 2^d(m + \ell\log m)\cdot \mathrm{polylog}(2^d \ell)\right).\label{eq:sumset-or-stablizer-1} \end{align}\tag{38}\]

Next, we show that this running time can be reduced to \(O(n + 2^d \ell\cdot \mathrm{polylog}(2^d \ell))\) by dealing with the sets of cardinality \(1\) separately. Suppose that \(|S_i| \geq 2\) for all \(i \leq m'\) and that \(|S_i| = 1\) for all \(i > m'\).

Suppose that \(m' \leq \ell\). We can apply Algorithm 1 to \(S_1, \ldots, S_{m'}\) and then Lemma 23 to the result of Algorithm 1. The total time cost of Algorithm 1 and Lemma 23 is bounded by (38 ) with \(m\) replaced by \(\ell\), which is \[\label{eq:sumset-or-stablizer-2} O\left(n + 2^d \ell\cdot \mathrm{polylog}(2^d\ell)\right).\tag{39}\] If we obtain a non-zero vector \(\vb*{h}\in \mathrm{Sym}(S_1+\dots+S_m)\), then the time cost is bounded by (39 ). Otherwise, we obtain \(S = S_1 + \cdots + S_{m'}\). Since \(|S_i| = 1\) for all \(i > m'\), we can compute \(S' = S_{m'+1} + \cdots + S_{m}\) trivially in \(O(n + d^2)\) time by Lemma [lem:compute-rem]. Then we compute \(S + S'\), which takes \(O(d^2 \ell)\) time since \(|S|\leq \ell\) and \(|S'| = 1\).

Now consider the case where \(m' \geq \ell\). We have that \[\sum_{i=1}^{\ell} |S_i| \geq 2\ell\ge |S_1+\dots+S_{\ell}|+\ell.\] By Corollary 1, there exists a non-zero vector \(\vb*{h}\in\mathrm{Sym}(S_1 + \cdots + S_{\ell})\). Therefore, applying Algorithm 1 to \(S_1, \ldots, S_{\ell}\) and then Lemma 23 to the result of Algorithm 1 will give us the non-zero vector \(\vb*{h}\), which is also in the symmetry set of \(S_1 + \cdots + S_m\). The total time cost is bounded by \(O\left(2^d \ell\cdot \mathrm{polylog}(2^d \ell)\right).\) ◻

Figure 2: \mathtt{MODULARSUMSET}(S_1, \ldots, S_m, \Gamma)

If Algorithm 1 returns \((S_1 + \cdots + S_m) \bmod \Gamma\), then we are done. Otherwise, it returns a non-zero vector \(\vb*{h}\in\mathrm{Sym}_{\Gamma}(S_1 + \cdots + S_m)\). Then by Lemma 16, we can use \(\vb*{h}\) to reduce the computation to a lattice \(\Lambda'\) with \(\mathrm{det}(\Lambda') \leq \mathrm{det}(\Gamma)/2\).

Theorem 29. Let \(S_1, \ldots, S_m \subseteq \mathbb{Z}^d_{\Gamma}\) be \(m\) sets of vectors with total cardinality \(n\). Let \(\Gamma \subseteq \mathbb{Z}^d\) be a full-dimensional lattice with \(\ell := \mathrm{det}(\Gamma)\). We can compute \((S_1 + \cdots + S_m)\bmod \Gamma\) in time \[O(d^2n\log \ell + 2^d\ell\cdot \mathrm{polylog}(2^d \ell)).\]

Proof. We use Algorithm 2. The correctness follows by Lemma 16.

Let \(T(\ell)\) be the running time of the algorithm.

Line 3 takes \(O(n + 2^d \ell\cdot \mathrm{polylog}(2^d \ell))\) time. Line 8 takes \(O(d^2 + d\log \ell)\) time by Lemma [lem:compute-rem](iii). Lines 9-10 take \(O(d^2n)\) time by Lemma [lem:compute-rem](i). Since \(\vb*{h}\in \mathrm{Sym}(S_1 + \cdots + S_m)\) is non-zero, we have \(\Gamma' \supsetneq \Gamma\), and therefore \(\mathrm{det}(\Gamma') \leq \mathrm{det}(\Gamma)/2\). By recursion, line 11 takes at most \(T(\ell/2)\) time. Computing \((\Lambda \bmod \Gamma)\) takes \(O(\ell d^3)\) time by Lemma [lem:compute-rem](ii). So line 12 takes \(O(2^d \ell\cdot \mathrm{polylog} (2^d \ell))\) time. In summary, we have \(T(1) = O(1)\) and \[T(\ell) \leq T(\frac{\ell}{2}) + O(d^2n + 2^d \ell\cdot \mathrm{polylog}(2^d \ell)).\] Solving the recurrence, we have \(T(\ell) = O(d^2n \log \ell + 2^d \ell \cdot \mathrm{polylog}(2^d \ell))\). ◻

Now we are ready to prove Lemma [lem:faster-modular-ss].

Proof. Let \(B = (\vb*{b}_1, \ldots, \vb*{b}_d)\) be the basis of \(Z\) in Hermite normal form. Note that \(B^{-1}B = I\), where \(I\) is the identity matrix. Computing \(B^{-1}\) takes only \(\mathrm{poly}(d)\) time. \(B^{-1}\) can be viewed as a linear transformation that maps \(Z\) to \(\mathbb{Z}^d\). Let \(A' = B^{-1}A\). Let \(\Gamma' = B^{-1}\Gamma\). It takes \(O(d^2n)\) time to compute \(A'\), and \(\mathrm{poly}(d)\) time to compute (the basis of) \(\Gamma'\). We have that \(\mathrm{det}(\Gamma') = \mathrm{det}(\Gamma)/\mathrm{det}(Z) = \ell\).

We can compute \(\mathcal{S}_{\Gamma'}(A')\) via Theorem 29 in \(O(d^2 n\log \ell + 2^d \ell\cdot \mathrm{polylog}(2^d \ell))\). Given \(\mathcal{S}_{\Gamma'}(A')\), we can compute \(\mathrm{Sym}_{\Gamma'}(\mathcal{S}(A'))\) via Lemma 23 in \(O(d^2 n\log \ell + 2^d \ell\cdot \mathrm{polylog}(2^d \ell))\).

We can obtain \(\mathcal{S}_{\Gamma}(A)\) and \(\mathrm{Sym}_{\Gamma}(\mathcal{S}(A))\) from \(\mathcal{S}_{\Gamma'}(A')\) and \(\mathrm{Sym}_{\Gamma'}(\mathcal{S}(A'))\) by left multiplying them by \(B\), which takes \(O(d^2\ell)\) time.

One can verify that the total time cost is \(\widetilde{O}((n + 2^d\ell) \cdot \mathrm{poly}(d))\). ◻

10 Sharpness of Density Threshold↩︎

Let \(A\subseteq [N_1]\times [N_2]\times\cdots\times [N_d]\). Let \(\Phi=\prod_{i=1}^d N_i\). We show that if \(|A|\leq (1-o(1)) \sqrt{\Phi}\), then \(\mathcal{S}(A)\) may contain a lot of “holes” even if \(|A \setminus \Gamma| \geq |A|/2\) for any full-dimensional lattice \(\Gamma \subsetneq \mathbb{Z}^d\).

Theorem 30. There exists a set \(A\subseteq [N_1]\times [N_2]\times\cdots\times [N_d]\) with \[|A| \leq (1-o(1))\sqrt{\Phi},\] where \(\Phi = \prod_{j=1}^d N_j\), such that \(|A \setminus \Gamma| \geq |A|/4\) for any full-dimensional lattice \(\Gamma \subsetneq \mathbb{Z}^d\) and that there is no convex body \(K\) with \(K\cap \mathbb{Z}^d\subseteq \mathcal{S}(A)\) and \(|K\cap \mathbb{Z}^d|=(1-o(1))|\mathcal{S}(A)|\).

Proof. Let \(p_1, \ldots, p_d\) be distinct primes in \([\sqrt{N_i}, \sqrt{N_i} + N_i^{0.3}],\) which exist due to [58]. Define \[A = \bigl\{(x_1 p_1 + 1, x_2 p_2 + 1, \dots, x_d p_d + 1) : 0 \leq x_i \leq \left\lfloor \frac{N_i}{p_i} \right\rfloor, \, x_i \in \mathbb{Z} \bigr\}.\] One can verify that \(|A \setminus \Gamma| \geq |A|/4\) for any full-dimensional lattice \(\Gamma \subsetneq \mathbb{Z}^d\) and that \(|A| \leq (1-o(1))\sqrt{\Phi}.\)

Let \(\Gamma \subseteq \mathbb{Z}^d\) be the lattice generated by \(\{p_i \vb*{e}_i : 1 \leq i \leq d\}\). Note that \(\mathrm{det}(\Gamma) = \prod_{i=1}^{d} p_i\). We also have that \(A \pmod{\Gamma} = \{\vb*{1}\}.\) Hence, \(\mathcal{S}_\Gamma(A)\) contains at most \[|A| \leq \frac{\prod_{i=1}^{d} N_i}{\prod_{i=1}^{d} p_i}\leq (1-o(1)) \prod_{i=1}^{d} p_i = (1-o(1))\mathrm{det}(\Gamma)\] distinct residue classes of \(\mathbb{Z}^d_\Gamma\).

Suppose, for contradiction, that there exists a convex body \(K\) such that \[K \cap \mathbb{Z}^d \subseteq \mathcal{S}(A) \quad \text{and} \quad |K \cap \mathbb{Z}^d| = (1- o(1)) |\mathcal{S}(A)|.\] One can verify that the convex hull of \(\mathcal{S}(A)\) contains a large hyperrectangle with edge length \(N_1, \ldots, N_d\). Therefore, \(K\) must also contain a large hyperrectangle. More precisely, there exists a vector \(\vb*{a} \in \mathbb{Z}^d\) such that \((a+[0,p_1-1]\times \cdots \times [0,p_d-1])\subseteq K\) for some \(\vb*{a} \in \mathbb{Z}^d\). This contradicts the fact that \(\mathcal{S}_\Gamma(A)\) contains at most \((1-o(1))\mathrm{det}(\Gamma)\) distinct residue classes of \(\mathbb{Z}^d_\Gamma\). ◻

11 Determining the Nondegeneracy↩︎

Lemma 25. Given a set \(A \subseteq [N]^d\) of \(n\) vectors and a real \(\delta > 0\), in \(\widetilde{O}((n + \sqrt{N})\cdot \mathrm{poly}(d))\) time, with error probability at most \(N^{-\Omega(d)}\), we can

  • either assert that \(A\) is \(\delta\)-nondegenerate;

  • or assert that \(A\) is not \(\delta\cdot (d\log N)^{4d}\)-nondegenerate.

Proof. By Lemma 1, in \(\widetilde{O}(d^3n\log N)\) time, we can obtain \(Z := \mathcal{L}(A)\). If \(Z\) is not full-dimensional, then we can immediately conclude that \(A\) is not \(\delta\cdot (d\log N)^{3d}\)-nondegenerate. Assume that \(Z\) is full-dimensional.

Let \(k := \delta \cdot \sqrt{N^d/\mathrm{det}(Z)}\). We shall construct a sequence \(A_0 \supsetneq A_1 \supsetneq \cdots \supsetneq A_r\) until \(Z_r := \mathcal{L}(A_r)\) is not full-dimensional or \(|A_r \setminus \Gamma| \geq k\) for any \(\Gamma \subsetneq Z_r\). Initially, \(i := 0\) and \(A_0 := A\). Given \(A_i\), we can check whether \(Z_i := \mathcal{L}(A_i)\) is full-dimensional or not in \(\widetilde{O}(d^3n\log N)\) time via Lemma 1. If not, then we stop and set \(r := i\). Suppose that \(Z_i\) is full-dimensional. Then we invoke Lemma 12 on \(A_i\) and \(k\), which takes \(\widetilde{O}((n + \sqrt{N})\cdot \mathrm{poly}(d))\) time. If it asserts that \(|A_i \setminus \Gamma| \geq k\) for any \(\Gamma \subsetneq Z_i\), then we stop and set \(r := i\). Otherwise, it returns a \(\Gamma_i \subsetneq Z\) such that \[|A_i \setminus \Gamma_i| \leq k\cdot (d\log N)^{2d}.\] We set \(A_{i+1} := A_i \cap \Gamma_i\), and then proceed with \(i := i+1\).

We first show that \(r \leq 1 + d\log N\). Suppose not. Note that \(Z_{r-1}\) must be full-dimensional. Observing that \(Z_{i} \subsetneq Z_{i-1}\) for all \(i\), we have \[\mathrm{det}(Z_{r-1}) \geq 2^{r-1} \cdot \mathrm{det}(Z_0) > N^d.\] But this is impossible since \(Z_{r-1} = \mathcal{L}(A_{r-1})\) and \(A_{r-1} \subseteq [N]^d\).

Note that \(|A_{i}| - |A_{i+1}| \leq k\cdot (d\log N)^{2d}\). We have \[|A_r| \geq |A| - rk\cdot (d\log N)^{2d} \geq |A| - k\cdot (d\log N)^{4d}.\] Therefore, if the construction ends with \(Z_r\) not full-dimensional, then we can assert that \(A\) is not \(\delta\cdot (d\log N)^{4d}\)-nondegenerate. Otherwise, it ends with \(|A_r \setminus \Gamma| \geq k\) for any \(\Gamma \subsetneq Z_r\). This implies that \(A_r\) is \(\delta\)-nondegenerate, so is \(A\).

It is easy to verify that the total running time is \(\widetilde{O}((n + \sqrt{N})\cdot \mathrm{poly}(d))\) time and the total error probability is at most \(N^{-\Omega(d)}\). ◻

12 Deciding Zonotope Membership↩︎

We shall prove the following lemma.

lemmalemellipsoid Let \(A \subseteq [N]^d\) be a set of integers, and let \(\vb*{t} \in \mathbb{R}^d\). We can decide whether \(\vb*{t}\in \mathcal{P}(A)\) in \(O(d^3n\log N)\) time.

Let \(P :=\{\sum_{i=1}^n \vb*{a}_ix_i: -1\leq x_i\leq 1\}\in \mathbb{R}^d\), and let \(\vb*{t}\in \mathbb{R}^d\) be an arbitrary point. The goal is to determine whether \(\vb*{t}\in P\). Without loss of generality, we assume that \(P\) does not belong to any lower dimensional subspace of \(\mathbb{R}^d\), since otherwise, we can reduce the problem to lower dimensional space as follows: if \(\vb*{t}\) does not lie on that subspace, the decision problem is trivially “no”; otherwise we simply project all \(\vb*{a}_i\)’s and \(\vb*{t}\) to the subspace.

We shall reformulate the above problem into another linear program with \(O(d)\) variables and many (possibly an exponential number of) constraints, and then show that the resulting linear program can be solved in linear time using the ellipsoid method.

By Lemma 2, \(\vb*{t}\in P\) if and only if \[\begin{align} \label{eq:zono-test11} \vb*{t}\cdot\vb*{y} \le \max_{\vb*{p}\in P} \vb*{p}\cdot\vb*{y}, \quad \forall \vb*{y}\in\mathbb{R}^d. \end{align}\tag{40}\] Since \(P\) is centrally symmetric, it is easy to see that \(\max_{\vb*{p}\in P} \vb*{v}\cdot\vb*{p}\ge 0\) for all \(\vb*{v}\in\mathbb{R}^d\). Thus, by scaling, 40 is equivalent to the following: \[\begin{align} \label{eq:zono-test2} \vb*{t}\cdot\vb*{y}\leq \max_{\vb*{p}\in P} \vb*{p}\cdot\vb*{y}, \quad \forall \vb*{y}\in\mathbb{R}^d \text{ such that } \max_{\vb*{p}\in P} \vb*{p}\cdot \vb*{y} = 1 \end{align}\tag{41}\] Given that \(P\) is a zonotope, we further have the following.

Lemma 26. Given \(\vb*{y}\in\mathbb{R}^d\), \(\vb*{p}\cdot \vb*{y}\le 1\) for all \(\vb*{p}\in P\) if and only if \(\sum_i|\vb*{a}_i\cdot\vb*{y}|\le 1\).

Proof. Suppose \(\sum_i | \vb*{a}_i\cdot\vb*{y}|\le 1\). Then for arbitrary \(z\in P\), \(\vb*{p}\cdot\vb*{y}=\vb*{y}\cdot \sum_{i}\vb*{a}_ix_i=\sum_i (\vb*{y}\cdot\vb*{a}_i)x_i\le \sum_i |\vb*{y}\cdot \vb*{a}_i|\le 1\).

Suppose \(\vb*{p}\cdot\vb*{y}\le 1\) for all \(\vb*{p}\in P\). Suppose on the contrary that \(\sum_i |\vb*{y}\cdot \vb*{a}_i|> 1\). Let \(x_i^*=1\) if \(\vb*{y}\cdot \vb*{a}_i\ge 0\), and \(x_i^*=-1\) otherwise. Then it is clear that \(\vb*{p}^*=\sum_i\vb*{a}_ix_i^*\in P\), and \(\vb*{y}\cdot\vb*{p}^*=\sum_i |\vb*{y}\cdot \vb*{a}_i|>1\), which is a contradiction. ◻

Thus, \(\vb*{t}\not\in P\) if and only if there exists some \(\vb*{y}\in \mathbb{R}^d\) such that \(\sum_i|\vb*{y}\cdot \vb*{a}_i|\le 1\), and \(\vb*{y}\cdot\vb*{t}>1\).

To determine whether \(\vb*{t}\in P\), it suffices to solve the following linear program. \[\begin{align} \max \quad & \vb*{t}\cdot\vb*{y} \label{eq:lp}\\ s.t.\quad &\sum_i|\vb*{a}_i\cdot \vb*{y}|\leq 1 \nonumber\\ &\vb*{y}\in \mathbb{R}^d \nonumber \end{align}\tag{42}\]

First, we observe that the constraint \(\sum_i|\vb*{a}_i\cdot \vb*{y}|\leq 1\) can be expressed as \(2^n\) constraints, each of the form \(\sum_i \alpha_i (\vb*{a}_i\cdot \vb*{y})\le 1\) where \(\alpha_i\in\{1,-1\}\). Thus, 42 is indeed a linear program.

Second, we observe that if the optimal objective of \(\text{LP}_1\) is larger than 1, then its optimal solution \(\vb*{y}^*\) guarantees that \(\sum_i|\vb*{y}^*\cdot \vb*{a}_i|\le 1\), and \(\vb*{y}^*\cdot\vb*{t}>1\), implying that \(\vb*{t}\not\in P\). On the other hand, if the optimal objective of \(\text{LP}_1\) is smaller than or equal to 1, then there does not exist any \(\vb*{y}\) such that \(\sum_i|\vb*{y}\cdot \vb*{a}_i|\le 1\), and \(\vb*{y}\cdot\vb*{t}>1\). By Lemma 26, this means \(\vb*{t}\in P\).

The linear programming 42 has only \(d\) variables, but \(2^n\) constraints, so we employ the ellipsoid method. It suffices to design an algorithm for the feasibility test problem, i.e., testing whether \(\mathcal{F}=\{\vb*{y}: \vb*{t}\cdot\vb*{y}\ge \beta, \sum_i|\vb*{a}_i\cdot \vb*{y}|\le 1\}\) is nonempty for an arbitrary \(\beta\in \mathbb{R}\). To solve the feasibility test problem, it suffices to design a separation oracle which does the following: given an arbitrary fixed point \(\vb*{y}_0\in \mathbb{R}^d\), either assert that \(\vb*{y}_0\in\mathcal{F}\), or assert that \(\vb*{y}_0\not\in\mathcal{F}\) and return a constraint that \(\vb*{y}_0\) violates.

We design a separation oracle as follows. Given \(\vb*{y}_0\), we first check whether \(\vb*{t}\cdot\vb*{y}_0\ge \beta\). If this constraint is violated, then we assert \(\vb*{y}_0\not\in\mathcal{F}\) and return this constraint; Otherwise, we compute \(\vb*{a}_i\cdot \vb*{y}_0\) for each \(1\le i\le n\). Set \(\alpha_i=1\) if \(\vb*{a}_i\cdot \vb*{y}_0\ge 0\) and \(\alpha_i=-1\) otherwise, compute \(\sum_i \alpha_i\vb*{a}_i\cdot \vb*{y}_0=\sum_i |\vb*{a}_i\cdot \vb*{y}_0|\). If it is no more than \(1\), we assert \(\vb*{y}_0\in\mathcal{F}\). Otherwise, we assert \(\vb*{y}_0\not\in\mathcal{F}\), and return \(\sum_i \alpha_i\vb*{a}_i\cdot \vb*{y}\le 1\) as the violating constraint.

It is easy to verify that each call of the separation oracle takes \(O(dn)\) time. The number of calls to the separation oracle is \(O(d^2\log N)\). Thus overall solving \(\text{LP}_1\) takes \(O(d^3n\log N)\) time.

13 Computing Lattices and Remainders↩︎

Proof. We first prove (i). Let \(B\) be the basis of \(\Gamma\) in Hermite Normal Form. By Definition 1, \(B\) is a lower-triangular matrix. Hence, \(\vb*{v} \bmod \Gamma\) can be computed as follows. For each \(j \in \{1, 2, \dots, d\}\), compute \(x_j = \left\lfloor \frac{v_j }{b_{jj}} \right\rfloor,\) and update \(\vb*{v} := \vb*{v} - x_j \vb*{b}_j.\) The total time cost is \(O(d^2)\).

Next, we prove (ii). Let \(B\) and \(B'\) be the basis of \(\Gamma\) and \(\Gamma'\) in Hermite normal form, respectively. Let \(s_j : = b_{jj}/b'_{jj}\) for \(j \in [d]\). By Fact 4, \(s_j\) is an integer. To compute the representatives of \(\Gamma' \pmod \Gamma\), it suffices to consider the remainders (modulo \(\Gamma\)) of the vectors of the form \[\vb*{v} = \sum_{j=1}^d z_j \vb*{b}'_j,\] where \(0 \leq z_j < s_j, z_j \in \mathbb{Z}\), since the number of such vectors is exactly \(\prod_{i=1}^d s_i = \frac{\mathrm{det}(\Gamma)}{\mathrm{det}(\Gamma')} = |\Gamma' \bmod \Gamma|\), and one can also verify that no two such vectors are congruent modulo \(\Gamma\). By (i), it takes \(\mathcal{O}(d^2)\) time to compute \(\vb*{v} \bmod \Gamma\) for each \(\vb*{v}\). Therefore, the total time cost is \(O(\frac{|\mathrm{det}(\Gamma)|}{|\mathrm{det}(\Gamma')|}\cdot d^2)\).

Next we prove (iii). Let \(B\in \mathbb{Z}^{d\times d}\) be the basis of \(\Gamma\) in Hermite Normal Form. We can first update \(\vb*{h} := \vb*{h} \bmod \Gamma\) in \(O(d^2)\) time by (i). Let \(h_1,\dots,h_d\) be the entries of vector \(\vb*h\). For \(i \in \{1, \ldots, d\}\) from \(1\) to \(d\), we iteratively update \(\vb*b_i\) and \(\vb*h\) to make \(h_i=0\) while keeping the lattice generated by \(\vb*b_1,\dots,\vb*b_d,\vb*h\) unchanged.

We use the extended Euclidean algorithm to compute \(g_i=\gcd(b_{ii},h_i)\) and integers \(x,y\) such that \[xb_{ii}+yh_i=g_i.\] This step takes \(O(\log(\max\{b_{ii},h_i\}))=O(\log \ell)\) time. We then update \(\vb*{b}_i\) and \(\vb*{h}\) as follows \[\vb*b_i'=x\vb*b_i+y\vb*{h}, \qquad \vb*h'=-\frac{h_i}{g_i}\vb*b_i+\frac{b_{ii}}{g_i}\vb*h.\] By updating \(\vb*b_i := \vb*b_i'\) and \(\vb*h := \vb*h'\), we have \(B_{ii}=g_i\) and \(h_i=0\), and the lattice generated by \(\vb*b_i\) and \(\vb*h\) is unchanged. Each such update uses \(O(d)\) arithmetic operations.

Repeating this for \(i=1,\dots,d\) yields a basis in Hermite normal form for \(\Gamma'\), and the total number of arithmetic operations is \(O(d(d+\log \ell))\). ◻

References↩︎

[1]
A. Sárközy. Fine Addition Theorems, II. Journal of Number Theory, 48(2):197–218, August 1994. https://doi.org/10.1006/jnth.1994.1062.
[2]
Vsevolod F. Lev. Blocks and progressions in subset sum sets. Acta Arithmetica, 106(2):123–142, 2003. https://doi.org/10.4064/aa106-2-3.
[3]
Zvi Galil and Oded Margalit. An Almost Linear-Time Algorithm for the Dense Subset-Sum Problem. SIAM Journal on Computing, 20(6):1157–1189, December 1991. https://doi.org/10.1137/0220072.
[4]
Endre Szemerédi and Van H Vu. Finite and infinite arithmetic progressions in sumsets. Annals of mathematics, pages 1–35, 2006. https://doi.org/10.4007/annals.2006.163.1.
[5]
Gregory A Freiman. New analytical results in subset-sum problem. Discrete Mathematics, 114(1):205–217, April 1993. https://doi.org/10.1016/0012-365X(93)90367-3.
[6]
Mark Chaimovich, Gregory Freiman, and Zvi Galil. Solving dense subset-sum problems by using analytical number theory. Journal of Complexity, 5(3):271–282, 1989. https://doi.org/10.1016/0885-064X(89)90025-3.
[7]
Karl Bringmann and Philip Wellnitz. On near-linear-time algorithms for dense subset sum. In Proceedings of the 2021 ACM-SIAM Symposium on Discrete Algorithms, pages 1777–1796, 2021. https://doi.org/10.1137/1.9781611976465.107.
[8]
Gregory Freiman. On solvability of a system of two boolean linear equations. In Number Theory: New York Seminar 1991–1995, pages 135–150. Springer, 1996. https://doi.org/10.1007/978-1-4612-2418-1_10.
[9]
Alain Plagne. On the two-dimensional subset sum problem. ASTERISQUE-SOCIETE MATHEMATIQUE DE FRANCE, 258:375–375, 1999. URL: https://numdam.org/item/AST_1999__258__375_0/.
[10]
M Chaimovich. On solving dense n-dimensional subset sum problems. Congressus Numerantium, pages 41–41, 1991.
[11]
Noga Alon and Gregory Freiman. On sums of subsets of a set of integers. Combinatorica, 8(4):297–306, 1988. https://doi.org/10.1007/BF02189086.
[12]
Lin Chen, Jiayi Lian, Yuchen Mao, and Guochuan Zhang. An improved pseudopolynomial time algorithm for subset sum. In 65th IEEE Annual Symposium on Foundations of Computer Science (FOCS 2024), pages 2202–2216, 2024. https://doi.org/10.1109/FOCS61266.2024.00129.
[13]
Richard M. Karp. Reducibility among Combinatorial Problems, pages 85–103. , Boston, MA, 1972. https://doi.org/10.1007/978-1-4684-2001-2_9.
[14]
Richard Bellman. Dynamic Programming, volume 33. , 1957. https://arxiv.org/abs/j.ctv1nxcw0f, https://doi.org/10.2307/j.ctv1nxcw0f.
[15]
David Pisinger. Linear Time Algorithms for Knapsack Problems with Bounded Weights. Journal of Algorithms, 33(1):1–14, October 1999. https://doi.org/10.1006/jagm.1999.1034.
[16]
Pisinger. Dynamic programming on the word RAM. Algorithmica, 35:128–145, 2003. https://doi.org/10.1007/s00453-002-0989-y.
[17]
Konstantinos Koiliaris and Chao Xu. A faster pseudopolynomial time algorithm for subset sum. In Proceedings of the 28th ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1062–1072, 2017. https://doi.org/10.1137/1.9781611974782.68.
[18]
Konstantinos Koiliaris and Chao Xu. Subset Sum Made Simple, July 2018. https://arxiv.org/abs/1807.08248.
[19]
Karl Bringmann. A Near-Linear Pseudopolynomial Time Algorithm for Subset Sum. In Proceedings of the 28th ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1073–1084, January 2017. https://doi.org/10.1137/1.9781611974782.69.
[20]
Ce Jin and Hongxun Wu. A simple near-linear pseudopolynomial time randomized algorithm for subset sum. In Proceedings of 2nd Symposium on Simplicity in Algorithms (SOSA), volume 69, pages 17:1–17:6, 2019. https://doi.org/10.4230/OASICS.SOSA.2019.17.
[21]
Adam Polak, Lars Rohwedder, and Karol Węgrzycki. Knapsack and Subset Sum with Small Items. In 48th International Colloquium on Automata, Languages, and Programming (ICALP), volume 198, pages 106:1–106:19, Dagstuhl, Germany, 2021. https://doi.org/10.4230/LIPIcs.ICALP.2021.106.
[22]
Mark Chaimovich. New algorithm for dense subset-sum problem. In Structure theory of set addition, number 258 in Astérisque. 1999. URL: http://www.numdam.org/item/AST_1999__258__363_0/.
[23]
Arne Storjohann and George Labahn. Asymptotically fast computation of hermite normal forms of integer matrices. In Proceedings of the 9th International Symposium on Symbolic and Algebraic Computation (ISSAC), pages 259–266, 1996. https://doi.org/10.1145/236869.237083.
[24]
Ravindran Kannan and Achim Bachem. Polynomial algorithms for computing the smith and hermite normal forms of an integer matrix. SIAM Journal on Computing, 8(4):499–507, 1979. https://doi.org/10.1137/0208040.
[25]
Tsu-Wu J Chou and George E Collins. Algorithms for the solution of systems of linear Diophantine equations. SIAM Journal on computing, 11(4):687–708, 1982. https://doi.org/10.1137/0211057.
[26]
Costas S Iliopoulos. Worst-case complexity bounds on algorithms for computing the canonical structure of finite Abelian groups and the Hermite and Smith normal forms of an integer matrix. SIAM Journal on Computing, 18(4):658–669, 1989. https://doi.org/10.1137/0218045.
[27]
Haomin Li and Arne Storjohann. Computing a basis for an integer lattice: A special case. In Proceedings of the 35th International Symposium on Symbolic and Algebraic Computation (ISSAC), pages 303–310, 2022. https://doi.org/10.1145/3476446.3536184.
[28]
Kim-Manuel Klein and Janina Reuter. Faster lattice basis computation via a natural generalization of the euclidean algorithm. In Proceedings of the 57th ACM Symposium on Theory of Computing (STOC), pages 2179–2190, 2025. https://doi.org/10.1145/3717823.3718138.
[29]
Virginia Vassilevska Williams, Yinzhan Xu, Zixuan Xu, and Renfei Zhou. New bounds for matrix multiplication: from alpha to omega. In Proceedings of the 35th ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 3792–3835. SIAM, 2024. https://doi.org/10.1137/1.9781611977912.134.
[30]
H. W. Lenstra Jr. Integer programming with a fixed number of variables. Mathematics of Operations Research, 8(4):538–548, 1983. https://doi.org/10.1287/moor.8.4.538.
[31]
R. Kannan. Minkowski’s convex body theorem and integer programming. Mathematics of Operations Research, 12(3):415–440, 1987. https://doi.org/10.1287/moor.12.3.415.
[32]
D. Dadush, C. Peikert, and S. Vempala. Enumerative lattice algorithms in any norm via -ellipsoid coverings. In Proceedings of the 52nd IEEE Symposium on Foundations of Computer Science (FOCS), pages 580–589. IEEE, 2011. https://doi.org/10.1109/FOCS.2011.31.
[33]
D. Dadush. Integer programming, lattice algorithms, and deterministic volume estimation. Georgia Institute of Technology, 2012.
[34]
V. Reis and T. Rothvoss. The subspace flatness conjecture and faster integer programming. In Proceedings of the 64th IEEE Symposium on Foundations of Computer Science (FOCS), pages 974–988. IEEE, 2023. https://doi.org/10.1109/FOCS57990.2023.00060.
[35]
C. H. Papadimitriou. On the complexity of integer programming. Journal of the ACM, 28(4):765–768, 1981. https://doi.org/10.1145/322276.322287.
[36]
F. Eisenbrand and R. Weismantel. Proximity results and faster algorithms for integer programming using the Steinitz Lemma. ACM Transactions on Algorithms, 16(1):1–14, 2019. https://doi.org/10.1145/3340322.
[37]
K. Jansen and L. Rohwedder. On integer programming, discrepancy, and convolution. Mathematics of Operations Research, 48(3):1481–1495, 2023. https://doi.org/10.1287/moor.2022.1308.
[38]
Mingyang Deng, Ce Jin, and Xiao Mao. Approximating Knapsack and Partition via Dense Subset Sums. In Proceedings of the 34th ACM-SIAM Symposium on Discrete Algorithms (SODA), Proceedings, pages 2961–2979, January 2023. https://doi.org/10.1137/1.9781611977554.ch113.
[39]
Tim Randolph and Karol Węgrzycki. Parameterized algorithms on integer sets with small doubling: Integer programming, subset sum and k-sum. In 32nd Annual European Symposium on Algorithms (ESA). Schloss Dagstuhl–Leibniz-Zentrum für Informatik, 2024. https://doi.org/10.4230/LIPIcs.ESA.2024.96.
[40]
Amir Abboud, Karl Bringmann, and Nick Fischer. Stronger 3-sum lower bounds for approximate distance oracles via additive combinatorics. In Proceedings of the 55th ACM Symposium on Theory of Computing (STOC), pages 391–404, 2023. https://doi.org/10.1145/3564246.3585240.
[41]
Lin Chen, Jiayi Lian, Yuchen Mao, and Guochuan Zhang. Weakly approximating knapsack in subquadratic time. In Proceedings of the 52nd International Colloquium on Automata, Languages, and Programming (ICALP), pages 51–1. Schloss Dagstuhl–Leibniz-Zentrum für Informatik, 2025. https://doi.org/10.48550/arXiv.2504.15001.
[42]
Lin Chen, Jiayi Lian, Yuchen Mao, and Guochuan Zhang. Approximating partition in near-linear time. In Proceedings of the 56th ACM Symposium on Theory of Computing (STOC), pages 307–318, 2024. https://doi.org/10.1145/3618260.3649727.
[43]
Lin Chen, Jiayi Lian, Yuchen Mao, and Guochuan Zhang. A nearly quadratic-time FPTAS for knapsack. In Proceedings of the 56th ACM Symposium on Theory of Computing (STOC), pages 283–294, 2024. https://doi.org/10.1137/24M1686772.
[44]
Karl Bringmann, Nick Fischer, and Vasileios Nakos. Beating Bellman’s algorithm for subset sum. In Proceedings of the 36th ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 4596–4612. SIAM, 2025. https://doi.org/10.1137/1.9781611978322.157.
[45]
Ce Jin. Exploiting Additive Structure in Algorithm Design and Fine-Grained Complexity. PhD thesis, Massachusetts Institute of Technology, 2025.
[46]
Ce Jin. Memory reallocation with polylogarithmic overhead. arXiv, 2026. https://doi.org/10.48550/arXiv.2602.15417.
[47]
Karl Bringmann. Knapsack with small items in near-quadratic time. In Proceedings of the 56th ACM Symposium on Theory of Computing (STOC), pages 259–270, 2024. https://doi.org/10.1145/3618260.3649719.
[48]
Ce Jin. 0-1 knapsack in nearly quadratic time. In Proceedings of the 56th ACM Symposium on Theory of Computing (STOC), pages 271–282, 2024. https://doi.org/10.1145/3618260.3649618.
[49]
Karl Bringmann and Vasileios Nakos. . In Proceedings of 48th International Colloquium on Automata, Languages, and Programming (ICALP 2021), pages 41:1–41:17, 2021. https://doi.org/10.4230/LIPIcs.ICALP.2021.41.
[50]
Lin Chen, Yuchen Mao, and Guochuan Zhang. Long arithmetic progressions in sumsets and subset sums: Constructive proofs and efficient witnesses. In Proceedings of the 57th Annual ACM Symposium on Theory of Computing (STOC), pages 2086–2097, 2025. https://doi.org/10.1145/3717823.3718281.
[51]
Terence Tao and Van H. Vu. Additive Combinatorics. Cambridge University Press, 2006. https://doi.org/10.1017/CBO9780511755149.
[52]
C. Hermite. Sur l’introduction des variables continues dans la théorie des nombres. J. Reine Angew. Math., 1851(41):191–216, 1851. https://doi.org/10.1515/crll.1851.41.191.
[53]
Ralph Tyrrell Rockafellar. Convex Analysis. Princeton University Press, 1972. https://doi.org/10.1515/9781400873173.
[54]
P. Erdős and A. Sárközy. Arithmetic progressions in subset sums. Discrete Mathematics, 102(3):249–264, 1992. https://doi.org/10.1016/0012-365X(92)90119-Z.
[55]
E. Szemerédi and V. Vu. Long arithmetic progressions in sumsets: Thresholds and bounds. Journal of the American Mathematical Society, 19(1):119–169, 2006. https://doi.org/10.1090/S0894-0347-05-00502-3.
[56]
Alexander Schrijver. Theory of Linear and Integer Programming. WILEY, 1986. https://doi.org/10.1137/1030065.
[57]
Karl Bringmann, Nick Fischer, and Vasileios Nakos. Deterministic and Las Vegas algorithms for sparse nonnegative convolution. In Proceedings of the 33rd ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 3069–3090. SIAM, 2022. https://doi.org/10.1137/1.9781611977073.119.
[58]
Roger C Baker, Glyn Harman, and János Pintz. The difference between consecutive primes, ii. Proceedings of the London Mathematical Society, 83(3):532–562, 2001.

  1. {linchen198662,tingweihu,maoyc,zgc}zju.edu.cn?. Zhejiang University.↩︎

  2. Points and vectors are used interchangeably in this paper.↩︎

  3. Throughout this paper, \(\widetilde{\Omega}(f)\), \(\widetilde{O}(f)\) hide poly-logarithmic factors in \(f\), \(n\), \(N\), and \(d\).↩︎