Figure 10.
the size of the weights and on a concentration bound for signed subset sums. Finally, the solver is read inside a general theory of constraint propagation, in which every network factors as T = T c o m p ∘ T s t r u c t T = T_{\mathrm{comp}} \circ T_{\mathrm{struct}} T = T comp ∘ T struct .
Introduction
Two questions can be asked about the subset sums of a set of positive integers: whether a target is reached, and how many times. For the primes the answers live at very different depths.
The floor. Let W N = { 1 } ∪ { p ≤ N } W_N = \{1\} \cup\{p \le N\} W N = { 1 } ∪ { p ≤ N } . Ordered increasingly, each weight is at most one more than the sum of the previous ones, because p k + 1 < 2 p k p_{k+1} < 2p_k p k + 1 < 2 p k (Bertrand’s postulate). A set with this property is complete: its subset sums are all the integers from 0 to its total (§ 3 ). For the primes the decision problem is therefore trivial, and it rests on the prime number theorem at its weakest.
The ceiling. The number r N ( T ) r_N(T) r N ( T ) of subsets with sum T T T is the coefficient of z T z^T z T in F N ( z ) = ∏ w ∈ W N ( 1 + z w ) F_N(z) = \prod_{w \in W_N}(1+z^w) F N ( z ) = ∏ w ∈ W N ( 1 + z w ) . Near z = 1 z = 1 z = 1 the product gives a Gaussian; this is the local limit theorem, and in the bulk it already determines r N ( T ) r_N(T) r N ( T ) to great accuracy (§ 4.8 ). Away from z = 1 z = 1 z = 1 the product is small, but its size along the arcs at the rationals a / q a/q a / q is not random. Each factor has modulus 2 ∣ cos ( π w a / q ) ∣ 2|\cos(\pi wa/q)| 2∣ cos ( π w a / q ) ∣ , so log ∣ F N ( e ( a / q ) ) ∣ \log|F_N(e(a/q))| log ∣ F N ( e ( a / q )) ∣ is a sum over the primes of a function of p p p mod q q q : a prime race. The question of this paper is what the arcs know about the primes, and what they can do when the weights are not primes.
The thread. The paper follows one object, the arc, through three settings.
In §2–3 the weights are the primes. We determine which arcs rise above the sea of the minor arcs (Lemma 1 ), bound the neighbourhoods of all arcs uniformly in q q q (Lemmas P and Q), and state the arc expansion arc by arc (Theorem E ).
In §4 we read the height of an arc as a prime race. Under two conditions on the characters it sees, ( R ) (R) ( R ) and ( N ) (N) ( N ) , a one-sided bound on it is equivalent to GRH for them (Proposition 3 ); both conditions are verified for q = 8 , 10 , 14 q = 8, 10, 14 q = 8 , 10 , 14 . The principal arc carries ζ \zeta ζ (Proposition 30 ). They are reformulations of the Knapowski–Turán type, in which the hypothesis becomes a statement about counting subsets.
In §5–6 the weights are arbitrary. The floor fails, the dummies of HURS restore it, and the arcs, once the dummies are removed exactly, which makes them unnecessary in the solver, become the decision rule of a Subset Sum solver. We give its cost law, its benchmarks, and the rigorous form of its guarantees on random and on dense instances.
The arc, seen from far enough, is propagation on a quotient. In §7 we develop the general theory of constraint propagation behind the algorithm: a structural part (equalities with parity, functional definitions on a complete DAG) solved in one pass, a computational part iterated to a fixpoint, the convergence of the full operator, and definitional variables that make implicit links evaluable. In §8 we read the solver of §5 inside it.
Why it matters. Prime races and Subset Sum have so far been separate subjects. The first belongs to analytic number theory (Chebyshev’s bias, Knapowski–Turán, Rubinstein–Sarnak); the second is a classical NP-complete problem whose algorithms are combinatorial. The arcs join them. Counting subsets of the primes is a circle-method problem in which every arc is a prime race, so a hypothesis about the zeros of Dirichlet L L L -functions becomes a statement about how many subsets of primes have a given sum, and the selection rule q = 2 k q = 2^k q = 2 k , 2 p j 2p^j 2 p j with excess Λ ( q / 2 ) / ϕ ( q ) \Lambda(q/2)/\phi(q) Λ ( q /2 ) / ϕ ( q ) is read off a cyclotomic value. In the other direction, the same arcs, read on arbitrary weights, are a working decision rule: they find the congruence obstructions that the structure theorem of dense Subset Sum predicts, and they steer a solver on instances where a dynamic-programming table is out of reach. The bridge is a dictionary, and both sides of it are proved.
§9 places the results in the literature and states their scope.
Notation. e ( x ) = e 2 π i x e(x) = e^{2\pi i x} e ( x ) = e 2 π i x ; Λ \Lambda Λ is von Mangoldt’s function; ϕ \phi ϕ is Euler’s function; Φ q \Phi_q Φ q is the q q q -th cyclotomic polynomial; π ( N , χ ) = ∑ p ≤ N χ ( p ) \pi(N,\chi) = \sum_{p\le N}\chi(p) π ( N , χ ) = ∑ p ≤ N χ ( p ) ; li x = ∫ 2 x d t log t + li 2 \operatorname{li}x = \int_2^x \frac{dt}{\log t}+\operatorname{li}2 li x = ∫ 2 x l o g t d t + li 2 . Constants C C C are absolute unless indexed.
Map of the results.
Table 12.
The floor: completeness and linear search
Define the omicron of a set of positive integers w 1 ≤ w 2 ≤ ⋯ ≤ w n w_1 \le w_2 \le\cdots\le w_n w 1 ≤ w 2 ≤ ⋯ ≤ w n as o = max k w k + 1 / ( 1 + ∑ i ≤ k w i ) o = \max_k w_{k+1}/(1+\sum_{i\le k} w_i) o = max k w k + 1 / ( 1 + ∑ i ≤ k w i ) .
Lemma 2.1 (gap filling; Brown). Let w 1 ≤ w 2 ≤ ⋯ ≤ w n w_1 \le w_2 \le\cdots\le w_n w 1 ≤ w 2 ≤ ⋯ ≤ w n be positive integers and S k = ∑ i ≤ k w i S_k = \sum_{i\le k}w_i S k = ∑ i ≤ k w i , S 0 = 0 S_0 = 0 S 0 = 0 . Every integer 0 ≤ T ≤ S n 0 \le T \le S_n 0 ≤ T ≤ S n is a subset sum if and only if w k + 1 ≤ 1 + S k w_{k+1} \le1+S_k w k + 1 ≤ 1 + S k for every 0 ≤ k < n 0 \le k < n 0 ≤ k < n , that is, if and only if o ≤ 1 o \le1 o ≤ 1 [Brown]. Since o ≥ w 1 ≥ 1 o \ge w_1 \ge1 o ≥ w 1 ≥ 1 , the condition reads o = 1 o = 1 o = 1 . For W N W_N W N it holds by Bertrand’s postulate.
Proof. If the condition holds, the subset sums of the first k k k weights fill [ 0 , S k ] [0,S_k] [ 0 , S k ] by induction, and adding w k + 1 ≤ S k + 1 w_{k+1} \le S_k+1 w k + 1 ≤ S k + 1 fills [ 0 , S k + 1 ] [0,S_{k+1}] [ 0 , S k + 1 ] . Conversely, if w k + 1 > 1 + S k w_{k+1} > 1+S_k w k + 1 > 1 + S k for some k k k , the integer S k + 1 ≤ S n S_k+1 \le S_n S k + 1 ≤ S n is not a subset sum: the subsets of the first k k k weights sum to at most S k S_k S k , and every other subset contains a weight w j ≥ w k + 1 > S k + 1 w_j \ge w_{k+1} > S_k+1 w j ≥ w k + 1 > S k + 1 . □
Linear search. Scan the weights downwards and take w k w_k w k whenever w k ≤ T r e m w_k \le T_{\mathrm{rem}} w k ≤ T rem . Before w k w_k w k is examined, T r e m ≤ ∑ i ≤ k w i T_{\mathrm{rem}} \le\sum_{i\le k} w_i T rem ≤ ∑ i ≤ k w i . If T r e m ≥ w k T_{\mathrm{rem}} \ge w_k T rem ≥ w k , it is taken and T r e m − w k ≤ ∑ i < k w i T_{\mathrm{rem}}-w_k \le\sum_{i<k}w_i T rem − w k ≤ ∑ i < k w i . Otherwise T r e m ≤ w k − 1 ≤ ∑ i < k w i T_{\mathrm{rem}} \le w_k-1 \le\sum_{i<k}w_i T rem ≤ w k − 1 ≤ ∑ i < k w i by completeness. The scan ends at T r e m = 0 T_{\mathrm{rem}}=0 T rem = 0 . Decision is always “yes”, and search costs O ( n ) O(n) O ( n ) after the sieve. Two more facts complete the floor: r N ( T ) ≥ 1 r_N(T) \ge1 r N ( T ) ≥ 1 for 0 ≤ T ≤ S N 0 \le T \le S_N 0 ≤ T ≤ S N , and r N ( T ) = r N ( S N − T ) r_N(T) = r_N(S_N-T) r N ( T ) = r N ( S N − T ) by complementation.
Proposition 2.3 (the primes without the weight 1). Let P N = { p ≤ N } P_N=\{p\le N\} P N = { p ≤ N } and Σ N = ∑ p ≤ N p = S N − 1 \Sigma_N=\sum_{p\le N}p=S_N-1 Σ N = ∑ p ≤ N p = S N − 1 . For N ≥ 5 N\ge5 N ≥ 5 the subset sums of P N P_N P N are exactly
[ 0 , Σ N ] ∖ { 1 , 4 , 6 , Σ N − 6 , Σ N − 4 , Σ N − 1 } ; [0,\Sigma_N]\setminus\{1,4,6,\Sigma_N-6,\Sigma_N-4,\Sigma_N-1\}; [ 0 , Σ N ] ∖ { 1 , 4 , 6 , Σ N − 6 , Σ N − 4 , Σ N − 1 } ; for N = 2 N=2 N = 2 and N = 3 N=3 N = 3 the missing values in [ 0 , Σ N ] [0,\Sigma_N] [ 0 , Σ N ] are { 1 } \{1\} { 1 } and { 1 , 4 } \{1,4\} { 1 , 4 } . For N ≥ 7 N\ge7 N ≥ 7 the reachable set has 7 maximal intervals: { 0 } \{0\} { 0 } , [ 2 , 3 ] [2,3] [ 2 , 3 ] , { 5 } \{5\} { 5 } , [ 7 , Σ N − 7 ] [7,\Sigma_N-7] [ 7 , Σ N − 7 ] , { Σ N − 5 } \{\Sigma_N-5\} { Σ N − 5 } , [ Σ N − 3 , Σ N − 2 ] [\Sigma_N-3,\Sigma_N-2] [ Σ N − 3 , Σ N − 2 ] , { Σ N } \{\Sigma_N\} { Σ N } .
Proof. For N = 5 , 7 , 11 N=5,7,11 N = 5 , 7 , 11 the statement is checked directly (Σ = 10 , 17 , 28 \Sigma=10,17,28 Σ = 10 , 17 , 28 ). Write p n p_n p n for the n-th prime, Σ n = ∑ k ≤ n p k \Sigma_n=\sum_{k\le n}p_k Σ n = ∑ k ≤ n p k , H = { 1 , 4 , 6 } H=\{1,4,6\} H = { 1 , 4 , 6 } , and let R n R_n R n be the subset sums of { p 1 , … , p n } \{p_1,\ldots,p_n\} { p 1 , … , p n } . Suppose R n = [ 0 , Σ n ] ∖ ( H ∪ ( Σ n − H ) ) R_n=[0,\Sigma_n]\setminus(H\cup(\Sigma_n-H)) R n = [ 0 , Σ n ] ∖ ( H ∪ ( Σ n − H )) and 7 ≤ p = p n + 1 ≤ Σ n − 13 7\le p=p_{n+1}\le\Sigma_n-13 7 ≤ p = p n + 1 ≤ Σ n − 13 . Then R n + 1 = R n ∪ ( R n + p ) R_{n+1}=R_n\cup(R_n+p) R n + 1 = R n ∪ ( R n + p ) , and:
below 7 only R n R_n R n contributes, since R n + p ≥ p ≥ 7 R_n+p\ge p\ge7 R n + p ≥ p ≥ 7 , so 1, 4, 6 stay missing and 0, 2, 3, 5 stay reached;
for j ∈ H j\in H j ∈ H , Σ n − j − p \Sigma_n-j-p Σ n − j − p lies in [ 7 , Σ n − 7 ] [7,\Sigma_n-7] [ 7 , Σ n − 7 ] , because 7 − j ≤ p ≤ Σ n − j − 7 7-j\le p\le\Sigma_n-j-7 7 − j ≤ p ≤ Σ n − j − 7 ; so Σ n − j ∈ R n + p \Sigma_n-j\in R_n+p Σ n − j ∈ R n + p , and the top holes of R n R_n R n are filled;
for Σ n < x ≤ Σ n + p \Sigma_n<x\le\Sigma_n+p Σ n < x ≤ Σ n + p , x ∈ R n + 1 x\in R_{n+1} x ∈ R n + 1 if and only if y = x − p ∈ R n y=x-p\in R_n y = x − p ∈ R n ; here y > Σ n − p ≥ 13 y>\Sigma_n-p\ge13 y > Σ n − p ≥ 13 , so y ∉ H y\notin H y ∈ / H , and y ∉ R n y\notin R_n y ∈ / R n exactly when y ∈ Σ n − H y\in\Sigma_n-H y ∈ Σ n − H , that is x ∈ Σ n + 1 − H x\in\Sigma_{n+1}-H x ∈ Σ n + 1 − H .
Hence R n + 1 = [ 0 , Σ n + 1 ] ∖ ( H ∪ ( Σ n + 1 − H ) ) R_{n+1}=[0,\Sigma_{n+1}]\setminus\left(H\cup(\Sigma_{n+1}-H)\right) R n + 1 = [ 0 , Σ n + 1 ] ∖ ( H ∪ ( Σ n + 1 − H ) ) . The hypothesis on p p p holds for every n ≥ 5 n\ge5 n ≥ 5 . Put D n = Σ n − 1 − p n D_n=\Sigma_{n-1}-p_n D n = Σ n − 1 − p n . By Bertrand’s postulate D n + 1 = Σ n − p n + 1 > Σ n − 2 p n = D n D_{n+1}=\Sigma_n-p_{n+1}>\Sigma_n-2p_n=D_n D n + 1 = Σ n − p n + 1 > Σ n − 2 p n = D n , so D D D is increasing, and D 6 = Σ 5 − p 6 = 28 − 13 = 15 ≥ 13 D_6=\Sigma_5-p_6=28-13=15\ge13 D 6 = Σ 5 − p 6 = 28 − 13 = 15 ≥ 13 ; the lower bound is p n + 1 ≥ 13 p_{n+1}\ge13 p n + 1 ≥ 13 . The induction therefore runs from N = 11 N=11 N = 11 to every N N N . □
The proposition was also checked directly for every N < 2 ⋅ 10 4 N<2\cdot10^4 N < 2 ⋅ 1 0 4 . It gives Richert’s theorem [Richert], that every integer greater than 6 is a sum of distinct primes, by taking N N N with Σ N ≥ m + 7 \Sigma_N\ge m+7 Σ N ≥ m + 7 ; and it shows what the weight 1 does in W N W_N W N : the six missing values are 1 and its translates 4 = 3 + 1 4=3+1 4 = 3 + 1 , 6 = 5 + 1 6=5+1 6 = 5 + 1 and their complements, so the floor of the primes needs the 1 exactly to close these six holes.
Remark 2.4 (interval representation). The reachable sets obey R k + 1 = R k ∪ ( R k + w k + 1 ) R_{k+1}=R_k\cup(R_k+w_{k+1}) R k + 1 = R k ∪ ( R k + w k + 1 ) . The subsets of Z \mathbb{Z} Z , with union as addition and the Minkowski sum A + B A+B A + B as multiplication, form a commutative idempotent semiring, the Boolean group semiring B [ Z ] \mathbb{B}[\mathbb{Z}] B [ Z ] , with zero ∅ \varnothing ∅ and unit { 0 } \{0\} { 0 } ; translation by w w w is multiplication by { w } \{w\} { w } , and R n = ∏ k ( { 0 } ⊕ { w k } ) R_n=\prod_k(\{0\}\oplus\{w_k\}) R n = ∏ k ({ 0 } ⊕ { w k }) is the Boolean shadow of F W ( z ) = ∏ k ( 1 + z w k ) F_W(z)=\prod_k(1+z^{w_k}) F W ( z ) = ∏ k ( 1 + z w k ) . The reachable sets form a semimodule over this semiring; the structure is not tropical, since ⊕ \oplus ⊕ is union and not a minimum. Storing R k R_k R k as its K k K_k K k maximal intervals, a step costs O ( K k ) O(K_k) O ( K k ) , with K k ≤ min ( 2 k , S k + 1 ) K_k\le\min(2^k,S_k+1) K k ≤ min ( 2 k , S k + 1 ) . K = 1 K=1 K = 1 exactly for complete weights (Lemma 2.1), K = 7 K=7 K = 7 for the primes alone with N ≥ 7 N\ge7 N ≥ 7 (Proposition 2.3), and K = 1 K=1 K = 1 for the dummy-augmented sets of §5.4 by construction. The last case says nothing about the original weights, which is why the dummies must be removed exactly.
The floor is blind to the zeros of ζ \zeta ζ . A zero off the critical line would shift the gaps between primes by far less than Bertrand’s margin, and completeness would survive. What the zeros change is the count, and to see them one has to look at F N F_N F N on the circle.
The arcs of the prime product
Factors that vanish, and the Fourier coefficients of the count
For a rational a / q a/q a / q with ( a , q ) = 1 (a,q)=1 ( a , q ) = 1 and q ≥ 3 q\ge3 q ≥ 3 , the factors of F N ( e ( a / q ) ) F_N(e(a/q)) F N ( e ( a / q )) are 1 + e ( w a / q ) 1+e(wa/q) 1 + e ( w a / q ) , of modulus 2 ∣ cos ( π w a / q ) ∣ 2\lvert\cos(\pi wa/q)\rvert 2 ∣ cos ( π w a / q )∣ . A factor vanishes exactly when w ≡ q / 2 ( m o d q ) w\equiv q/2\pmod q w ≡ q /2 ( mod q ) ; for q ≥ 3 q\ge3 q ≥ 3 and w ∈ W N w\in W_N w ∈ W N this forces q q q even and w = q / 2 w=q/2 w = q /2 (an odd multiple of q / 2 q/2 q /2 larger than q / 2 q/2 q /2 is not a prime). So it happens for q = 4 q=4 q = 4 (w = 2 w=2 w = 2 ) and q = 2 p q=2p q = 2 p (w = p w=p w = p ). Let V ( a / q ) \mathcal{V}(a/q) V ( a / q ) be the set of weights whose factor vanishes (at most one weight) and F N ∗ ( a / q ) F_N^*(a/q) F N ∗ ( a / q ) the product of the other factors. The arc at q = 2 q=2 q = 2 , where every odd weight vanishes, is excluded throughout.
Remark 3.1 (the amplitudes are Fourier coefficients of the count). Since F N F_N F N is a polynomial,
F N ( e ( a / q ) ) = ∑ T = 0 S N r N ( T ) e ( T a / q ) F_N(e(a/q))=\sum_{T=0}^{S_N}r_N(T)e(Ta/q) F N ( e ( a / q )) = T = 0 ∑ S N r N ( T ) e ( T a / q )
exactly.
If V ( a / q ) = { w } \mathcal{V}(a/q)=\{w\} V ( a / q ) = { w } with w = q / 2 w=q/2 w = q /2 , then F N ( e ( a / q ) ) = 0 F_N(e(a/q))=0 F N ( e ( a / q )) = 0 , and the amplitude is a coefficient of the first moment. Differentiating F N = ( 1 + z w ) F N ∗ F_N=(1+z^w)F_N^* F N = ( 1 + z w ) F N ∗ at ζ = e ( a / q ) \zeta=e(a/q) ζ = e ( a / q ) , where ζ w = − 1 \zeta^w=-1 ζ w = − 1 , gives ζ F N ′ ( ζ ) = − w F N ∗ ( ζ ) \zeta F_N'(\zeta)=-wF_N^*(\zeta) ζ F N ′ ( ζ ) = − w F N ∗ ( ζ ) , that is
F N ∗ ( a / q ) = − 1 w ∑ T T r N ( T ) e ( T a / q ) . F_N^*(a/q)=-\frac{1}{w}\sum_T T r_N(T)e(Ta/q). F N ∗ ( a / q ) = − w 1 T ∑ T r N ( T ) e ( T a / q ) .
Equivalently, F N ∗ ( a / q ) F_N^*(a/q) F N ∗ ( a / q ) is the Fourier coefficient of the count of W N ∖ { w } W_N\setminus\{w\} W N ∖ { w } .
So every arc amplitude is an exact Fourier coefficient: of r N ( T ) r_N(T) r N ( T ) when no factor vanishes, of T ⋅ r N ( T ) T\cdot r_N(T) T ⋅ r N ( T ) when one does. Grouping T T T by its class mod q q q , the coefficient is a discrete Fourier transform mod q q q of the residue distribution of the prime subset sums, or of its first moment. Proposition 3 below is a statement about these coefficients and does not depend on the arc expansion of §3.5.
Which arcs emerge
Lemma 1. For q ≥ 3 q\ge3 q ≥ 3 and ( a , q ) = 1 (a,q)=1 ( a , q ) = 1 let w ˉ ( q ) = φ ( q ) − 1 ∑ ( r , q ) = 1 log ∣ cos ( π r a / q ) ∣ \bar{w}(q)=\varphi(q)^{-1}\sum_{(r,q)=1}\log|\cos(\pi ra/q)| w ˉ ( q ) = φ ( q ) − 1 ∑ ( r , q ) = 1 log ∣ cos ( π r a / q ) ∣ . Then w ˉ ( q ) \bar{w}(q) w ˉ ( q ) does not depend on a a a , and
w ˉ ( q ) = { − log 2 , q odd , − log 2 + Λ ( q / 2 ) / φ ( q ) , q even . \bar{w}(q)=
\begin{cases}
-\log2, & q\ \text{odd},\\
-\log2+\Lambda(q/2)/\varphi(q), & q\ \text{even}.
\end{cases} w ˉ ( q ) = { − log 2 , − log 2 + Λ ( q /2 ) / φ ( q ) , q odd , q even .
Proof. Multiplication by a a a permutes the residues prime to q q q . Since ∣ 1 + e ( r / q ) ∣ = 2 ∣ cos ( π r / q ) ∣ |1+e(r/q)|=2|\cos(\pi r/q)| ∣1 + e ( r / q ) ∣ = 2∣ cos ( π r / q ) ∣ , ∑ ( r , q ) = 1 log ∣ 2 cos ( π r / q ) ∣ = log ∣ ∏ ( 1 + ζ q r ) ∣ = log ∣ Φ q ( − 1 ) ∣ \sum_{(r,q)=1}\log|2\cos(\pi r/q)|=\log|\prod(1+\zeta_q^r)|=\log|\Phi_q(-1)| ∑ ( r , q ) = 1 log ∣2 cos ( π r / q ) ∣ = log ∣ ∏ ( 1 + ζ q r ) ∣ = log ∣ Φ q ( − 1 ) ∣ . For q > 2 q>2 q > 2 , Φ q ( − 1 ) = p \Phi_q(-1)=p Φ q ( − 1 ) = p if q = 2 p j q=2p^j q = 2 p j with p p p prime (p = 2 p=2 p = 2 allowed) and Φ q ( − 1 ) = 1 \Phi_q(-1)=1 Φ q ( − 1 ) = 1 otherwise [BHM, Lemma 7], so log ∣ Φ q ( − 1 ) ∣ = Λ ( q / 2 ) \log|\Phi_q(-1)|=\Lambda(q/2) log ∣ Φ q ( − 1 ) ∣ = Λ ( q /2 ) for q q q even and 0 0 0 for q q q odd.
The lemma rests on classical facts about cyclotomic values; the reading as a level of the arcs is ours. It was checked against direct computation for every 3 ≤ q < 400 3\le q<400 3 ≤ q < 400 .
The sea. For almost every θ \theta θ , ( 1 / π ( N ) ) ∑ p ≤ N log ∣ cos ( π p θ ) ∣ → ∫ 0 1 log ∣ cos π x ∣ d x = − log 2 (1/\pi(N))\sum_{p\le N}\log|\cos(\pi p\theta)|\to\int_0^1\log|\cos\pi x|\,dx=-\log2 ( 1/ π ( N )) ∑ p ≤ N log ∣ cos ( π pθ ) ∣ → ∫ 0 1 log ∣ cos π x ∣ d x = − log 2 , by the equidistribution of p θ p\theta pθ mod 1 [Vinogradov] together with a Borel–Cantelli control of the logarithmic singularity. This is the level of the minor arcs. By Lemma 1 the centre of the arc a / q a/q a / q rises above it, w ˉ ( q ) > − log 2 \bar{w}(q)>-\log2 w ˉ ( q ) > − log 2 , if and only if q = 2 k q=2^k q = 2 k with k ≥ 2 k\ge2 k ≥ 2 or q = 2 p j q=2p^j q = 2 p j with p p p an odd prime. We call these q q q , together with q = 1 q=1 q = 1 , the emerging moduli , E \mathcal{E} E . The von Mangoldt function of q / 2 q/2 q /2 decides which arcs emerge.
Up to O q ( 1 ) O_q(1) O q ( 1 ) from the weights 1 and p ∣ q p\mid q p ∣ q ,
log ∣ F N ∗ ( a / q ) ∣ = π ( N ) ( log 2 + w ˉ ( q ) ) + H a / q ( N ) + O q ( 1 ) , H a / q ( N ) = ∑ p ≤ N p ∤ q c p ( m o d q ) , \log|F_N^*(a/q)|=\pi(N)\bigl(\log2+\bar{w}(q)\bigr)+H_{a/q}(N)+O_q(1),\qquad H_{a/q}(N)=\sum_{\substack{p\le N\\p\nmid q}}c_p\pmod q, log ∣ F N ∗ ( a / q ) ∣ = π ( N ) ( log 2 + w ˉ ( q ) ) + H a / q ( N ) + O q ( 1 ) , H a / q ( N ) = p ≤ N p ∤ q ∑ c p ( mod q ) ,
with c r = log ∣ cos ( π r a / q ) ∣ − w ˉ ( q ) c_r=\log|\cos(\pi ra/q)|-\bar{w}(q) c r = log ∣ cos ( π r a / q ) ∣ − w ˉ ( q ) . The height H a / q H_{a/q} H a / q is a race of the primes modulo q q q with weights c r c_r c r , and ∑ r c r = 0 \sum_r c_r=0 ∑ r c r = 0 .
Figure 1 (PDF p. 7) shows the levels at N = 2000 N = 2000 N = 2000 : the arcs with q ∈ E q \in\mathcal{E} q ∈ E rise to the level of Lemma 1, and all the other arcs stay at the level of the sea.
Figure 1 (PDF p. 7). The arcs of the prime product at N = 2000 N = 2000 N = 2000 (304 weights). Grey: the per-weight excess over the sea, ( 1 / ∣ W N ∣ ) ∑ w log ∣ 2 cos ( π w θ ) ∣ (1/|W_N|)\sum_w \log|2\cos(\pi w\theta)| ( 1/∣ W N ∣ ) ∑ w log ∣2 cos ( π w θ ) ∣ , on a grid of θ ∈ ( 0 , 1 2 ] \theta\in(0,\frac{1}{2}] θ ∈ ( 0 , 2 1 ] ; it fluctuates around 0. Dots: the same quantity at θ = a / q \theta= a/q θ = a / q , q ≤ 40 q \le40 q ≤ 40 , with the vanishing factor removed. The arcs with q = 2 k q = 2^k q = 2 k or 2 p j 2p^j 2 p j (blue) rise to the level Λ ( q / 2 ) / φ ( q ) \Lambda(q/2)/\varphi(q) Λ ( q /2 ) / φ ( q ) of Lemma 1 (ticks); the other arcs (orange) stay at the level of the sea. The largest deviation from Lemma 1 is 0.048, the term O q ( 1 ) O_q(1) O q ( 1 ) and the height divided by 304.
Neighbourhoods of the arcs: the lobes
Near an arc the level changes. For q ≥ 1 q \ge1 q ≥ 1 and X ≥ 0 X \ge0 X ≥ 0 define the neighbourhood level
A q ( X ) = 1 X ∫ 0 X log ∣ Φ q ( − e ( x ) ) ∣ d x ( A q ( 0 ) = log ∣ Φ q ( − 1 ) ∣ ) . A_q(X) = \frac{1}{X}\int_0^X \log|\Phi_q(-e(x))|\,dx \qquad(A_q(0) = \log|\Phi_q(-1)|). A q ( X ) = X 1 ∫ 0 X log ∣ Φ q ( − e ( x )) ∣ d x ( A q ( 0 ) = log ∣ Φ q ( − 1 ) ∣ ) .
By the identity ∏ ( r , q ) = 1 ( 1 + ζ q r y ) = Φ q ( − y ) \prod_{(r,q)=1}(1+\zeta_q^r y)=\Phi_q(-y) ∏ ( r , q ) = 1 ( 1 + ζ q r y ) = Φ q ( − y ) , A q ( X ) / φ ( q ) A_q(X)/\varphi(q) A q ( X ) / φ ( q ) is the average excess over the sea, per prime, of ∑ p log ∣ 2 cos ( π ( p a / q + p β ) ) ∣ \sum_p \log|2\cos(\pi(pa/q+p\beta))| ∑ p log ∣2 cos ( π ( p a / q + pβ )) ∣ at β = X / N \beta= X/N β = X / N (Lemma L below). The core level is c q = A q ( 0 ) / φ ( q ) c_q=A_q(0)/\varphi(q) c q = A q ( 0 ) / φ ( q ) : log 2 \log2 log 2 for q = 1 q=1 q = 1 , Λ ( q / 2 ) / φ ( q ) \Lambda(q/2)/\varphi(q) Λ ( q /2 ) / φ ( q ) for q q q even, 0 for q q q odd ≥ 3 \ge3 ≥ 3 . The lobe level is ℓ q = sup { A q ( X ) / φ ( q ) : X ≥ X q } \ell_q=\sup\{A_q(X)/\varphi(q):X\ge X_q\} ℓ q = sup { A q ( X ) / φ ( q ) : X ≥ X q } , where X q X_q X q is the first local minimum of A q A_q A q , when A q A_q A q has one. We also use ℓ q ∗ = sup { A q ( X ) / φ ( q ) : X ≥ 1 / ( 2 q ) } \ell_q^*=\sup\{A_q(X)/\varphi(q):X\ge1/(2q)\} ℓ q ∗ = sup { A q ( X ) / φ ( q ) : X ≥ 1/ ( 2 q )} , which needs no X q X_q X q .
Table 17.
Table 1 (PDF p. 8). Core and lobe levels (exact integrals of log ∣ Φ q ∣ \log|\Phi_q| log ∣ Φ q ∣ ).
Figure 2. The neighbourhood of an arc. Blue: the per-prime excess at θ = a / q + X / N \theta= a/q + X/N θ = a / q + X / N , for the primes up to N = 2 ⋅ 10 5 N = 2 \cdot10^5 N = 2 ⋅ 1 0 5 . Dashed: the neighbourhood level A q ( X ) / φ ( q ) A_q(X)/\varphi(q) A q ( X ) / φ ( q ) , the prediction of Lemma L (§ 4.6 ). (a) The emerging arc 1 / 6 1/6 1/6 , with core level 0.549 0.549 0.549 . (b) The non-emerging arc 1 / 3 1/3 1/3 , with core level 0 0 0 and the largest lobe, ℓ 3 = 0.1316 \ell_3 = 0.1316 ℓ 3 = 0.1316 at X ≈ 0.73 X \approx0.73 X ≈ 0.73 (Table 1, Corollary Q′).
Lemma P (maximum principle for emerging arcs). For every emerging q ≥ 4 q \ge4 q ≥ 4 , x ↦ ∣ Φ q ( − e ( x ) ) ∣ x \mapsto|\Phi_q(-e(x))| x ↦ ∣ Φ q ( − e ( x )) ∣ attains its maximum Φ q ( − 1 ) = e Λ ( q / 2 ) \Phi_q(-1) = e^{\Lambda(q/2)} Φ q ( − 1 ) = e Λ ( q /2 ) at x = 0 x = 0 x = 0 , and only on a finite set of points per period. Hence A q ( X ) < Λ ( q / 2 ) A_q(X) < \Lambda(q/2) A q ( X ) < Λ ( q /2 ) for X > 0 X > 0 X > 0 , and ℓ q < c q \ell_q < c_q ℓ q < c q .
Proof. With y = − e ( x ) y = -e(x) y = − e ( x ) and Φ q ( z ) = ∏ d ∣ q ( z d − 1 ) μ ( q / d ) \Phi_q(z) = \prod_{d\mid q}(z^d - 1)^{\mu(q/d)} Φ q ( z ) = ∏ d ∣ q ( z d − 1 ) μ ( q / d ) :
q = 2 k q = 2^k q = 2 k , k ≥ 2 k \ge2 k ≥ 2 : Φ q ( z ) = z q / 2 + 1 \Phi_q(z) = z^{q/2} + 1 Φ q ( z ) = z q /2 + 1 and ∣ Φ q ( y ) ∣ = 2 ∣ cos ( π q x / 2 ) ∣ ≤ 2 |\Phi_q(y)| = 2|\cos(\pi qx/2)| \le2 ∣ Φ q ( y ) ∣ = 2∣ cos ( π q x /2 ) ∣ ≤ 2 ;
q = 2 p j q = 2p^j q = 2 p j , p p p odd: only d ∈ { q , q / 2 , q / p , q / ( 2 p ) } d \in\{q,q/2,q/p,q/(2p)\} d ∈ { q , q /2 , q / p , q / ( 2 p )} contribute, and ∣ Φ q ( − e ( x ) ) ∣ = ∣ sin p θ / sin θ ∣ |\Phi_q(-e(x))| = |\sin p\theta/\sin\theta| ∣ Φ q ( − e ( x )) ∣ = ∣ sin pθ / sin θ ∣ with θ = π p j − 1 x \theta= \pi p^{j-1}x θ = π p j − 1 x , a Dirichlet kernel bounded by p p p .
In both cases log ∣ Φ q ( − e ( x ) ) ∣ ≤ Λ ( q / 2 ) \log|\Phi_q(-e(x))| \le\Lambda(q/2) log ∣ Φ q ( − e ( x )) ∣ ≤ Λ ( q /2 ) with equality on a null set. By Jensen’s formula its mean over a period is 0 0 0 , so A q ( X ) → 0 A_q(X) \to0 A q ( X ) → 0 and the supremum over X ≥ X q X \ge X_q X ≥ X q is attained and strictly below Λ ( q / 2 ) \Lambda(q/2) Λ ( q /2 ) . □
Lemma Q (lobes of every arc). Let q ≥ 3 q \ge3 q ≥ 3 , h q ( x ) = log ∣ Φ q ( − e ( x ) ) ∣ h_q(x) = \log|\Phi_q(-e(x))| h q ( x ) = log ∣ Φ q ( − e ( x )) ∣ and κ = Cl 2 ( π / 3 ) / π = 0.32307 … \kappa= \operatorname{Cl}_2(\pi/3)/\pi= 0.32307\ldots κ = Cl 2 ( π /3 ) / π = 0.32307 …
h q h_q h q is strictly decreasing on [ 0 , 1 / ( 2 q ) ) [0,1/(2q)) [ 0 , 1/ ( 2 q )) , so A q A_q A q is strictly decreasing on ( 0 , 1 / ( 2 q ) ) (0,1/(2q)) ( 0 , 1/ ( 2 q )) , A q ( X ) < φ ( q ) c q A_q(X) < \varphi(q)c_q A q ( X ) < φ ( q ) c q for 0 < X < 1 / ( 2 q ) 0 < X < 1/(2q) 0 < X < 1/ ( 2 q ) , and X q ≥ 1 / ( 2 q ) X_q \ge1/(2q) X q ≥ 1/ ( 2 q ) .
For every X ≥ 1 / ( 2 q ) X \ge1/(2q) X ≥ 1/ ( 2 q ) ,
A q ( X ) ≤ ∑ μ ( q / d ) = 1 min ( log 2 , κ d X ) + ∑ μ ( q / d ) = − 1 β ( d X ) , β ( L ) = { max ( κ , min ( κ / L , log e 2 L ) ) L ≤ 1 , κ / L L > 1 , A_q(X) \le\sum_{\mu(q/d)=1} \min\left(\log2,\frac{\kappa}{dX}\right)+\sum_{\mu(q/d)=-1}\beta(dX),\qquad
\beta(L)=
\begin{cases}
\max\left(\kappa,\min\left(\kappa/L,\log\frac{e}{2L}\right)\right) & L\le1,\\
\kappa/L & L>1,
\end{cases} A q ( X ) ≤ μ ( q / d ) = 1 ∑ min ( log 2 , d X κ ) + μ ( q / d ) = − 1 ∑ β ( d X ) , β ( L ) = { max ( κ , min ( κ / L , log 2 L e ) ) κ / L L ≤ 1 , L > 1 ,
and the right side is non-increasing in X X X . Writing R q R_q R q for its value at X = 1 / ( 2 q ) X=1/(2q) X = 1/ ( 2 q ) divided by φ ( q ) \varphi(q) φ ( q ) ,
ℓ q ≤ R q ≤ 2 ω ( q ) − 1 ( 1 + log 2 + log rad q ) φ ( q ) ≤ τ ( q ) log ( 2 e q ) 2 φ ( q ) . \ell_q \le R_q \le\frac{2^{\omega(q)-1}(1+\log2+\log\operatorname{rad}q)}{\varphi(q)} \le\frac{\tau(q)\log(2eq)}{2\varphi(q)}. ℓ q ≤ R q ≤ φ ( q ) 2 ω ( q ) − 1 ( 1 + log 2 + log rad q ) ≤ 2 φ ( q ) τ ( q ) log ( 2 e q ) .
For X ≥ 1 X\ge1 X ≥ 1 , A q ( X ) / φ ( q ) ≤ κ τ ( q ) / φ ( q ) A_q(X)/\varphi(q)\le\kappa\tau(q)/\varphi(q) A q ( X ) / φ ( q ) ≤ κ τ ( q ) / φ ( q ) .
Proof.
(1) Pairing r r r with q − r q-r q − r , h q ( x ) = ∑ log ∣ c r + 2 cos 2 π x ∣ h_q(x)=\sum\log|c_r+2\cos2\pi x| h q ( x ) = ∑ log ∣ c r + 2 cos 2 π x ∣ over φ ( q ) / 2 \varphi(q)/2 φ ( q ) /2 pairs, with c r = 2 cos ( 2 π r / q ) ≥ − 2 cos ( π / q ) c_r=2\cos(2\pi r/q)\ge-2\cos(\pi/q) c r = 2 cos ( 2 π r / q ) ≥ − 2 cos ( π / q ) because ∣ 2 r / q − 1 ∣ ≥ 1 / q |2r/q-1|\ge1/q ∣2 r / q − 1∣ ≥ 1/ q . On [ 0 , 1 / ( 2 q ) ) [0,1/(2q)) [ 0 , 1/ ( 2 q )) each term is positive inside the logarithm and strictly decreasing.
(2) By Möbius inversion h q ( x ) = ∑ d ∣ q μ ( q / d ) G ( d x + d / 2 ) h_q(x)=\sum_{d\mid q}\mu(q/d)G(dx+d/2) h q ( x ) = ∑ d ∣ q μ ( q / d ) G ( d x + d /2 ) with G ( u ) = log ∣ 2 sin π u ∣ G(u)=\log|2\sin\pi u| G ( u ) = log ∣2 sin π u ∣ . Since ∫ 0 u G = − Cl 2 ( 2 π u ) / ( 2 π ) \int_0^u G=-\operatorname{Cl}_2(2\pi u)/(2\pi) ∫ 0 u G = − Cl 2 ( 2 π u ) / ( 2 π ) and ∣ Cl 2 ∣ ≤ Cl 2 ( π / 3 ) |\operatorname{Cl}_2|\le\operatorname{Cl}_2(\pi/3) ∣ Cl 2 ∣ ≤ Cl 2 ( π /3 ) , the average of ± G ( d ⋅ + d / 2 ) \pm G(d\cdot+d/2) ± G ( d ⋅ + d /2 ) over [ 0 , X ] [0,X] [ 0 , X ] has modulus ≤ κ / ( d X ) \le\kappa/(dX) ≤ κ / ( d X ) ; moreover G ≤ log 2 G\le\log2 G ≤ log 2 . For μ = − 1 \mu=-1 μ = − 1 and L = d X ≤ 1 L=dX\le1 L = d X ≤ 1 the average of − G -G − G over an interval of length L L L is largest when centred at 0 0 0 , and with 2 ∣ sin π s ∣ ≥ 4 ∣ s ∣ 2|\sin\pi s|\ge4|s| 2∣ sin π s ∣ ≥ 4∣ s ∣ it is ≤ log ( e / ( 2 L ) ) \le\log(e/(2L)) ≤ log ( e / ( 2 L )) . At X = 1 / ( 2 q ) X=1/(2q) X = 1/ ( 2 q ) the 2 ω ( q ) − 1 2^{\omega(q)-1} 2 ω ( q ) − 1 terms with μ = + 1 \mu=+1 μ = + 1 give ≤ log 2 \le\log2 ≤ log 2 each, a term with μ = − 1 \mu=-1 μ = − 1 and d = q / e d=q/e d = q / e gives ≤ 1 + log e \le1+\log e ≤ 1 + log e , and ∑ ω ( e ) odd log e ≤ 2 ω ( q ) − 1 log rad q \sum_{\omega(e)\text{ odd}}\log e\le2^{\omega(q)-1}\log\operatorname{rad}q ∑ ω ( e ) odd log e ≤ 2 ω ( q ) − 1 log rad q . The max with κ \kappa κ makes β \beta β non-increasing and continuous at L = 1 L=1 L = 1 (without it β \beta β would jump from 1 − log 2 1-\log2 1 − log 2 to κ \kappa κ there, since κ > 1 − log 2 \kappa>1-\log2 κ > 1 − log 2 ); at X = 1 / ( 2 q ) X=1/(2q) X = 1/ ( 2 q ) every term with μ = − 1 \mu=-1 μ = − 1 has L ≤ 1 / 4 L\le1/4 L ≤ 1/4 , where β ≥ κ \beta\ge\kappa β ≥ κ , so R q R_q R q is unchanged.
So ℓ q ≪ τ ( q ) log q / φ ( q ) = q − 1 + o ( 1 ) \ell_q\ll\tau(q)\log q/\varphi(q)=q^{-1+o(1)} ℓ q ≪ τ ( q ) log q / φ ( q ) = q − 1 + o ( 1 ) : the lobes of far arcs sink into the sea uniformly.
Corollary Q′ (the largest lobe)
sup q ∉ E ℓ q = ℓ 3 \sup_{q\notin\mathcal{E}}\ell_q=\ell_3 sup q ∈ / E ℓ q = ℓ 3 , with ℓ 3 ∈ [ 0.131593 , 0.132469 ] \ell_3\in[0.131593,0.132469] ℓ 3 ∈ [ 0.131593 , 0.132469 ] (numerically ℓ 3 = 0.1316 \ell_3=0.1316 ℓ 3 = 0.1316 ).
For q > 20000 q>20000 q > 20000 , 2 ω ( q ) / φ ( q ) ≤ M θ q − θ 2^{\omega(q)}/\varphi(q)\le M_\theta q^{-\theta} 2 ω ( q ) / φ ( q ) ≤ M θ q − θ with θ = 0.70 \theta=0.70 θ = 0.70 and M 0.70 = 15.14 M_{0.70}=15.14 M 0.70 = 15.14 , and the bound of Lemma Q(2), which is decreasing in q q q beyond 10 4 10^4 1 0 4 , is < ℓ 3 <\ell_3 < ℓ 3 .
For q ≤ 20000 q\le20000 q ≤ 20000 , R q R_q R q is evaluated in ball arithmetic (Arb, 128 bits); it is certified < ℓ 3 <\ell_3 < ℓ 3 except for 145 non-emerging moduli, all ≤ 2730 \le2730 ≤ 2730 , q = 3 q=3 q = 3 among them.
For each of the other 144 moduli, sup X ≥ 1 / ( 2 q ) A q ( X ) / φ ( q ) \sup_{X\ge1/(2q)}A_q(X)/\varphi(q) sup X ≥ 1/ ( 2 q ) A q ( X ) / φ ( q ) is certified < ℓ 3 <\ell_3 < ℓ 3 ; the largest upper bound is 0.1145, at q = 15 q=15 q = 15 . Since X q ≥ 1 / ( 2 q ) X_q\ge1/(2q) X q ≥ 1/ ( 2 q ) (Lemma Q(1)), this bounds ℓ q \ell_q ℓ q . The method: H ( X ) = ∫ 0 X log ∣ Φ q ( − e ( x ) ) ∣ d x = ∑ d ∣ q μ ( q / d ) d − 1 [ C ( d X + d / 2 ) − C ( d / 2 ) ] H(X)=\int_0^X\log|\Phi_q(-e(x))|\,dx=\sum_{d\mid q}\mu(q/d)d^{-1}[C(dX+d/2)-C(d/2)] H ( X ) = ∫ 0 X log ∣ Φ q ( − e ( x )) ∣ d x = ∑ d ∣ q μ ( q / d ) d − 1 [ C ( d X + d /2 ) − C ( d /2 )] with C ( u ) = − Cl 2 ( 2 π u ) / ( 2 π ) C(u)=-\operatorname{Cl}_2(2\pi u)/(2\pi) C ( u ) = − Cl 2 ( 2 π u ) / ( 2 π ) , evaluated at rational points; between points, H ( X ) ≤ H ( a ) + ( X − a ) ⋅ S H(X)\le H(a)+(X-a)\cdot S H ( X ) ≤ H ( a ) + ( X − a ) ⋅ S , with S S S a certified bound for sup log ∣ Φ q ( − e ( x ) ) ∣ \sup\log|\Phi_q(-e(x))| sup log ∣ Φ q ( − e ( x )) ∣ from the product form ∑ ( r , q ) = 1 log ∣ 2 cos π ( r / q + x ) ∣ \sum_{(r,q)=1}\log|2\cos\pi(r/q+x)| ∑ ( r , q ) = 1 log ∣2 cos π ( r / q + x ) ∣ ,
each term maximised exactly on the interval; beyond X ∗ X^{*} X ∗ the tail ∣ H ( X ) ∣ ≤ κ ∑ d ∣ q , μ ( q / d ) ≠ 0 1 / d |H(X)| \le\kappa\sum_{d \mid q,\mu(q/d)\ne0} 1/d ∣ H ( X ) ∣ ≤ κ ∑ d ∣ q , μ ( q / d ) = 0 1/ d .
ℓ 3 \ell_3 ℓ 3 itself: the lower bound is A 3 ( 29 / 40 ) / 2 A_3(29/40)/2 A 3 ( 29/40 ) /2 , after a certified local minimum of A 3 A_3 A 3 in ( 1 / 5 , 21 / 100 ) (1/5,21/100) ( 1/5 , 21/100 ) ; the upper bound comes from the same interval method.
The constant M 0.70 M_{0.70} M 0.70 of the first item is certified ≤ 15.1373 \le15.1373 ≤ 15.1373 , attained at q = 30030 q = 30030 q = 30030 (only p ≤ 13 p \le13 p ≤ 13 contribute), and the bound at q = 20001 q = 20001 q = 20001 is 0.0856 0.0856 0.0856 .
The corollary is proved: the finite part is a certified computation in interval arithmetic (certify_lobes_arb.py, 39 s).
The core of an arc: Gaussian and Edgeworth
Proposition C (core expansion). Put t = 2 π β t = 2\pi\beta t = 2 π β . A non-vanishing factor ( 1 + u e i w t ) / ( 1 + u ) (1+ue^{iwt})/(1+u) ( 1 + u e i w t ) / ( 1 + u ) , u = e ( w a / q ) u=e(wa/q) u = e ( w a / q ) , is the characteristic function of w ⋅ Bernoulli ( p ) w\cdot\operatorname{Bernoulli}(p) w ⋅ Bernoulli ( p ) with complex p = u / ( 1 + u ) p=u/(1+u) p = u / ( 1 + u ) , with cumulants κ 1 = w p \kappa_1=wp κ 1 = w p , κ 2 = w 2 p ( 1 − p ) \kappa_2=w^2p(1-p) κ 2 = w 2 p ( 1 − p ) , κ 3 = w 3 p ( 1 − p ) ( 1 − 2 p ) \kappa_3=w^3p(1-p)(1-2p) κ 3 = w 3 p ( 1 − p ) ( 1 − 2 p ) , κ 4 = w 4 p ( 1 − p ) ( 1 − 6 p + 6 p 2 ) \kappa_4=w^4p(1-p)(1-6p+6p^2) κ 4 = w 4 p ( 1 − p ) ( 1 − 6 p + 6 p 2 ) . The vanishing factor ( w = q / 2 ) (w=q/2) ( w = q /2 ) is 1 − e i w t = w ( − i t ) e i w t / 2 sinc ( w t / 2 ) 1-e^{iwt}=w(-it)e^{iwt/2}\operatorname{sinc}(wt/2) 1 − e i w t = w ( − i t ) e i w t /2 sinc ( w t /2 ) : the factor w ( − i t ) w(-it) w ( − i t ) becomes w ⋅ d / d T w\cdot d/dT w ⋅ d / d T after inversion, and the rest has cumulants w / 2 w/2 w /2 , w 2 / 12 w^2/12 w 2 /12 , 0 0 0 , − w 4 / 120 -w^4/120 − w 4 /120 . Summing gives complex cumulants κ j ( a / q ) \kappa_j(a/q) κ j ( a / q ) , s = κ 2 s=\sqrt{\kappa_2} s = κ 2 , z = ( T − κ 1 ) / s z=(T-\kappa_1)/s z = ( T − κ 1 ) / s , and the arc term
A a / q ( T ) = e ( − T a / q ) F N ∗ ( a / q ) ( ∏ w ∈ V w d d T ) [ φ ( z ) s ( 1 + κ 3 6 s 3 He 3 ( z ) + κ 4 24 s 4 He 4 ( z ) + κ 3 2 72 s 6 He 6 ( z ) ) ] . \mathcal{A}_{a/q}(T)=e(-Ta/q)F_N^*(a/q)\left(\prod_{w\in\mathcal{V}}w\frac{d}{dT}\right)\left[\frac{\varphi(z)}{s}\left(1+\frac{\kappa_3}{6s^3}\operatorname{He}_3(z)+\frac{\kappa_4}{24s^4}\operatorname{He}_4(z)+\frac{\kappa_3^2}{72s^6}\operatorname{He}_6(z)\right)\right]. A a / q ( T ) = e ( − T a / q ) F N ∗ ( a / q ) ( w ∈ V ∏ w d T d ) [ s φ ( z ) ( 1 + 6 s 3 κ 3 He 3 ( z ) + 24 s 4 κ 4 He 4 ( z ) + 72 s 6 κ 3 2 He 6 ( z ) ) ] . We tested it on the exact counts at N = 500 N=500 N = 500 (96 weights, counts up to 2 84 2^{84} 2 84 ), using twisted Gaussian windows ∑ T r N ( T ) e ( a T / q ) e − ( T − T 0 ) 2 / 2 H 2 \sum_T r_N(T)e(aT/q)e^{-(T-T_0)^2/2H^2} ∑ T r N ( T ) e ( a T / q ) e − ( T − T 0 ) 2 /2 H 2 with H = 60 H=60 H = 60 at three centres T 0 T_0 T 0 :
Table 2. Ratio exact/predicted of the arc terms. The phases agree to ≤ 2 ⋅ 10 − 3 \le2\cdot10^{-3} ≤ 2 ⋅ 1 0 − 3 rad. The residual, at most 0.7%, is the next Edgeworth order (Proposition C′).
Proposition C′ (the next two orders). Let a non-vanishing factor have, besides κ 1 , … , κ 4 \kappa_1,\ldots,\kappa_4 κ 1 , … , κ 4 , the cumulants κ 5 = w 5 p ( 1 − p ) ( 1 − 2 p ) ( 1 − 12 p + 12 p 2 ) \kappa_5=w^5p(1-p)(1-2p)(1-12p+12p^2) κ 5 = w 5 p ( 1 − p ) ( 1 − 2 p ) ( 1 − 12 p + 12 p 2 ) and κ 6 = w 6 p ( 1 − p ) ( 1 − 30 p + 150 p 2 − 240 p 3 + 120 p 4 ) \kappa_6=w^6p(1-p)(1-30p+150p^2-240p^3+120p^4) κ 6 = w 6 p ( 1 − p ) ( 1 − 30 p + 150 p 2 − 240 p 3 + 120 p 4 ) , and the vanishing factor κ 3 = κ 5 = 0 \kappa_3=\kappa_5=0 κ 3 = κ 5 = 0 , κ 6 = w 6 / 252 \kappa_6=w^6/252 κ 6 = w 6 /252 . The bracket of Proposition C continues with the terms of order s − 3 s^{-3} s − 3 ,
κ 5 120 s 5 H e 5 ( z ) + κ 3 κ 4 144 s 7 H e 7 ( z ) + κ 3 3 1296 s 9 H e 9 ( z ) , \frac{\kappa_{5}}{120s^{5}}He_{5}(z)+\frac{\kappa_{3}\kappa_{4}}{144s^{7}}He_{7}(z)+\frac{\kappa_{3}^{3}}{1296s^{9}}He_{9}(z), 120 s 5 κ 5 H e 5 ( z ) + 144 s 7 κ 3 κ 4 H e 7 ( z ) + 1296 s 9 κ 3 3 H e 9 ( z ) ,
and of order s − 4 s^{-4} s − 4 ,
κ 6 720 s 6 H e 6 ( z ) + ( κ 4 2 1152 + κ 3 κ 5 720 ) H e 8 ( z ) s 8 + κ 3 2 κ 4 1728 s 10 H e 10 ( z ) + κ 3 4 31104 s 12 H e 12 ( z ) . \frac{\kappa_{6}}{720s^{6}}He_{6}(z)+\left(\frac{\kappa_{4}^{2}}{1152}+\frac{\kappa_{3}\kappa_{5}}{720}\right)\frac{He_{8}(z)}{s^{8}}+\frac{\kappa_{3}^{2}\kappa_{4}}{1728s^{10}}He_{10}(z)+\frac{\kappa_{3}^{4}}{31104s^{12}}He_{12}(z). 720 s 6 κ 6 H e 6 ( z ) + ( 1152 κ 4 2 + 720 κ 3 κ 5 ) s 8 H e 8 ( z ) + 1728 s 10 κ 3 2 κ 4 H e 10 ( z ) + 31104 s 12 κ 3 4 H e 12 ( z ) .
Proof. These are the terms of order s − 3 s^{-3} s − 3 and s − 4 s^{-4} s − 4 of the Edgeworth series of a sum of independent factors with the given cumulants. The cumulants of w ⋅ Bernoulli ( p ) w\cdot\operatorname{Bernoulli}(p) w ⋅ Bernoulli ( p ) are the derivatives of log ( 1 − p + p e i w t ) \log(1-p+pe^{iwt}) log ( 1 − p + p e i w t ) ; those of e i w t / 2 sinc ( w t / 2 ) e^{iwt/2}\operatorname{sinc}(wt/2) e i w t /2 sinc ( w t /2 ) are those of the uniform law on [ 0 , w ] [0,w] [ 0 , w ] , whose odd cumulants beyond the first vanish and whose sixth is w 6 B 6 / 6 = w 6 / 252 w^{6}B_{6}/6=w^{6}/252 w 6 B 6 /6 = w 6 /252 . □
Table 2′. The same test with H = 120 H=120 H = 120 . The largest residual falls from 0.72% to 0.14% and 0.063%, with alternating sign, as expected of an asymptotic series. At H = 60 H=60 H = 60 the arc 1/8 shows a residual of about 0.2% that changes with T 0 T_{0} T 0 (Table 2); it is leakage of the window from neighbouring frequencies, not an Edgeworth term, and it disappears at H ≥ 120 H\ge120 H ≥ 120 .
The arc expansion as a theorem
Fix B > 40 B>40 B > 40 and put P = ( log N ) B / 4 \mathfrak{P}=(\log N)^{B/4} P = ( log N ) B /4 , M = ( log N ) B / 4 M=(\log N)^{B/4} M = ( log N ) B /4 . The major arcs are M ( a / q ) = { θ : ∣ θ − a / q ∣ ≤ P / ( q N ) } \mathfrak{M}(a/q)=\{\theta:|\theta-a/q|\le\mathfrak{P}/(qN)\} M ( a / q ) = { θ : ∣ θ − a / q ∣ ≤ P / ( q N )} , q ≤ P q\le\mathfrak{P} q ≤ P ; the minor arcs m \mathfrak{m} m are the rest. The statements below concern q ≥ 3 q\ge3 q ≥ 3 ; the arcs at q = 1 q=1 q = 1 and q = 2 q=2 q = 2 are the main Gaussian and its parity image. Put R a / q ( T ) = ∫ M ( a / q ) F N ( e ( θ ) ) e ( − T θ ) d θ R_{a/q}(T)=\int_{\mathfrak{M}(a/q)}F_N(e(\theta))e(-T\theta)\,d\theta R a / q ( T ) = ∫ M ( a / q ) F N ( e ( θ )) e ( − T θ ) d θ , so that r N ( T ) = ∑ q ≤ P ∑ a R a / q ( T ) + ∫ m F N ( e ( θ ) ) e ( − T θ ) d θ r_N(T)=\sum_{q\le\mathfrak{P}}\sum_aR_{a/q}(T)+\int_{\mathfrak{m}}F_N(e(\theta))e(-T\theta)\,d\theta r N ( T ) = ∑ q ≤ P ∑ a R a / q ( T ) + ∫ m F N ( e ( θ )) e ( − T θ ) d θ exactly.
Lemma M (one-sided trigonometric majorant). For every M ≥ 2 M\ge2 M ≥ 2 there is a trigonometric polynomial K M K_M K M of degree ≤ M \le M ≤ M with K M ( x ) ≥ log ∣ cos π x ∣ K_M(x)\ge\log|\cos\pi x| K M ( x ) ≥ log ∣ cos π x ∣ for all x x x , K ^ M ( 0 ) ≤ − log 2 + C M − 1 / 2 \widehat{K}_M(0)\le-\log2+CM^{-1/2} K M ( 0 ) ≤ − log 2 + C M − 1/2 , and ∣ K ^ M ( m ) ∣ ≤ C |\widehat{K}_M(m)|\le C ∣ K M ( m ) ∣ ≤ C .
Proof. Let f = log ∣ cos π x ∣ f=\log|\cos\pi x| f = log ∣ cos π x ∣ and f ε = max ( f , log ε ) f_{\varepsilon}=\max(f,\log\varepsilon) f ε = max ( f , log ε ) : f ≤ f ε f\le f_{\varepsilon} f ≤ f ε , f ^ ε ( 0 ) = − log 2 + O ( ε ) \widehat{f}_{\varepsilon}(0)=-\log2+O(\varepsilon) f ε ( 0 ) = − log 2 + O ( ε ) , and f ε f_{\varepsilon} f ε is Lipschitz with constant π / ε \pi/\varepsilon π / ε . With J M J_M J M the Jackson kernel, K M = J M ∗ f ε + C π / ( ε M ) K_M=J_M*f_{\varepsilon}+C\pi/(\varepsilon M) K M = J M ∗ f ε + C π / ( εM ) majorizes f ε f_{\varepsilon} f ε . Take ε = M − 1 / 2 \varepsilon=M^{-1/2} ε = M − 1/2 . Since J M ≥ 0 J_M\ge0 J M ≥ 0 has mass 1, ∣ K ^ M ( m ) ∣ ≤ ∫ 0 1 ∣ f ε ∣ ≤ log 2 + O ( ε ) |\widehat{K}_M(m)|\le\int_{0}^{1}|f_{\varepsilon}|\le\log2+O(\varepsilon) ∣ K M ( m ) ∣ ≤ ∫ 0 1 ∣ f ε ∣ ≤ log 2 + O ( ε ) for m ≠ 0 m\ne0 m = 0 . □
An L 1 L^{1} L 1 approximation would not do: an upper bound is needed at every prime simultaneously, and the singularities of f f f are at − ∞ -\infty − ∞ , so a one-sided majorant costs nothing.
Lemma L (neighbourhood of an arc). Fix B B B . Uniformly for 3 ≤ q ≤ P 3\le q\le\mathfrak{P} 3 ≤ q ≤ P , ( a , q ) = 1 (a,q)=1 ( a , q ) = 1 and θ = a / q + X / N \theta=a/q+X/N θ = a / q + X / N with N − 1 / 2 ≤ ∣ X ∣ ≤ P / q N^{-1/2}\le|X|\le\mathfrak{P}/q N − 1/2 ≤ ∣ X ∣ ≤ P / q ,
log ∣ F N ( e ( θ ) ) ∣ ≤ n log 2 + N log N ( A q ( ∣ X ∣ ) φ ( q ) − log 2 ) + O B ( N log 2 N ) . \log|F_N(e(\theta))| \le n\log2+\frac{N}{\log N}\left(\frac{A_q(|X|)}{\varphi(q)}-\log2\right)+O_B\left(\frac{N}{\log^2 N}\right). log ∣ F N ( e ( θ )) ∣ ≤ n log 2 + log N N ( φ ( q ) A q ( ∣ X ∣ ) − log 2 ) + O B ( log 2 N N ) .
Only this upper bound is used below.
Proof. Write log ∣ 1 + e ( w θ ) ∣ = log 2 + g ( w θ ) \log|1+e(w\theta)|=\log2+g(w\theta) log ∣1 + e ( w θ ) ∣ = log 2 + g ( w θ ) , with g ( y ) = log ∣ cos π y ∣ ≤ 0 g(y)=\log|\cos\pi y|\le0 g ( y ) = log ∣ cos π y ∣ ≤ 0 . Since ∣ Φ q ( − e ( − x ) ) ∣ = ∣ Φ q ( − e ( x ) ) ∣ |\Phi_q(-e(-x))|=|\Phi_q(-e(x))| ∣ Φ q ( − e ( − x )) ∣ = ∣ Φ q ( − e ( x )) ∣ , we may take X > 0 X>0 X > 0 and put β = X / N \beta=X/N β = X / N .
If p ≡ r ( m o d q ) p\equiv r\pmod q p ≡ r ( mod q ) , then p a / q − r a / q pa/q-ra/q p a / q − r a / q is an integer, so ∣ cos π p θ ∣ = ∣ cos π ( r a / q + p β ) ∣ |\cos\pi p\theta|=|\cos\pi(ra/q+p\beta)| ∣ cos π pθ ∣ = ∣ cos π ( r a / q + pβ ) ∣ . Put g r ( x ) = g ( r a / q + x ) g_r(x)=g(ra/q+x) g r ( x ) = g ( r a / q + x ) and g r , ε = max ( g r , log ε ) g_{r,\varepsilon}=\max(g_r,\log\varepsilon) g r , ε = max ( g r , log ε ) with ε = 1 / N \varepsilon=1/N ε = 1/ N . Then g r ≤ g r , ε ≤ 0 g_r\le g_{r,\varepsilon}\le0 g r ≤ g r , ε ≤ 0 , and on [ 0 , X ] [0,X] [ 0 , X ] the function g r , ε g_{r,\varepsilon} g r , ε is continuous, with at most 2 X + 4 2X+4 2 X + 4 monotone pieces, each of variation ≤ log N \le\log N ≤ log N .
By Siegel–Walfisz, π ( t ; q , r ) = li ( t ) / φ ( q ) + E r ( t ) \pi(t;q,r)=\operatorname{li}(t)/\varphi(q)+E_r(t) π ( t ; q , r ) = li ( t ) / φ ( q ) + E r ( t ) with ∣ E r ( t ) ∣ ≪ B N e − c B log N |E_r(t)|\ll_B Ne^{-c_B\sqrt{\log N}} ∣ E r ( t ) ∣ ≪ B N e − c B l o g N for N ≤ t ≤ N \sqrt{N}\le t\le N N ≤ t ≤ N and q ≤ P q\le\mathfrak{P} q ≤ P (Siegel–Walfisz with exponent 2 B 2B 2 B , since P ≤ ( log t ) 2 B \mathfrak{P}\le(\log t)^{2B} P ≤ ( log t ) 2 B for t ≥ N t\ge\sqrt{N} t ≥ N and N N N large). Stieltjes integration by parts, with ∣ ∫ f d E ∣ ≤ ( 2 sup ∣ f ∣ + Var f ) ⋅ sup ∣ E ∣ |\int f\,dE|\le(2\sup|f|+\operatorname{Var}f)\cdot\sup|E| ∣ ∫ f d E ∣ ≤ ( 2 sup ∣ f ∣ + Var f ) ⋅ sup ∣ E ∣ , gives
∑ N < p ≤ N p ≡ r ( m o d q ) g r , ε ( p β ) = 1 φ ( q ) ∫ N N g r , ε ( t β ) d t log t + O B ( ( X + 3 ) N log N e − c B log N ) . \sum_{\substack{\sqrt{N}<p\le N\\p\equiv r\pmod q}}g_{r,\varepsilon}(p\beta)
=\frac{1}{\varphi(q)}\int_{\sqrt{N}}^N g_{r,\varepsilon}(t\beta)\frac{dt}{\log t}
+O_B\left((X+3)N\log N e^{-c_B\sqrt{\log N}}\right). N < p ≤ N p ≡ r ( mod q ) ∑ g r , ε ( pβ ) = φ ( q ) 1 ∫ N N g r , ε ( tβ ) log t d t + O B ( ( X + 3 ) N log N e − c B l o g N ) .
Since g r , ε ≤ 0 g_{r,\varepsilon}\le0 g r , ε ≤ 0 and log t ≤ log N \log t\le\log N log t ≤ log N , the integral is at most
1 log N ∫ N N g r , ε ( t β ) d t = N X log N ∫ X / N X g r , ε ( x ) d x ≤ N X log N [ ∫ 0 X g r + ∫ 0 X ( g r , ε − g r ) + X log N N ] . \frac{1}{\log N}\int_{\sqrt{N}}^N g_{r,\varepsilon}(t\beta)\,dt
=\frac{N}{X\log N}\int_{X/\sqrt{N}}^X g_{r,\varepsilon}(x)\,dx
\le\frac{N}{X\log N}\left[\int_0^X g_r+\int_0^X(g_{r,\varepsilon}-g_r)+\frac{X\log N}{\sqrt{N}}\right]. log N 1 ∫ N N g r , ε ( tβ ) d t = X log N N ∫ X / N X g r , ε ( x ) d x ≤ X log N N [ ∫ 0 X g r + ∫ 0 X ( g r , ε − g r ) + N X log N ] .
On each period, g r , ε − g r g_{r,\varepsilon}-g_r g r , ε − g r is supported where ∣ cos ∣ < ε |\cos|<\varepsilon ∣ cos ∣ < ε and integrates to at most 2 ε 2\varepsilon 2 ε , so ∫ 0 X ( g r , ε − g r ) ≤ 2 ( X + 1 ) / N \int_0^X(g_{r,\varepsilon}-g_r)\le2(X+1)/N ∫ 0 X ( g r , ε − g r ) ≤ 2 ( X + 1 ) / N .
By ∏ ( r , q ) = 1 ( 1 + ζ q r a y ) = Φ q ( − y ) \prod_{(r,q)=1}(1+\zeta_q^{ra}y)=\Phi_q(-y) ∏ ( r , q ) = 1 ( 1 + ζ q r a y ) = Φ q ( − y ) and ∣ 1 + e ( y ) ∣ = 2 ∣ cos π y ∣ |1+e(y)|=2|\cos\pi y| ∣1 + e ( y ) ∣ = 2∣ cos π y ∣ , ∑ ( r , q ) = 1 g r ( x ) = log ∣ Φ q ( − e ( x ) ) ∣ − φ ( q ) log 2 \sum_{(r,q)=1}g_r(x)=\log|\Phi_q(-e(x))|-\varphi(q)\log2 ∑ ( r , q ) = 1 g r ( x ) = log ∣ Φ q ( − e ( x )) ∣ − φ ( q ) log 2 , so ∑ r ∫ 0 X g r = X ( A q ( X ) − φ ( q ) log 2 ) \sum_r\int_0^X g_r=X(A_q(X)-\varphi(q)\log2) ∑ r ∫ 0 X g r = X ( A q ( X ) − φ ( q ) log 2 ) .
∑ w g ( w θ ) ≤ N log N ( A q ( X ) φ ( q ) − log 2 ) + O ( N log N ) + O ( N ) + O B ( P 2 N log N e − c B log N ) , \sum_w g(w\theta)\le\frac{N}{\log N}\left(\frac{A_q(X)}{\varphi(q)}-\log2\right)+O\left(\frac{\sqrt{N}}{\log N}\right)+O(\sqrt{N})+O_B\left(\mathfrak{P}^2N\log N e^{-c_B\sqrt{\log N}}\right), w ∑ g ( w θ ) ≤ log N N ( φ ( q ) A q ( X ) − log 2 ) + O ( log N N ) + O ( N ) + O B ( P 2 N log N e − c B l o g N ) ,
using X ≥ N − 1 / 2 X\ge N^{-1/2} X ≥ N − 1/2 in the second term and X ≤ P / q X\le\mathfrak{P}/q X ≤ P / q , φ ( q ) ≤ P \varphi(q)\le\mathfrak{P} φ ( q ) ≤ P in the last. All three error terms are O B ( N / log 2 N ) O_B(N/\log^2N) O B ( N / log 2 N ) .
Lemma L0 _0 0 (the core of an arc). For 3 ≤ q ≤ P 3\le q\le\mathfrak{P} 3 ≤ q ≤ P , ( a , q ) = 1 (a,q)=1 ( a , q ) = 1 and θ = a / q + β \theta=a/q+\beta θ = a / q + β with ∣ β ∣ ≤ N − 3 / 2 |\beta|\le N^{-3/2} ∣ β ∣ ≤ N − 3/2 ,
log ∣ F N ( e ( θ ) ) ∣ ≤ log 2 + log ∣ F N ∗ ( a / q ) ∣ + π q π ( N ) N − 1 / 2 . \log|F_N(e(\theta))|\le\log2+\log|F_N^*(a/q)|+\pi q\pi(N)N^{-1/2}. log ∣ F N ( e ( θ )) ∣ ≤ log 2 + log ∣ F N ∗ ( a / q ) ∣ + π q π ( N ) N − 1/2 .
Proof. For a weight w ∉ V ( a / q ) w \notin\mathcal{V}(a/q) w ∈ / V ( a / q ) , ∥ w a / q − 1 / 2 ∥ ≥ 1 / ( 2 q ) \lVert wa/q-1/2\rVert\ge1/(2q) ∥ w a / q − 1/2 ∥ ≥ 1/ ( 2 q ) , so ∣ cos ( π w a / q ) ∣ ≥ sin ( π / ( 2 q ) ) ≥ 1 / q \lvert\cos(\pi wa/q)\rvert\ge\sin(\pi/(2q)) \ge1/q ∣ cos ( π w a / q )∣ ≥ sin ( π / ( 2 q )) ≥ 1/ q . Then ∣ cos π ( w a / q + w β ) ∣ ≤ ∣ cos ( π w a / q ) ∣ + π w ∣ β ∣ ≤ ∣ cos ( π w a / q ) ∣ ( 1 + π q w ∣ β ∣ ) \lvert\cos\pi(wa/q+w\beta)\rvert\le\lvert\cos(\pi wa/q)\rvert+\pi w\lvert\beta\rvert\le\lvert\cos(\pi wa/q)\rvert(1+\pi qw\lvert\beta\rvert) ∣ cos π ( w a / q + w β )∣ ≤ ∣ cos ( π w a / q )∣ + π w ∣ β ∣ ≤ ∣ cos ( π w a / q )∣ ( 1 + π q w ∣ β ∣) , and ∑ w π q w ∣ β ∣ ≤ π q π ( N ) N ∣ β ∣ ≤ π q π ( N ) N − 1 / 2 \sum_w\pi qw\lvert\beta\rvert\le\pi q\pi(N)N\lvert\beta\rvert\le\pi q\pi(N)N^{-1/2} ∑ w π q w ∣ β ∣ ≤ π q π ( N ) N ∣ β ∣ ≤ π q π ( N ) N − 1/2 . The vanishing factor, if any, has modulus ≤ 2 \le2 ≤ 2 .
The peak of an arc
For q ≥ 3 q \ge3 q ≥ 3 let G ( θ ) G(\theta) G ( θ ) be F N ( e ( θ ) ) F_N(e(\theta)) F N ( e ( θ )) with the vanishing factor removed, if there is one, so that G ( a / q ) = F N ∗ ( a / q ) G(a/q)=F_N^*(a/q) G ( a / q ) = F N ∗ ( a / q ) . Put t = 2 π ( θ − a / q ) t=2\pi(\theta-a/q) t = 2 π ( θ − a / q ) , S 2 = ∑ w ∉ V w 2 S_2=\sum_{w\notin\mathcal{V}}w^2 S 2 = ∑ w ∈ / V w 2 , and
ν a / q = 1 2 ∑ w ∉ V w tan π w a q . \nu_{a/q}=\frac{1}{2}\sum_{w\notin\mathcal{V}}w\tan\frac{\pi wa}{q}. ν a / q = 2 1 w ∈ / V ∑ w tan q π w a .
Lemma W (the peak). Fix B B B . For 3 ≤ q ≤ P 3\le q\le P 3 ≤ q ≤ P and ( a , q ) = 1 (a,q)=1 ( a , q ) = 1 :
On ∣ t ∣ < π / ( q N ) \lvert t\rvert<\pi/(qN) ∣ t ∣ < π / ( q N ) no factor of G G G vanishes, and t ↦ log ∣ G ∣ t\mapsto\log\lvert G\rvert t ↦ log ∣ G ∣ is concave there, with second derivative ≤ − S 2 / 4 \le-S_2/4 ≤ − S 2 /4 .
Its derivative at t = 0 t=0 t = 0 is − ν a / q -\nu_{a/q} − ν a / q , and ν a / q ≪ B N 2 e − c B log N \nu_{a/q}\ll_B N^2e^{-c_B\sqrt{\log N}} ν a / q ≪ B N 2 e − c B l o g N . Moreover S 2 ≥ N 3 / ( 64 log N ) S_2\ge N^3/(64\log N) S 2 ≥ N 3 / ( 64 log N ) for N N N large (the primes in ( N / 2 , N ] (N/2,N] ( N /2 , N ] , by Siegel–Walfisz at q = 1 q=1 q = 1 ). Hence log ∣ G ∣ \log\lvert G\rvert log ∣ G ∣ has a unique maximum, at a point t ∗ t^* t ∗ with ∣ t ∗ ∣ ≤ 4 ∣ ν a / q ∣ / S 2 ≪ B N − 1 e − c B log N \lvert t^*\rvert\le4\lvert\nu_{a/q}\rvert/S_2\ll_B N^{-1}e^{-c_B\sqrt{\log N}} ∣ t ∗ ∣ ≤ 4 ∣ ν a / q ∣ / S 2 ≪ B N − 1 e − c B l o g N .
At θ ∗ = a / q + t ∗ / ( 2 π ) \theta^*=a/q+t^*/(2\pi) θ ∗ = a / q + t ∗ / ( 2 π ) the cumulants of Proposition C, taken with u = e ( w θ ∗ ) u=e(w\theta^*) u = e ( w θ ∗ ) , have κ 1 ∗ \kappa_1^* κ 1 ∗ real, κ 2 ∗ = ∑ w ∉ V w 2 / ( 4 cos 2 ( π w θ ∗ ) ) ≥ S 2 / 4 \kappa_2^*=\sum_{w\notin\mathcal{V}}w^2/(4\cos^2(\pi w\theta^*))\ge S_2/4 κ 2 ∗ = ∑ w ∈ / V w 2 / ( 4 cos 2 ( π w θ ∗ )) ≥ S 2 /4 , κ 3 ∗ \kappa_3^* κ 3 ∗ purely imaginary and κ 4 ∗ \kappa_4^* κ 4 ∗ real. Moreover $\log\lvert F_N^(a/q)\rvert\le\log\lvert G(\theta^ )\rvert\le\log\lvert F_N^*(a/q)\rvert+4\nu_{a/q}^2/S_2.
Proof.
(1) The factor w w w vanishes where w θ ≡ 1 / 2 ( m o d 1 ) w\theta\equiv1/2\pmod1 w θ ≡ 1/2 ( mod 1 ) . For w ∉ V w\notin\mathcal{V} w ∈ / V , ∥ w a / q − 1 / 2 ∥ ≥ 1 / ( 2 q ) \lVert wa/q-1/2\rVert\ge1/(2q) ∥ w a / q − 1/2 ∥ ≥ 1/ ( 2 q ) , so the nearest zero is at distance ≥ 1 / ( 2 q w ) ≥ 1 / ( 2 q N ) \ge1/(2qw)\ge1/(2qN) ≥ 1/ ( 2 q w ) ≥ 1/ ( 2 q N ) from a / q a/q a / q . On that interval, d 2 / d t 2 log ∣ cos ( π w θ ) ∣ = − w 2 / ( 4 cos 2 ( π w θ ) ) ≤ − w 2 / 4 d^2/dt^2\log\lvert\cos(\pi w\theta)\rvert=-w^2/(4\cos^2(\pi w\theta))\le-w^2/4 d 2 / d t 2 log ∣ cos ( π w θ )∣ = − w 2 / ( 4 cos 2 ( π w θ )) ≤ − w 2 /4 .
(2) With u = e ( w a / q ) u=e(wa/q) u = e ( w a / q ) one has u / ( 1 + u ) = 1 / 2 + ( i / 2 ) tan ( π w a / q ) u/(1+u)=1/2+(i/2)\tan(\pi wa/q) u / ( 1 + u ) = 1/2 + ( i /2 ) tan ( π w a / q ) , and d / d t log ∣ 1 + u e i w t ∣ d/dt\log\lvert1+ue^{iwt}\rvert d / d t log ∣ 1 + u e i w t ∣ at t = 0 t=0 t = 0 equals − w ⋅ Im ( u / ( 1 + u ) ) = − ( w / 2 ) tan ( π w a / q ) -w\cdot\operatorname{Im}(u/(1+u))=-(w/2)\tan(\pi wa/q) − w ⋅ Im ( u / ( 1 + u )) = − ( w /2 ) tan ( π w a / q ) . For ν \nu ν , group the primes by class: ∑ p ≡ r , p ≤ N p = φ ( q ) − 1 ∑ p ≤ N , p ∤ q p + O B ( N 2 e − c B log N ) \sum_{p\equiv r,p\le N}p=\varphi(q)^{-1}\sum_{p\le N,p\nmid q}p+O_B(N^2e^{-c_B\sqrt{\log N}}) ∑ p ≡ r , p ≤ N p = φ ( q ) − 1 ∑ p ≤ N , p ∤ q p + O B ( N 2 e − c B l o g N ) by Siegel–Walfisz and partial summation (applied with ( log N ) 2 B (\log N)^{2B} ( log N ) 2 B for t ≥ N t\ge\sqrt N t ≥ N , the primes p ≤ N p\le\sqrt N p ≤ N contributing O ( N ) O(N) O ( N ) ). Moreover ∑ ( r , q ) = 1 tan ( π r a / q ) = 0 \sum_{(r,q)=1}\tan(\pi ra/q)=0 ∑ ( r , q ) = 1 tan ( π r a / q ) = 0 (pair r r r with q − r q-r q − r ) and ∣ tan ( π r a / q ) ∣ ≤ q \lvert\tan(\pi ra/q)\rvert\le q ∣ tan ( π r a / q )∣ ≤ q ; the weight 1 1 1 and the primes dividing q q q contribute O ( q 2 log q ) O(q^2\log q) O ( q 2 log q ) . By concavity, the maximum lies within 4 ∣ ν ∣ / S 2 4\lvert\nu\rvert/S_2 4 ∣ ν ∣ / S 2 of 0 0 0 , which is inside the interval of (1) for N N N large.
(3) On ∣ u ∣ = 1 \lvert u\rvert=1 ∣ u ∣ = 1 , p ( 1 − p ) = u / ( 1 + u ) 2 = 1 / ( 4 cos 2 ( π w θ ) ) p(1-p)=u/(1+u)^2=1/(4\cos^2(\pi w\theta)) p ( 1 − p ) = u / ( 1 + u ) 2 = 1/ ( 4 cos 2 ( π w θ )) is real and positive, and 1 − 2 p = − i tan ( π w θ ) 1-2p=-i\tan(\pi w\theta) 1 − 2 p = − i tan ( π w θ ) is purely imaginary. This gives the types of κ 2 ∗ , κ 3 ∗ , κ 4 ∗ \kappa_2^*,\kappa_3^*,\kappa_4^* κ 2 ∗ , κ 3 ∗ , κ 4 ∗ . κ 1 ∗ \kappa_1^* κ 1 ∗ is real because − Im κ 1 ∗ -\operatorname{Im}\kappa_1^* − Im κ 1 ∗ is the derivative of log ∣ G ∣ \log\lvert G\rvert log ∣ G ∣ at t ∗ t^* t ∗ , which vanishes. The last inequality follows from concavity: log ∣ G ( θ ∗ ) ∣ − log ∣ G ( a / q ) ∣ ≤ ∣ ν ∣ ∣ t ∗ ∣ ≤ 4 ν 2 / S 2 \log\lvert G(\theta^*)\rvert-\log\lvert G(a/q)\rvert\le\lvert\nu\rvert\lvert t^*\rvert\le4\nu^2/S_2 log ∣ G ( θ ∗ )∣ − log ∣ G ( a / q )∣ ≤ ∣ ν ∣ ∣ t ∗ ∣ ≤ 4 ν 2 / S 2 .
The offset t ∗ t^* t ∗ is a prime race: ν a / q \nu_{a/q} ν a / q weights the classes r r r mod q q q by the odd function tan ( π r a / q ) \tan(\pi ra/q) tan ( π r a / q ) , so only the odd characters mod q q q enter it. The height of an arc sees the even characters (§4), its offset the odd ones. Under GRH for the odd characters mod q q q , ν a / q ≪ q log q ⋅ N 3 / 2 log 2 ( q N ) \nu_{a/q}\ll q\log q\cdot N^{3/2}\log^2(qN) ν a / q ≪ q log q ⋅ N 3/2 log 2 ( q N ) and ∣ t ∗ ∣ ≪ q log q ⋅ N − 3 / 2 log 3 ( q N ) \lvert t^*\rvert\ll q\log q\cdot N^{-3/2}\log^3(qN) ∣ t ∗ ∣ ≪ q log q ⋅ N − 3/2 log 3 ( q N ) ; unconditionally only the Siegel–Walfisz bound of Lemma W is available.
Theorem E (arc expansion). Fix B > 40 B>40 B > 40 (B = 48 B=48 B = 48 makes the error in (1) O ( 1 / log N ) O(1/\log N) O ( 1/ log N ) ) and 0 < ε < 1 / 8 0<\varepsilon<1/8 0 < ε < 1/8 (the statements for larger ε \varepsilon ε follow). As N → ∞ N\to\infty N → ∞ , for 3 ≤ q ≤ P 3\le q\le\mathcal{P} 3 ≤ q ≤ P :
(minor arcs) sup θ ∈ m ∣ F N ( e ( θ ) ) ∣ ≤ 2 n exp ( ( − log 2 + O ( ( log N ) 5 − B / 8 ) + O ( M − 1 / 2 ) ) π ( N ) ) \sup_{\theta\in\mathfrak{m}}|F_N(e(\theta))|\le2^n\exp((-\log2+O((\log N)^{5-B/8})+O(M^{-1/2}))\pi(N)) sup θ ∈ m ∣ F N ( e ( θ )) ∣ ≤ 2 n exp (( − log 2 + O (( log N ) 5 − B /8 ) + O ( M − 1/2 )) π ( N )) .
(emerging arcs) Let q ∈ E q\in\mathcal{E} q ∈ E . With the cumulants κ j ∗ \kappa_j^* κ j ∗ of Lemma W(3), s ∗ = κ 2 ∗ s^*=\sqrt{\kappa_2^*} s ∗ = κ 2 ∗ and z = ( T − κ 1 ∗ ) / s ∗ z=(T-\kappa_1^*)/s^* z = ( T − κ 1 ∗ ) / s ∗ , put
H ^ ( T ) = e − i T t ∗ G ( θ ∗ ) φ ( z ) s ∗ ( 1 + κ 3 ∗ 6 s ∗ 3 H e 3 ( z ) + κ 4 ∗ 24 s ∗ 4 H e 4 ( z ) + κ 3 ∗ 2 72 s ∗ 6 H e 6 ( z ) ) . \widehat{H}(T)=e^{-iTt^*}G(\theta^*)\frac{\varphi(z)}{s^*}\left(1+\frac{\kappa_3^*}{6s^{*3}}He_3(z)+\frac{\kappa_4^*}{24s^{*4}}He_4(z)+\frac{\kappa_3^{*2}}{72s^{*6}}He_6(z)\right). H ( T ) = e − i T t ∗ G ( θ ∗ ) s ∗ φ ( z ) ( 1 + 6 s ∗ 3 κ 3 ∗ H e 3 ( z ) + 24 s ∗ 4 κ 4 ∗ H e 4 ( z ) + 72 s ∗ 6 κ 3 ∗ 2 H e 6 ( z ) ) . If V ( a / q ) = ∅ \mathcal{V}(a/q)=\varnothing V ( a / q ) = ∅ , put A a / q ∗ ( T ) = e ( − T a / q ) H ^ ( T ) \mathcal{A}_{a/q}^*(T)=e(-Ta/q)\widehat{H}(T) A a / q ∗ ( T ) = e ( − T a / q ) H ( T ) and Ω = 1 \Omega=1 Ω = 1 . If V ( a / q ) = { w } \mathcal{V}(a/q)=\{w\} V ( a / q ) = { w } , write 1 + e ( w θ ) = − e − i w t ⋅ e i w t / 2 sinc ( w t / 2 ) 1+e(w\theta)=-e^{-iwt}\cdot e^{iwt/2}\operatorname{sinc}(wt/2) 1 + e ( w θ ) = − e − i w t ⋅ e i w t /2 sinc ( w t /2 ) and replace G G G by G ~ = G ⋅ e i w t / 2 sinc ( w t / 2 ) \widetilde{G}=G\cdot e^{iwt/2}\operatorname{sinc}(wt/2) G = G ⋅ e i w t /2 sinc ( w t /2 ) in H ^ \widehat{H} H : its value G ~ ( θ ∗ ) = G ( θ ∗ ) e i w t ∗ / 2 sinc ( w t ∗ / 2 ) \widetilde{G}(\theta^*)=G(\theta^*)e^{iwt^*/2}\operatorname{sinc}(wt^*/2) G ( θ ∗ ) = G ( θ ∗ ) e i w t ∗ /2 sinc ( w t ∗ /2 ) replaces G ( θ ∗ ) G(\theta^*) G ( θ ∗ ) , and the cumulants of G ~ \widetilde{G} G at t ∗ t^* t ∗ , those of G G G plus those of e i w t / 2 sinc ( w t / 2 ) e^{iwt/2}\operatorname{sinc}(wt/2) e i w t /2 sinc ( w t /2 ) at t ∗ t^* t ∗ (see the note after the theorem), replace the κ j ∗ \kappa_j^* κ j ∗ . Put A a / q ∗ ( T ) = e ( − T a / q ) ⋅ w ⋅ ( d / d T ) H ^ ( T ) \mathcal{A}_{a/q}^*(T)=e(-Ta/q)\cdot w\cdot(d/dT)\widehat{H}(T) A a / q ∗ ( T ) = e ( − T a / q ) ⋅ w ⋅ ( d / d T ) H ( T ) and Ω = w ( ∣ t ∗ ∣ + 1 / s ~ ∗ ) \Omega=w(|t^*|+1/\widetilde{s}^*) Ω = w ( ∣ t ∗ ∣ + 1/ s ∗ ) , where s ~ ∗ \widetilde{s}^* s ∗ is the square root of the second cumulant of G ~ \widetilde{G} G at t ∗ t^* t ∗ ; s ~ ∗ \widetilde{s}^* s ∗ takes the place of s ∗ s^* s ∗ in H ^ \widehat{H} H , in Ω \Omega Ω and in the error term below. θ ∗ \theta^* θ ∗ stays the peak of ∣ G ∣ |G| ∣ G ∣ . Then, for every T T T ,
R a / q ( T ) = A a / q ∗ ( T ) + O ( Ω ∣ G ( θ ∗ ) ∣ N − 3 / 2 + 2 ε s ∗ ) + O ( 2 n e ( − log 2 + ℓ q ∗ + o ( 1 ) ) π ( N ) ) , ℓ q ∗ = sup X ≥ 1 / ( 2 q ) A q ( X ) φ ( q ) . R_{a/q}(T)=\mathcal{A}_{a/q}^*(T)+O\left(\Omega|G(\theta^*)|\frac{N^{-3/2+2\varepsilon}}{s^*}\right)+O\left(2^n e^{(-\log2+\ell_q^*+o(1))\pi(N)}\right),\qquad\ell_q^*=\sup_{X\ge1/(2q)}\frac{A_q(X)}{\varphi(q)}. R a / q ( T ) = A a / q ∗ ( T ) + O ( Ω∣ G ( θ ∗ ) ∣ s ∗ N − 3/2 + 2 ε ) + O ( 2 n e ( − l o g 2 + ℓ q ∗ + o ( 1 )) π ( N ) ) , ℓ q ∗ = X ≥ 1/ ( 2 q ) sup φ ( q ) A q ( X ) . In particular, if V ( a / q ) = ∅ \mathcal{V}(a/q)=\varnothing V ( a / q ) = ∅ , then R a / q ( T ) = A a / q ∗ ( T ) ( 1 + O ( N − 1 + 2 ε ) ) + O ( 2 n e ( − log 2 + ℓ q ∗ + o ( 1 ) ) π ( N ) ) R_{a/q}(T)=\mathcal{A}_{a/q}^*(T)(1+O(N^{-1+2\varepsilon}))+O(2^n e^{(-\log2+\ell_q^*+o(1))\pi(N)}) R a / q ( T ) = A a / q ∗ ( T ) ( 1 + O ( N − 1 + 2 ε )) + O ( 2 n e ( − l o g 2 + ℓ q ∗ + o ( 1 )) π ( N ) ) uniformly for ∣ z ∣ ≤ log N |z|\le\sqrt{\log N} ∣ z ∣ ≤ log N .
(other arcs) For q ∉ E q\notin\mathcal{E} q ∈ / E , ∣ R a / q ( T ) ∣ ≤ 2 n exp ( ( − log 2 + ℓ q ∗ + o ( 1 ) ) π ( N ) ) |R_{a/q}(T)|\le2^n\exp((-\log2+\ell_q^*+o(1))\pi(N)) ∣ R a / q ( T ) ∣ ≤ 2 n exp (( − log 2 + ℓ q ∗ + o ( 1 )) π ( N )) , and ℓ q ∗ = ℓ q \ell_q^*=\ell_q ℓ q ∗ = ℓ q whenever A q A_q A q has a first local minimum X q X_q X q (Remark below).
Note (the cumulants of the sinc factor). At t ∗ t^* t ∗ , the cumulants of e i w t / 2 sinc ( w t / 2 ) e^{iwt/2}\operatorname{sinc}(wt/2) e i w t /2 sinc ( w t /2 ) are w / 2 + i w 2 t ∗ / 12 w/2+iw^2t^*/12 w /2 + i w 2 t ∗ /12 , w 2 / 12 + w 4 t ∗ 2 / 240 w^2/12+w^4t^{*2}/240 w 2 /12 + w 4 t ∗ 2 /240 , − i w 4 t ∗ / 120 -iw^4t^*/120 − i w 4 t ∗ /120 and − w 4 / 120 − w 6 t ∗ 2 / 504 -w^4/120-w^6t^{*2}/504 − w 4 /120 − w 6 t ∗ 2 /504 to leading order. Since w = q / 2 ≤ P w=q/2\le\mathcal{P} w = q /2 ≤ P and ∣ t ∗ ∣ ≪ N − 1 e − c log N |t^*|\ll N^{-1}e^{-c\sqrt{\log N}} ∣ t ∗ ∣ ≪ N − 1 e − c l o g N (Lemma W(2)), w 2 ∣ t ∗ ∣ ≤ 1 w^2|t^*|\le1 w 2 ∣ t ∗ ∣ ≤ 1 for N N N large, and they are w / 2 w/2 w /2 , w 2 / 12 w^2/12 w 2 /12 , 0 0 0 , − w 4 / 120 -w^4/120 − w 4 /120 up to O ( w 2 ∣ t ∗ ∣ ( 1 + w 2 ) ) O(w^2|t^*|(1+w^2)) O ( w 2 ∣ t ∗ ∣ ( 1 + w 2 )) .
Remark (the lobe exponent). Suppose A q A_q A q has a first local minimum X q X_q X q . Then 1 / ( 2 q ) ≤ X q 1/(2q)\le X_q 1/ ( 2 q ) ≤ X q (Lemma Q(1)), and A q A_q A q is non-increasing on ( 0 , X q ] (0,X_q] ( 0 , X q ] : A q A_q A q is continuous on ( 0 , ∞ ) (0,\infty) ( 0 , ∞ ) and strictly decreasing on ( 0 , 1 / ( 2 q ) ) (0,1/(2q)) ( 0 , 1/ ( 2 q )) , and if A q ( y ) > A q ( x ) A_q(y)>A_q(x) A q ( y ) > A q ( x ) for some 0 < x < y ≤ X q 0<x<y\le X_q 0 < x < y ≤ X q , the minimum of A q A_q A q on [ x ′ , y ] [x',y] [ x ′ , y ] , with x ′ < x x'<x x ′ < x small, would be attained inside and be a local minimum before X q X_q X q . Hence ℓ q ∗ = max ( A q ( 1 / ( 2 q ) ) / φ ( q ) , ℓ q ) \ell_q^*=\max(A_q(1/(2q))/\varphi(q),\ell_q) ℓ q ∗ = max ( A q ( 1/ ( 2 q )) / φ ( q ) , ℓ q ) . For q ∈ E q\in\mathcal{E} q ∈ E we have ℓ q ∗ < c q \ell_q^*<c_q ℓ q ∗ < c q by Lemma P, and ∣ G ( θ ∗ ) ∣ = 2 n exp ( π ( N ) ( − log 2 + c q ) + o ( π ( N ) ) ) |G(\theta^*)|=2^n\exp(\pi(N)(-\log2+c_q)+o(\pi(N))) ∣ G ( θ ∗ ) ∣ = 2 n exp ( π ( N ) ( − log 2 + c q ) + o ( π ( N ))) by Lemma W(3) and Siegel–Walfisz. Hence, for each fixed q ∈ E q\in\mathcal{E} q ∈ E , the lobe term of (2) is ≤ e − γ q π ( N ) ∣ G ( θ ∗ ) ∣ \le e^{-\gamma_q\pi(N)}|G(\theta^*)| ≤ e − γ q π ( N ) ∣ G ( θ ∗ ) ∣ with γ q = ( c q − ℓ q ∗ ) / 4 > 0 \gamma_q=(c_q-\ell_q^*)/4>0 γ q = ( c q − ℓ q ∗ ) /4 > 0 , and so exponentially smaller than the arc term wherever φ ( z ) / s ∗ \varphi(z)/s^* φ ( z ) / s ∗ is not exponentially small, for instance for ∣ z ∣ ≤ log N |z|\le\sqrt{\log N} ∣ z ∣ ≤ log N when V ( a / q ) = ∅ \mathcal{V}(a/q)=\varnothing V ( a / q ) = ∅ . Lemma P gives no quantitative gap c q − ℓ q ∗ c_q-\ell_q^* c q − ℓ q ∗ , so this is not uniform in q ≤ P q\le\mathcal{P} q ≤ P ; numerically the gap is about 0.016, 0.009 and 0.006 for q = 6 q=6 q = 6 , 10, 14. For q ∉ E q\notin\mathcal{E} q ∈ / E , A q ( 1 / ( 2 q ) ) ≤ φ ( q ) c q − 0 ≤ ℓ q A_q(1/(2q))\le\varphi(q)c_q-0\le\ell_q A q ( 1/ ( 2 q )) ≤ φ ( q ) c q − 0 ≤ ℓ q (the first inequality by Lemma Q(1) and continuity) (every divisor term of A q ( X ) A_q(X) A q ( X ) has modulus ≤ κ / X \le\kappa/X ≤ κ / X , so A q ( X ) → 0 A_q(X)\to0 A q ( X ) → 0 as X → ∞ X\to\infty X → ∞ ), so ℓ q ∗ = ℓ q \ell_q^*=\ell_q ℓ q ∗ = ℓ q .
Proof.
(1) By Lemma M, ∑ p log ∣ cos π p θ ∣ ≤ ∑ p K M ( p θ ) = π ( N ) K ^ M ( 0 ) + ∑ 1 ≤ ∣ m ∣ ≤ M K ^ M ( m ) ∑ p ≤ N e ( m p θ ) \sum_p \log|\cos\pi p\theta| \le\sum_p K_M(p\theta)=\pi(N)\widehat{K}_M(0)+\sum_{1\le|m|\le M}\widehat{K}_M(m)\sum_{p\le N}e(mp\theta) ∑ p log ∣ cos π pθ ∣ ≤ ∑ p K M ( pθ ) = π ( N ) K M ( 0 ) + ∑ 1 ≤ ∣ m ∣ ≤ M K M ( m ) ∑ p ≤ N e ( m pθ ) , with K ^ M ( 0 ) ≤ − log 2 + C M − 1 / 2 \widehat{K}_M(0)\le-\log2+CM^{-1/2} K M ( 0 ) ≤ − log 2 + C M − 1/2 and ∣ K ^ M ( m ) ∣ ≤ C |\widehat{K}_M(m)|\le C ∣ K M ( m ) ∣ ≤ C .
If k ≤ P / M k\le\mathfrak{P}/M k ≤ P / M , then ∣ θ − b / ( m k ) ∣ ≤ P / ( m k N M ) ≤ P / ( m k N ) |\theta-b/(mk)|\le\mathfrak{P}/(mkNM)\le\mathfrak{P}/(mkN) ∣ θ − b / ( mk ) ∣ ≤ P / ( mk N M ) ≤ P / ( mk N ) , with m k ≤ P mk\le\mathfrak{P} mk ≤ P . Reducing b / ( m k ) b/(mk) b / ( mk ) to lowest terms a ′ / q ′ a'/q' a ′ / q ′ , q ′ ≤ m k q'\le mk q ′ ≤ mk , this puts θ \theta θ in M ( a ′ / q ′ ) \mathfrak{M}(a'/q') M ( a ′ / q ′ ) , a contradiction. So P / M < k ≤ N M / P \mathfrak{P}/M<k\le NM/\mathfrak{P} P / M < k ≤ N M / P .
Vinogradov–Vaughan [IK, Thm 13.6] then gives ∑ p ≤ N e ( m p θ ) ≪ N ( M / P ) 1 / 2 log 4 N \sum_{p\le N}e(mp\theta)\ll N(M/\mathfrak{P})^{1/2}\log^4N ∑ p ≤ N e ( m pθ ) ≪ N ( M / P ) 1/2 log 4 N (the term N 4 / 5 log 4 N N^{4/5}\log^4N N 4/5 log 4 N is smaller), after removing the prime powers, O ( N log N ) O(\sqrt{N}\log N) O ( N log N ) , and the weight log p \log p log p by partial summation.
(3) As in (2), split at ∣ X ∣ = N − 1 / 2 |X|=N^{-1/2} ∣ X ∣ = N − 1/2 and use Lemma L0 _0 0 for ∣ X ∣ ≤ N − 1 / 2 |X|\le N^{-1/2} ∣ X ∣ ≤ N − 1/2 . For q ∉ C q\notin\mathcal{C} q ∈ / C there is no vanishing factor, c q = 0 c_q=0 c q = 0 , and log ∣ F N ∗ ( a / q ) ∣ = n log 2 − π ( N ) log 2 + o ( π ( N ) ) \log|F_N^*(a/q)|=n\log2-\pi(N)\log2+o(\pi(N)) log ∣ F N ∗ ( a / q ) ∣ = n log 2 − π ( N ) log 2 + o ( π ( N )) by Siegel–Walfisz. For ∣ X ∣ ≥ N − 1 / 2 |X|\ge N^{-1/2} ∣ X ∣ ≥ N − 1/2 ,
Lemma L applies with A q ( ∣ X ∣ ) / φ ( q ) ≤ ℓ q ∗ A_q(|X|)/\varphi(q) \le\ell_q^* A q ( ∣ X ∣ ) / φ ( q ) ≤ ℓ q ∗ for ∣ X ∣ ≥ 1 / ( 2 q ) |X| \ge1/(2q) ∣ X ∣ ≥ 1/ ( 2 q ) , and with A q ( ∣ X ∣ ) < A q ( 0 ) = 0 ≤ φ ( q ) ℓ q ∗ A_q(|X|) < A_q(0) = 0 \le\varphi(q)\ell_q^* A q ( ∣ X ∣ ) < A q ( 0 ) = 0 ≤ φ ( q ) ℓ q ∗ for N − 1 / 2 ≤ ∣ X ∣ < 1 / ( 2 q ) N^{-1/2} \le|X| < 1/(2q) N − 1/2 ≤ ∣ X ∣ < 1/ ( 2 q ) (Lemma Q(1)); ℓ q ∗ ≥ 0 \ell_q^* \ge0 ℓ q ∗ ≥ 0 because A q ( X ) → 0 A_q(X) \to0 A q ( X ) → 0 as X → ∞ X \to\infty X → ∞ . □
Remark (the formula of Proposition C). If ν a / q ≪ N 3 / 2 + ε / 2 \nu_{a/q} \ll N^{3/2+\varepsilon/2} ν a / q ≪ N 3/2 + ε /2 , as under GRH for the odd characters mod q q q (for fixed q q q ), the peak lies well inside the core of a / q a/q a / q , and the linear tilt e − ν σ e^{-\nu\sigma} e − ν σ on the core is dominated by the Gaussian decay. The same proof, run with the expansion at a / q a/q a / q instead of θ ∗ \theta^* θ ∗ , then gives (2) with the arc term A a / q \mathcal{A}_{a/q} A a / q of Proposition C. When V ( a / q ) = ∅ \mathcal{V}(a/q)=\varnothing V ( a / q ) = ∅ the error is relative, O ( N − 1 / 2 + 3 ε ) O(N^{-1/2+3\varepsilon}) O ( N − 1/2 + 3 ε ) , uniformly for ∣ Re z ∣ ≤ log N |\operatorname{Re}z| \le\sqrt{\log N} ∣ Re z ∣ ≤ log N ; z z z is now complex, with ∣ Im z ∣ ≍ ∣ ν ∣ / s ∗ |\operatorname{Im}z| \asymp|\nu|/s^* ∣ Im z ∣ ≍ ∣ ν ∣/ s ∗ . When V ( a / q ) = { w } \mathcal{V}(a/q)=\{w\} V ( a / q ) = { w } the bound is absolute and centred at a / q a/q a / q : with s ~ 2 \tilde{s}^2 s ~ 2 the second cumulant of G ~ \widetilde{G} G at a / q a/q a / q , for every T T T and every δ > 0 \delta>0 δ > 0 ,
∣ R a / q ( T ) − A a / q ( T ) ∣ ≤ ∣ G ( a / q ) ∣ ( w e ν 2 / ( 2 s ~ 2 ) N − 3 / 2 + 7 ε s ~ 2 + w e − N 2 ε / ( 16384 log N ) + 4 e 4 ν 2 / S 2 e − N 2 ε / ( 2048 log N ) ) + 2 ⋅ 2 ( − log 2 + ℓ q ∗ + δ ) π ( N |R_{a/q}(T)-\mathcal{A}_{a/q}(T)| \le|G(a/q)|\left(\frac{we^{\nu^2/(2\tilde{s}^2)}N^{-3/2+7\varepsilon}}{\tilde{s}^2}+we^{-N^{2\varepsilon}/(16384\log N)}+4e^{4\nu^2/S_2}e^{-N^{2\varepsilon}/(2048\log N)}\right)+2\cdot2^{(-\log2+\ell_q^*+\delta)\pi(N} ∣ R a / q ( T ) − A a / q ( T ) ∣ ≤ ∣ G ( a / q ) ∣ ( s ~ 2 w e ν 2 / ( 2 s ~ 2 ) N − 3/2 + 7 ε + w e − N 2 ε / ( 16384 l o g N ) + 4 e 4 ν 2 / S 2 e − N 2 ε / ( 2048 l o g N ) ) + 2 ⋅ 2 ( − l o g 2 + ℓ q ∗ + δ ) π ( N
for N ≥ N 0 ( δ ) N \ge N_0(\delta) N ≥ N 0 ( δ ) . The main term w ⋅ H ^ ′ ≈ − w ⋅ z φ ( z ) / s 2 w\cdot\widehat{H}'\approx-w\cdot z\varphi(z)/s^2 w ⋅ H ′ ≈ − w ⋅ z φ ( z ) / s 2 vanishes at z = 0 z=0 z = 0 , so no relative bound holds near it. This is the form tested in Table 2. Unconditionally the expansion must be centred at the peak θ ∗ \theta^* θ ∗ , because ν a / q \nu_{a/q} ν a / q is only known to be ≪ N 2 e − c log N \ll N^{2}e^{-c\sqrt{\log N}} ≪ N 2 e − c l o g N .
The argument uses no hypothesis on the zeros. It is stated arc by arc. A single expansion “all arcs plus an exponentially small error” is not available pointwise in T T T : the Edgeworth error of the main term is polynomially small, larger than any secondary arc. Pointwise, the arcs are invisible (Table 3 ); they are leading and exact in the residue-class counts.
Table 3. Relative error of the estimates of r N ( T ) r_N(T) r N ( T ) at T = S N / 2 + k σ T=S_N/2+k\sigma T = S N /2 + k σ .
The count itself: what the Gaussian already gives
Figure 3. Relative error of the estimates of r N ( T ) r_N(T) r N ( T ) for W N = { 1 } ∪ { p ≤ 2000 } W_N=\{1\}\cup\{p\le2000\} W N = { 1 } ∪ { p ≤ 2000 } (304 weights), against the exact counts of a floating-point dynamic program, for ∣ T − S / 2 ∣ ≤ 4.2 σ |T-S/2|\le4.2\sigma ∣ T − S /2∣ ≤ 4.2 σ . Orange: the Gaussian at lattice scale 1, about 2 ⋅ 10 − 3 2\cdot10^{-3} 2 ⋅ 1 0 − 3 at the centre and 10 − 1 10^{-1} 1 0 − 1 at 4 σ 4\sigma 4 σ . Blue: the Edgeworth expansion of order 3 in 1 / n 1/n 1/ n (one order beyond Table 3 ; the method of BENCH5, problem P4), about 10 − 10 10^{-10} 1 0 − 10 at the centre and 10 − 6 10^{-6} 1 0 − 6 at 4 σ 4\sigma 4 σ .
The positivity of the count does not constrain the races. The arcs enter r N ( T ) r_N(T) r N ( T ) only through terms exponentially smaller than the main Gaussian: the strongest arc, q = 6 q=6 q = 6 , has relative height e − 0.144 π ( N ) e^{-0.144\pi(N)} e − 0.144 π ( N ) . A race changes the exponent by O ( N β / log N ) O(N^\beta/\log N) O ( N β / log N ) , which competes with π ( N ) \pi(N) π ( N ) only if β = 1 \beta=1 β = 1 . Positivity lives at the level of the prime number theorem. The races live in the heights.
Prime races on the arcs
The characters seen by an arc
Expanding in Dirichlet characters, H a / q ( N ) = ∑ χ ≠ χ 0 A χ π ( N , χ ) H_{a/q}(N)=\sum_{\chi\ne\chi_0}A_\chi\pi(N,\chi) H a / q ( N ) = ∑ χ = χ 0 A χ π ( N , χ ) with A χ = φ ( q ) − 1 ∑ r c r χ ‾ ( r ) A_\chi=\varphi(q)^{-1}\sum_r c_r\overline{\chi}(r) A χ = φ ( q ) − 1 ∑ r c r χ ( r ) . The principal character drops out because ∑ r c r = 0 \sum_r c_r=0 ∑ r c r = 0 , and every odd character drops out because c − r = c r c_{-r}=c_r c − r = c r . Let X ( a / q ) = { χ ≠ χ 0 : A χ ≠ 0 } X(a/q)=\{\chi\ne\chi_0:A_\chi\ne0\} X ( a / q ) = { χ = χ 0 : A χ = 0 } , a set of even characters.
A one-sided criterion
Proposition 3 (Landau’s theorem on an arc). Fix q q q and a a a with ( a , q ) = 1 (a,q)=1 ( a , q ) = 1 . Assume
( R ) (R) ( R ) L ( σ , χ ) ≠ 0 L(\sigma,\chi)\ne0 L ( σ , χ ) = 0 for σ ∈ ( 1 2 , 1 ] \sigma\in\left(\frac{1}{2},1\right] σ ∈ ( 2 1 , 1 ] and χ ∈ X ( a / q ) \chi\in X(a/q) χ ∈ X ( a / q ) ;
( N ) (N) ( N ) for every ρ \rho ρ with Re ρ > 1 2 \operatorname{Re}\rho>\frac{1}{2} Re ρ > 2 1 , ∑ χ ∈ X A χ m χ ( ρ ) ≠ 0 \sum_{\chi\in X}A_{\chi}m_{\chi}(\rho)\ne0 ∑ χ ∈ X A χ m χ ( ρ ) = 0 whenever some m χ ( ρ ) ≠ 0 m_{\chi}(\rho)\ne0 m χ ( ρ ) = 0 , where m χ ( ρ ) m_{\chi}(\rho) m χ ( ρ ) is the multiplicity of ρ \rho ρ as a zero of L ( s , χ ) L(s,\chi) L ( s , χ ) .
Then the following are equivalent:
every L ( s , χ ) L(s,\chi) L ( s , χ ) , χ ∈ X ( a / q ) \chi\in X(a/q) χ ∈ X ( a / q ) , has all its zeros in the critical strip 0 < Re s < 1 0<\operatorname{Re}s<1 0 < Re s < 1 on Re s = 1 2 \operatorname{Re}s=\frac{1}{2} Re s = 2 1 ;
for every ε > 0 \varepsilon>0 ε > 0 there is C ε C_{\varepsilon} C ε with H a / q ( N ) ≤ C ε N 1 2 + ε H_{a/q}(N)\le C_{\varepsilon}N^{\frac{1}{2}+\varepsilon} H a / q ( N ) ≤ C ε N 2 1 + ε for all N ≥ 2 N\ge2 N ≥ 2 ;
for every ε > 0 \varepsilon>0 ε > 0 there is C ε C_{\varepsilon} C ε with H a / q ( N ) ≥ − C ε N 1 2 + ε H_{a/q}(N)\ge-C_{\varepsilon}N^{\frac{1}{2}+\varepsilon} H a / q ( N ) ≥ − C ε N 2 1 + ε for all N ≥ 2 N\ge2 N ≥ 2 .
If (2) holds for one ε \varepsilon ε , every zero of every L ( s , χ ) L(s,\chi) L ( s , χ ) , χ ∈ X \chi\in X χ ∈ X , has β ≤ 1 2 + ε \beta\le\frac{1}{2}+\varepsilon β ≤ 2 1 + ε .
Proof. (1) ⇒ \Rightarrow ⇒ (2), (3): under (1), π ( N , χ ) = O ( N log N ) \pi(N,\chi)=O(\sqrt{N}\log N) π ( N , χ ) = O ( N log N ) [Davenport, Ch. 20], so H = O ( N log N ) H=O(\sqrt{N}\log N) H = O ( N log N ) .
(2) ⇒ \Rightarrow ⇒ (1). Put θ = 1 2 + ε \theta=\frac{1}{2}+\varepsilon θ = 2 1 + ε and D ( s ) = ∑ p ∤ q c p m o d q p − s D(s)=\sum_{p\nmid q}c_p\mathop{\rm mod}q p^{-s} D ( s ) = ∑ p ∤ q c p mod q p − s . Then D ( s ) = ∑ χ ∈ X A χ ∑ k ≥ 1 μ ( k ) k − 1 log L ( k s , χ k ) = ∑ χ ∈ X A χ log L ( s , χ ) + h ( s ) D(s)=\sum_{\chi\in X}A_{\chi}\sum_{k\ge1}\mu(k)k^{-1}\log L(ks,\chi^{k})=\sum_{\chi\in X}A_{\chi}\log L(s,\chi)+h(s) D ( s ) = ∑ χ ∈ X A χ ∑ k ≥ 1 μ ( k ) k − 1 log L ( k s , χ k ) = ∑ χ ∈ X A χ log L ( s , χ ) + h ( s ) , with h h h holomorphic on Re s > 1 2 \operatorname{Re}s>\frac{1}{2} Re s > 2 1 . Since L ( 1 , χ ) ≠ 0 L(1,\chi)\ne0 L ( 1 , χ ) = 0 , D D D is regular at s = 1 s=1 s = 1 , and by (R) on the real segment ( θ , 1 ] (\theta,1] ( θ , 1 ] . By (2), G ( x ) = C ε x θ − H ( x ) ≥ 0 G(x)=C_{\varepsilon}x^{\theta}-H(x)\ge0 G ( x ) = C ε x θ − H ( x ) ≥ 0 , and ∫ 1 ∞ G ( x ) x − s − 1 d x = C ε / ( s − θ ) − D ( s ) / s \int_{1}^{\infty}G(x)x^{-s-1}\,dx=C_{\varepsilon}/(s-\theta)-D(s)/s ∫ 1 ∞ G ( x ) x − s − 1 d x = C ε / ( s − θ ) − D ( s ) / s for Re s > 1 \operatorname{Re}s>1 Re s > 1 . By Landau’s theorem on Mellin transforms of non-negative functions [Landau; Ingham, Ch. V] the abscissa of convergence is a real singularity, so it is ≤ θ \le\theta ≤ θ , and D D D continues holomorphically to Re s > θ \operatorname{Re}s>\theta Re s > θ . A zero ρ \rho ρ of some L ( s , χ ) L(s,\chi) L ( s , χ ) with Re ρ > θ \operatorname{Re}\rho>\theta Re ρ > θ would give D D D a logarithmic branch point with coefficient ∑ χ A χ m χ ( ρ ) \sum_{\chi}A_{\chi}m_{\chi}(\rho) ∑ χ A χ m χ ( ρ ) , non-zero by (N): a contradiction. So β ≤ 1 2 + ε \beta\le\frac{1}{2}+\varepsilon β ≤ 2 1 + ε for every ε \varepsilon ε , and the functional equation of the primitive character χ ∗ \chi^{*} χ ∗ inducing χ \chi χ gives β ≥ 1 2 \beta\ge\frac{1}{2} β ≥ 2 1 , since L ( s , χ ) = L ( s , χ ∗ ) ∏ p ∣ q ( 1 − χ ∗ ( p ) p − s ) L(s,\chi)=L(s,\chi^{*})\prod_{p\mid q}(1-\chi^{*}(p)p^{-s}) L ( s , χ ) = L ( s , χ ∗ ) ∏ p ∣ q ( 1 − χ ∗ ( p ) p − s ) and the Euler factors do not vanish on Re s > 0 \operatorname{Re}s>0 Re s > 0 . (3) ⇒ \Rightarrow ⇒ (1) is the same with G = C ε x θ + H G=C_{\varepsilon}x^{\theta}+H G = C ε x θ + H .
The hypotheses are verified for q = 8 , 10 , 14 q=8,10,14 q = 8 , 10 , 14 .
( N ) (N) ( N ) is automatic when X X X has one element (q = 8 , 10 q=8,10 q = 8 , 10 ). For q = 14 q=14 q = 14 , X = { χ , χ ˉ } X=\{\chi,\bar{\chi}\} X = { χ , χ ˉ } , A χ ˉ = A ˉ χ A_{\bar{\chi}}=\bar{A}_{\chi} A χ ˉ = A ˉ χ and A χ ( a ) = χ ( a ) A χ ( 1 ) A_{\chi}(a)=\chi(a)A_{\chi}(1) A χ ( a ) = χ ( a ) A χ ( 1 ) with χ ( a ) \chi(a) χ ( a ) a cube root of unity; at a = 1 a=1 a = 1 , A χ / A ˉ χ = 0.0101 − 0.99995 i A_{\chi}/\bar{A}_{\chi}=0.0101-0.99995i A χ / A ˉ χ = 0.0101 − 0.99995 i , and Re A χ ( a ) ∈ { 0.1717 , 0.0614 , − 0.2331 } \operatorname{Re}A_{\chi}(a)\in\{0.1717,0.0614,-0.2331\} Re A χ ( a ) ∈ { 0.1717 , 0.0614 , − 0.2331 } is never 0, so A χ ( a ) / A ˉ χ ( a ) A_{\chi}(a)/\bar{A}_{\chi}(a) A χ ( a ) / A ˉ χ ( a ) is never real and negative and a zero of L ( s , χ ˉ ) L(s,\bar{\chi}) L ( s , χ ˉ ) , the conjugate of a zero of L ( s , χ ) L(s,\chi) L ( s , χ ) , cannot cancel it.
( R ) (R) ( R ) is certified by interval arithmetic (Arb, 128 bits; also checked at 64 and 256 bits). We write L ( s , χ ) = q − s ∑ a χ ( a ) Z ( s , a / q ) L(s,\chi)=q^{-s}\sum_a\chi(a)Z(s,a/q) L ( s , χ ) = q − s ∑ a χ ( a ) Z ( s , a / q ) , with Z Z Z the Hurwitz zeta function with its pole removed. The segment [ 1 2 , 1 − 2 − 8 ] \left[\frac{1}{2},1-2^{-8}\right] [ 2 1 , 1 − 2 − 8 ] is covered by balls with a derivative enclosure, and [ 1 − 2 − 8 , 1 ] [1-2^{-8},1] [ 1 − 2 − 8 , 1 ] is handled by a Cauchy estimate on ∣ s − 1 ∣ = 1 4 |s-1|=\frac{1}{4} ∣ s − 1∣ = 4 1 . Table 4 lists the primitive characters; (R) for the characters mod 10 and 14 follows because 1 − χ ∗ ( 2 ) 2 − σ ≠ 0 1-\chi^{*}(2)2^{-\sigma}\ne0 1 − χ ∗ ( 2 ) 2 − σ = 0 for real σ > 0 \sigma>0 σ > 0 , and for χ ˉ \bar{\chi} χ ˉ because L ( σ , χ ˉ ) L(\sigma,\bar{\chi}) L ( σ , χ ˉ ) is the complex conjugate of L ( σ , χ ) L(\sigma,\chi) L ( σ , χ ) .
Table 4.
Table 4 (PDF p. 18).
Table 4 (PDF p. 19). Certification of ( R ) \mathit{(R)} ( R ) . This agrees with [Rosser], who excludes real zeros for real characters of modulus < 227 < 227 < 227 , and with [Rumely], who verifies GRH up to height 10 4 10^{4} 1 0 4 for primitive characters of conductor ≤ 13 \le13 ≤ 13 .
For q = 8 q = 8 q = 8 , 10 10 10 and 14 14 14 the equivalences (1) ⇔ \Leftrightarrow ⇔ (2) ⇔ \Leftrightarrow ⇔ (3) are therefore unconditional theorems. GRH for the characters seen by these arcs is a statement about counting subsets of primes: the Fourier coefficient of the subset-sum count at a / q a/q a / q , or of its first moment when a factor vanishes (Remark 3.1), never rises above 2 π ( N ) e π ( N ) w ‾ ( q ) ⋅ O q ( 1 ) 2^{\pi(N)}e^{\pi(N)\overline{w}(q)}\cdot O_q(1) 2 π ( N ) e π ( N ) w ( q ) ⋅ O q ( 1 ) , with the exact π ( N ) \pi(N) π ( N ) , by more than a factor e C ε N 1 2 + ε e^{C_{\varepsilon}N^{\frac{1}{2}+\varepsilon}} e C ε N 2 1 + ε . Only one side is needed. (Replacing π ( N ) \pi(N) π ( N ) by li N \operatorname{li}N li N in this main term would add the error π ( N ) − li N \pi(N)-\operatorname{li}N π ( N ) − li N , a statement about ζ \zeta ζ .)
The case of weights ± 1 \pm1 ± 1 on two residue classes is the one-sided theorem of Knapowski and Turán [KT], which also needs the absence of real zeros; see [MS, Example 4.3 and Theorem 4.4]. Proposition 3 is the same mechanism with general real weights; we found no statement with weights log ∣ cos ( π r a / q ) ∣ \log|\cos(\pi r a/q)| log ∣ cos ( π r a / q ) ∣ .
No last sign change
Theorem S. For every a a a coprime to 14 14 14 , H a / 14 ( N ) = Ω ± ( N 1 2 − ε ) H_{a/14}(N) = \Omega_{\pm}(N^{\frac{1}{2}-\varepsilon}) H a /14 ( N ) = Ω ± ( N 2 1 − ε ) for every ε > 0 \varepsilon> 0 ε > 0 . In particular it changes sign infinitely often.
Proof. X ( a / 14 ) = { χ , χ ‾ } X(a/14)=\{\chi,\overline{\chi}\} X ( a /14 ) = { χ , χ } , the cubic characters mod 7. Suppose that G ( x ) = C x θ − H a / 14 ( x ) ≥ 0 G(x)=Cx^{\theta}-H_{a/14}(x)\ge0 G ( x ) = C x θ − H a /14 ( x ) ≥ 0 for x ≥ x 0 x\ge x_{0} x ≥ x 0 , with θ < 1 2 \theta<\frac{1}{2} θ < 2 1 ; the other sign is the same. The Mellin transform of G G G is C / ( s − θ ) − D ( s ) / s + C/(s-\theta)-D(s)/s+ C / ( s − θ ) − D ( s ) / s + (entire), with D ( s ) = ∑ χ ∈ X A χ ∑ k μ ( k ) k − 1 log L ( k s , χ k ) D(s)=\sum_{\chi\in X}A_{\chi}\sum_{k}\mu(k)k^{-1}\log L(ks,\chi^{k}) D ( s ) = ∑ χ ∈ X A χ ∑ k μ ( k ) k − 1 log L ( k s , χ k ) .
k = 1 k=1 k = 1 : real zeros of L ( s , χ ) L(s,\chi) L ( s , χ ) in [ 1 2 , 1 ] [\frac{1}{2},1] [ 2 1 , 1 ] are excluded by Table 4, which certifies the closed segment; real zeros in [ 1 3 , 1 2 ) [\frac{1}{3},\frac{1}{2}) [ 3 1 , 2 1 ) would give, by the functional equation, real zeros of L ( s , χ ‾ ) L(s,\overline{\chi}) L ( s , χ ) in ( 1 2 , 2 3 ] (\frac{1}{2},\frac{2}{3}] ( 2 1 , 3 2 ] , also excluded.
k = 2 k=2 k = 2 : χ 2 = χ ‾ \chi^{2}=\overline{\chi} χ 2 = χ is non-principal, so there is no singularity at real s > 1 3 s>\frac{1}{3} s > 3 1 for the same reason.
k = 3 k=3 k = 3 : χ 3 = χ 0 \chi^{3}=\chi_{0} χ 3 = χ 0 , singular at s = 1 3 s=\frac{1}{3} s = 3 1 only.
k ≥ 4 k\ge4 k ≥ 4 : holomorphic on Re s > 1 4 \operatorname{Re}s>\frac{1}{4} Re s > 4 1 .
So the first real singularity is at max ( θ , 1 3 ) < 1 2 \max(\theta,\frac{1}{3})<\frac{1}{2} max ( θ , 3 1 ) < 2 1 , and by Landau’s theorem D D D is holomorphic on Re s > max ( θ , 1 3 ) \operatorname{Re}s>\max(\theta,\frac{1}{3}) Re s > max ( θ , 3 1 ) . But L ( s , χ ) L(s,\chi) L ( s , χ ) has zeros ρ \rho ρ on Re s = 1 2 \operatorname{Re}s=\frac{1}{2} Re s = 2 1 [Rumely] (one with Im ρ ∈ [ 4.355 , 4.357 ] \operatorname{Im}\rho\in[4.355,4.357] Im ρ ∈ [ 4.355 , 4.357 ] is certified by Arb, see Data and code), where D D D has logarithmic branch points with coefficient A χ m χ ( ρ ) + A χ ‾ m χ ‾ ( ρ ) A_{\chi}m_{\chi}(\rho)+A_{\overline{\chi}}m_{\overline{\chi}}(\rho) A χ m χ ( ρ ) + A χ m χ ( ρ ) ; the term k = 2 k=2 k = 2 does not contribute there, since L ( 2 ρ , χ ‾ ) ≠ 0 L(2\rho,\overline{\chi})\ne0 L ( 2 ρ , χ ) = 0 on Re s = 1 \operatorname{Re}s=1 Re s = 1 . This is non-zero because A χ / A χ ‾ A_{\chi}/A_{\overline{\chi}} A χ / A χ is not real and negative; the argument of (N) applies to every ρ \rho ρ , on the line or off it. The dependence on a a a is only through A χ ( a ) = χ ( a ) A χ ( 1 ) A_{\chi}(a)=\chi(a)A_{\chi}(1) A χ ( a ) = χ ( a ) A χ ( 1 ) ; this rotates A χ / A χ ‾ A_{\chi}/A_{\overline{\chi}} A χ / A χ by χ ( a ) 2 \chi(a)^{2} χ ( a ) 2 , and the three resulting values of Re A χ ( a ) \operatorname{Re}A_{\chi}(a) Re A χ ( a ) are non-zero (see (N) above).
For q = 8 q=8 q = 8 and 10 10 10 the single real character has χ 2 = χ 0 \chi^{2}=\chi_{0} χ 2 = χ 0 , and the squares of the primes put a real singularity at s = 1 2 s=\frac{1}{2} s = 2 1 : the Chebyshev bias. Landau’s argument does not exclude a last sign change in the direction of the bias; Littlewood’s method, through the alignment of many zeros, does this for races of a single real character [Littlewood; KT].
The principal arc carries ζ \zeta ζ
The heights see only non-principal characters because the mean of the weights was subtracted. ζ \zeta ζ is in what was subtracted: in the main term π ( N ) ( log 2 + w ˉ ( q ) ) \pi(N)(\log2+\bar{w}(q)) π ( N ) ( log 2 + w ˉ ( q )) , whose error is π ( N ) − li N \pi(N)-\operatorname{li}N π ( N ) − li N , and, on the arc at q = 1 q=1 q = 1 , in the centre and width of the central Gaussian.
Proposition 30 (centre and width of the prime subset sums). For a uniformly random subset of the primes ≤ N \le N ≤ N , the sum T = ∑ x p p T=\sum x_p p T = ∑ x p p has mean 1 2 M 1 ( N ) \frac{1}{2}M_1(N) 2 1 M 1 ( N ) and variance 1 4 M 2 ( N ) \frac{1}{4}M_2(N) 4 1 M 2 ( N ) , where M k ( N ) = ∑ p ≤ N p k M_k(N)=\sum_{p\le N}p^k M k ( N ) = ∑ p ≤ N p k . Let E k ( N ) = M k ( N ) − li ( N k + 1 ) E_k(N)=M_k(N)-\operatorname{li}(N^{k+1}) E k ( N ) = M k ( N ) − li ( N k + 1 ) ; note li ( N k + 1 ) = ∫ N t k d t / log t \operatorname{li}(N^{k+1})=\int^N t^k\,dt/\log t li ( N k + 1 ) = ∫ N t k d t / log t . For each fixed k ≥ 0 k\ge0 k ≥ 0 the following are equivalent:
the Riemann hypothesis;
for every ε > 0 \varepsilon>0 ε > 0 there is C ε C_\varepsilon C ε with E k ( N ) ≤ C ε N k + 1 2 + ε E_k(N)\le C_\varepsilon N^{k+\frac{1}{2}+\varepsilon} E k ( N ) ≤ C ε N k + 2 1 + ε for all N ≥ 2 N\ge2 N ≥ 2 ;
for every ε > 0 \varepsilon>0 ε > 0 there is C ε C_\varepsilon C ε with E k ( N ) ≥ − C ε N k + 1 2 + ε E_k(N)\ge-C_\varepsilon N^{k+\frac{1}{2}+\varepsilon} E k ( N ) ≥ − C ε N k + 2 1 + ε for all $N\ge 2.
Proof. (1) ⇒ \Rightarrow ⇒ (2), (3): E k ( N ) = ∫ N t k d ( π − li ) ( t ) = N k ( π − li ) ( N ) − k ∫ N t k − 1 ( π − li ) ( t ) d t = O ( N k + 1 2 log N ) E_k(N)=\int^N t^k\,d(\pi-\operatorname{li})(t)=N^k(\pi-\operatorname{li})(N)-k\int^N t^{k-1}(\pi-\operatorname{li})(t)\,dt=O(N^{k+\frac{1}{2}}\log N) E k ( N ) = ∫ N t k d ( π − li ) ( t ) = N k ( π − li ) ( N ) − k ∫ N t k − 1 ( π − li ) ( t ) d t = O ( N k + 2 1 log N ) , by von Koch’s bound π ( N ) − li N = O ( N log N ) \pi(N)-\operatorname{li}N=O(\sqrt{N}\log N) π ( N ) − li N = O ( N log N ) under RH [Koch]. (2) ⇒ \Rightarrow ⇒ (1): the Mellin transform of E k E_k E k is
1 s [ log ( ( s − k − 1 ) ζ ( s − k ) ) + ∑ j ≥ 2 μ ( j ) j log ζ ( j ( s − k ) ) ] + ( entire ) , \frac{1}{s}\left[\log\left((s-k-1)\zeta(s-k)\right)+\sum_{j\ge2}\frac{\mu(j)}{j}\log\zeta\left(j(s-k)\right)\right]+(\text{entire}), s 1 [ log ( ( s − k − 1 ) ζ ( s − k ) ) + j ≥ 2 ∑ j μ ( j ) log ζ ( j ( s − k ) ) ] + ( entire ) ,
using P ( w ) = ∑ p p − w = ∑ j μ ( j ) j − 1 log ζ ( j w ) P(w)=\sum_p p^{-w}=\sum_j\mu(j)j^{-1}\log\zeta(jw) P ( w ) = ∑ p p − w = ∑ j μ ( j ) j − 1 log ζ ( j w ) and ∫ ∞ t k − s d t / log t = − log ( s − k − 1 ) + ( entire ) \int^\infty t^{k-s}\,dt/\log t=-\log(s-k-1)+(\text{entire}) ∫ ∞ t k − s d t / log t = − log ( s − k − 1 ) + ( entire ) . The terms j ≥ 2 j\ge2 j ≥ 2 are holomorphic for Re s > k + 1 2 \operatorname{Re}s>k+\frac{1}{2} Re s > k + 2 1 . ζ ( σ ) < 0 \zeta(\sigma)<0 ζ ( σ ) < 0 on ( 0 , 1 ) (0,1) ( 0 , 1 ) , so there is no real singularity on ( k + 1 2 + ε , ∞ ) (k+\frac{1}{2}+\varepsilon,\infty) ( k + 2 1 + ε , ∞ ) , and Landau’s theorem applied to C ε x k + 1 2 + ε − E k ( x ) ≥ 0 C_\varepsilon x^{k+\frac{1}{2}+\varepsilon}-E_k(x)\ge0 C ε x k + 2 1 + ε − E k ( x ) ≥ 0 makes log ζ ( s − k ) \log\zeta(s-k) log ζ ( s − k ) holomorphic on Re s > k + 1 2 + ε \operatorname{Re}s>k+\frac{1}{2}+\varepsilon Re s > k + 2 1 + ε . A zero with Re ρ > 1 2 + ε \operatorname{Re}\rho>\frac{1}{2}+\varepsilon Re ρ > 2 1 + ε would give a branch point of coefficient m ( ρ ) ≠ 0 m(\rho)\ne0 m ( ρ ) = 0 ; so ζ \zeta ζ has no zero on Re s > 1 2 \operatorname{Re}s>\frac{1}{2} Re s > 2 1 , and the functional equation gives RH. (3) ⇒ \Rightarrow ⇒ (1) is the same with C ε x k + 1 2 + ε + E k ( x ) ≥ 0 C_\varepsilon x^{k+\frac{1}{2}+\varepsilon}+E_k(x)\ge0 C ε x k + 2 1 + ε + E k ( x ) ≥ 0 , after increasing C ε C_\varepsilon C ε by 1 / log 2 1/\log2 1/ log 2 to cover the growth of li ( x k + 1 ) \operatorname{li}(x^{k+1}) li ( x k + 1 ) between consecutive integers. □
The case k = 0 k=0 k = 0 is the classical one-sided form for π ( N ) − li N \pi(N)-\operatorname{li}N π ( N ) − li N . The case k = 1 k=1 k = 1 is the centre of the Gaussian, the cumulative prime sum of [CPS]. The case k = 2 k=2 k = 2 says that RH is equivalent to the width of the central Gaussian of the prime subset sums never exceeding its prediction li ( N 3 ) / 2 \sqrt{\operatorname{li}(N^3)}/2 li ( N 3 ) /2 by more than a factor 1 + O ( N − 1 2 + ε ) 1+O(N^{-\frac{1}{2}+\varepsilon}) 1 + O ( N − 2 1 + ε ) , on one side. With the primes up to 10 8 10^8 1 0 8 , E 2 ( N ) / N 5 / 2 E_2(N)/N^{5/2} E 2 ( N ) / N 5/2 lies between − 0.128 -0.128 − 0.128 and − 0.0017 -0.0017 − 0.0017 at 25 values of N N N from 10 2 10^2 1 0 2 to 10 8 10^8 1 0 8 , always negative: the analogue of π ( N ) < li N \pi(N)<\operatorname{li}N π ( N ) < li N in the computed range.
Figure 4 shows the three cases. It is a computation in a finite range and proves nothing about RH.
Figure 4. E k ( N ) / N k + 1 / 2 E_k(N)/N^{k+1/2} E k ( N ) / N k + 1/2 for k = 0 k=0 k = 0 (π ( N ) − li N \pi(N)-\operatorname{li}N π ( N ) − li N ), k = 1 k=1 k = 1 (the centre) and k = 2 k=2 k = 2 (the width of the central Gaussian), at 25 values of N N N from 10 2 10^2 1 0 2 to 10 8 10^8 1 0 8 , log-spaced. By Proposition 30 , RH is equivalent, for each k k k , to the one-sided bound E k ( N ) ≤ C ε N k + 1 / 2 + ε E_k(N) \le C_\varepsilon N^{k+1/2+\varepsilon} E k ( N ) ≤ C ε N k + 1/2 + ε . All three are negative in the computed range; for k = 2 k=2 k = 2 the values lie between − 0.128 -0.128 − 0.128 and − 0.0017 -0.0017 − 0.0017 .
Proposition 30 is a reformulation, not a route to a proof: controlling these main terms at square-root scale is the error term of the prime number theorem.
The races measured
We computed H a / q ( N ) ⋅ log N / N H_{a/q}(N)\cdot\log N/\sqrt{N} H a / q ( N ) ⋅ log N / N for N ∈ [ 10 4 , 10 8 ] N \in[10^4,10^8] N ∈ [ 1 0 4 , 1 0 8 ] , at 3000 points in logarithmic scale, and compared it with the Rubinstein–Sarnak prediction [RS] under GRH and the linear independence of the zeros. The mean is μ = − φ ( q ) − 1 ∑ r c r # { b : b 2 ≡ r ( m o d q ) } \mu=-\varphi(q)^{-1}\sum_r c_r\#\{b:b^2\equiv r\pmod q\} μ = − φ ( q ) − 1 ∑ r c r # { b : b 2 ≡ r ( mod q )} , from the squares of the primes; the variance is ∑ χ ∣ A χ ∣ 2 ∑ γ ( 1 4 + γ 2 ) − 1 \sum_\chi|A_\chi|^2\sum_\gamma(\frac{1}{4}+\gamma^2)^{-1} ∑ χ ∣ A χ ∣ 2 ∑ γ ( 4 1 + γ 2 ) − 1 , with the sums over zeros computed exactly from L ( 1 , χ ) L(1,\chi) L ( 1 , χ ) and L ′ ( 1 , χ ) L'(1,\chi) L ′ ( 1 , χ ) through Hurwitz–Stieltjes constants.
The arcs as an algorithm
What changes for arbitrary weights
For an arbitrary set W W W the floor fails: o ( W ) > 1 o(W)>1 o ( W ) > 1 , the reachable set has gaps, and the greedy scan gets stuck. Two classical facts frame what can be hoped.
In the dense regime (2 n ≫ S 2^n \gg S 2 n ≫ S ) the only obstructions to representability, away from the ends, are congruences modulo small almost divisors [GM; BW]. Low-density instances fall to lattice reduction [LO; CJLOSS] and have no arcs: their spectrum is all sea.
The arcs see congruences: by Remark 3.1 the class counts N c ( q ) = # { S ⊆ W : ∑ S ≡ c ( m o d q ) } N_c(q)=\#\{S\subseteq W:\sum S\equiv c\pmod q\} N c ( q ) = # { S ⊆ W : ∑ S ≡ c ( mod q )} are the inverse discrete Fourier transform of F F F at the q q q -th roots of unity, computable exactly in O ( n q ) O(nq) O ( n q ) per modulus. The question is whether they can also guide a construction.
A decider and a constructor
Decider. It has two parts: residue obstructions from the exact N c ( q ) N_c(q) N c ( q ) , q ≤ 40 q \le40 q ≤ 40 , and in the bulk a Gaussian log-count (the arc at q = 1 q = 1 q = 1 ), corrected by the density of live classes, required to exceed 2. Against exact reachability (bitset dynamic programming):
Table 6. The arc decider. The obstructions are found automatically by the arcs; all errors are in the tails, where the Gaussian threshold is coarse.
Constructor by self-reduction. Weights are sorted decreasingly. At step k k k the two branches, "take w k w_k w k " (target T − w k T-w_k T − w k ) and "skip w k w_k w k " (target $T), are scored on the suffix: − ∞ -\infty − ∞ if a class count of the suffix vanishes, otherwise the Gaussian log-count plus the class correction. The constructor follows the larger score, which is to say the saddle point, and finishes exactly on a small block. Every output is verified.
With arcs only, down to the last weight, the success rate falls from 88% to 8% as n n n grows, and every failure happens in the last six weights or so: the macroscopic decisions are right, the endgame is microscopic. With the exact count on the final block, computed from the complete spectrum (all arcs a / ( S k + 1 ) a/(S_k+1) a / ( S k + 1 ) , which is the exact inverse transform), the success becomes 100% as soon as the final block keeps about 16 weights.
Why sixteen weights: an empirical Poisson rule
As a working model, the number of subsets of the remaining block hitting T T T exactly is treated as Poisson, with mean the local density λ ( T ) = 2 m G ( T ; S m / 2 , σ m 2 ) ⋅ ( class factor ) \lambda(T) = 2^mG(T;S_m/2,\sigma_m^2)\cdot(\text{class factor}) λ ( T ) = 2 m G ( T ; S m /2 , σ m 2 ) ⋅ ( class factor ) . For random weights and targets at the centre, Borgs, Chayes and Pittel prove that the count concentrates when its mean is large [BCP]; the Poisson form of the tail is a model. A branch estimated at λ \lambda λ is then empty with probability ≈ e − λ \approx e^{-\lambda} ≈ e − λ , and Pr ( success ) ≈ exp ( − ∑ k e − λ k ) \Pr(\text{success}) \approx\exp(-\sum_k e^{-\lambda_k}) Pr ( success ) ≈ exp ( − ∑ k e − λ k ) , dominated by the last steps.
Table 7. Empty chosen branch, about 1.3 ⋅ 10 6 1.3\cdot10^6 1.3 ⋅ 1 0 6 decisions. The model is accurate near λ = 4 \lambda= 4 λ = 4 and optimistic beyond (0.0038 against 0.0006 at λ = 7.6 \lambda= 7.6 λ = 7.6 ); § 8.6 shows that the true tail of the endgame count decays like a power of λ \lambda λ , not exponentially. The rule below is therefore empirical. To keep the failure below δ \delta δ over n n n decisions, and hand over to the exact endgame when the peak density of the remaining block, 2 m / 2 π σ m 2^m/\sqrt{2\pi\sigma_m} 2 m / 2 π σ m , drops below λ ∗ = ln ( n / δ ) \lambda^* = \ln(n/\delta) λ ∗ = ln ( n / δ ) . The block size at the handover solves 2 m ∗ = λ ∗ 2 π σ m ∗ 2^{m^*} = \lambda^*\sqrt{2\pi\sigma_{m^*}} 2 m ∗ = λ ∗ 2 π σ m ∗ , which gives m ∗ ≈ 15 m^* \approx15 m ∗ ≈ 15 –16 for small weights of a few hundred: the value observed.
With the filtered endgame of §5.6 a larger block costs little more, since the cost of a round grows only like ( λ ∗ ) 1 / 4 (\lambda^*)^{1/4} ( λ ∗ ) 1/4 , so the threshold can be raised ( λ ∗ = 5 ⋅ 10 4 (\lambda^* = 5 \cdot10^4 ( λ ∗ = 5 ⋅ 1 0 4 in Table 9′) and the Poisson misses of Table 9 disappear.
Dummies, blur and de-blurring
The solver reads the arcs directly on the original weights. This subsection explains why that reading is exact, through an augmentation that the solver itself never performs.
A simple augmentation restores the floor: insert dummy weights d = 1 + S d = 1+S d = 1 + S at the gaps (S S S the sum of the weights below the gap) until o ≤ 1 o \le1 o ≤ 1 . On the augmented set the reachable set is a single interval (K = 1 K = 1 K = 1 in Remark 2.4). We call the resulting forward–backward procedure HURS. On generic sets the dummies are 1 , 2 , … , 2 k − 1 1, 2, \ldots, 2^{k-1} 1 , 2 , … , 2 k − 1 , below min W \min W min W .
Blur identity. In that case
F W ∪ D ( z ) = F W ( z ) ∏ d ∈ D ( 1 + z d ) = F W ( z ) 1 − z M 1 − z , M = 2 k F_{W\cup D}(z) = F_W(z) \prod_{d\in D}(1+z^d) = F_W(z)\frac{1-z^M}{1-z}, \qquad M=2^k F W ∪ D ( z ) = F W ( z ) d ∈ D ∏ ( 1 + z d ) = F W ( z ) 1 − z 1 − z M , M = 2 k
so the dummies blur the counts with a flat window of width M M M : this is how o o o drops to 1. The dummy-free counts are recovered exactly:
r W ( T ) − r W ( T − M ) = r W ∪ D ( T ) − r W ∪ D ( T − 1 ) . r_W(T)-r_W(T-M)=r_{W\cup D}(T)-r_{W\cup D}(T-1). r W ( T ) − r W ( T − M ) = r W ∪ D ( T ) − r W ∪ D ( T − 1 ) .
Lemma 5.1 (gap lemma). Every interval of length Σ D + 1 \Sigma_D+1 Σ D + 1 in [ 0 , S ] [0,S] [ 0 , S ] contains a subset sum of W W W .
Proof. Every point T T T of the interval is s W + s D s_W+s_D s W + s D with s D ≤ Σ D s_D \le\Sigma_D s D ≤ Σ D , by the completeness of W ∪ D W\cup D W ∪ D .
De-blurring the arcs. The arcs are traced on W ∪ D W\cup D W ∪ D and de-blurred at every step. The Gaussian cumulants of W W W are those of W ∪ D W\cup D W ∪ D minus those of the dummies in the suffix. The class counts N c W ( q ) N_c^W(q) N c W ( q ) are obtained from N c W ∪ D ( q ) N_c^{W\cup D}(q) N c W ∪ D ( q ) by exact division by each factor ( 1 + x d m o d q ) (1+x^{d\bmod q}) ( 1 + x d mod q ) in Z [ x ] / ( x q − 1 ) \mathbb{Z}[x]/(x^q-1) Z [ x ] / ( x q − 1 ) . That factor is invertible if and only if the cycle length q / gcd ( q , d ) q/\gcd(q,d) q / g cd( q , d ) is odd; where it is not, the dummy has killed those frequencies, and they are read from the original weights. The dummy 1 contributes 1 + z 1+z 1 + z , which vanishes only at z = − 1 z=-1 z = − 1 : the frequency 1 2 \frac{1}{2} 2 1 is lost. But exact division by 1 + x 1+x 1 + x in Z [ x ] / ( x q − 1 ) \mathbb{Z}[x]/(x^q-1) Z [ x ] / ( x q − 1 ) fails for every even q q q , so the class counts at even moduli are read on the original weights.
Three findings fix the design.
The de-blurred scores coincide exactly with the scores of the arcs on the original weights: HURS with dummies plus de-blurred arcs, and arcs on the originals, are one algorithm seen from two sides.
Without de-blurring (arcs on W ∪ D W\cup D W ∪ D , dummies merely skipped) the success is 0%: the score counts completions through the dummies. A global residue check mod M M M is not enough either (25, 10, 4%); the information is local.
Marking the dummies (weights M w M w M w , dummies M d + 1 M d + 1 M d + 1 , target M T M T M T ) makes “no dummy” the class 0 of the arc q = M q=M q = M . It works exactly but adds no information, and costs accuracy because the Gaussian is computed on W ∪ D W\cup D W ∪ D .
Class counts in floating point. Since the de-blurred scores coincide with the scores on the original weights, the implementation computes the suffix class counts directly on W W W , in floating point, with no big integers and no de-blurring. In the first version the dummies were also used in the forward pass of HURS, for a negative certificate; but W ∪ D W\cup D W ∪ D is complete, so that pass certifies only T > ∑ W + ∑ D T>\sum W+\sum D T > ∑ W + ∑ D . The solver of §5.7 uses no dummies: its NO answers come from the range check and from the class counts ( q , c ) (q,c) ( q , c ) .
The recurrence N c ← N c + N c − w N_c \leftarrow N_c+N_{c-w} N c ← N c + N c − w adds non-negative numbers only. The relative error is at most n ⋅ ε n\cdot\varepsilon n ⋅ ε , and a zero stays an exact zero, since a sum of non-negative numbers vanishes only if both terms do.
Each row is rescaled by a power of two. A positive count lies in [ 1 , 2 n ] [1,2^n] [ 1 , 2 n ] , so no positive entry can underflow for n ≤ 1020 n\leq1020 n ≤ 1020 , since 2 − 1020 2^{-1020} 2 − 1020 is still a normal double.
The Fourier side would be diagonal but unstable, because the inverse transform cancels down to the size of the minor arcs. The class side is stable.
Against the exact integer counts there are 0 discrepancies in the zero pattern and ∣ Δ s c o r e ∣ ≤ 3 ⋅ 10 − 14 |\Delta\mathrm{score}|\leq3\cdot10^{-14} ∣Δ score ∣ ≤ 3 ⋅ 1 0 − 14 on about 6000 scores. Treating all moduli at once costs O ( n Q 2 ) O(nQ^2) O ( n Q 2 ) : 4 ms against 27–31 ms for the exact de-blurred counts at n = 200 n=200 n = 200 .
When o ≤ 1 o\leq1 o ≤ 1 already, as for the primes, every suffix block is complete, all class counts are positive, at least one branch always stays in range, and the arcs alone are exact with no endgame, at cost O ( n ) O(n) O ( n ) : on { 1 } ∪ { p < 3000 } \{1\}\cup\{p<3000\} { 1 } ∪ { p < 3000 } , 100% of targets in 6 ms each.
Cost law and benchmarks
Cost law, first version. On generic sets σ m ∗ \sigma_{m}^{*} σ m ∗ is of the order of the omicron (the dummies fill [ 0 , min W ) [0,\min W) [ 0 , min W ) , so o ≈ min W o \approx\min W o ≈ min W ), hence m ∗ ≈ log 2 o + log 2 λ ∗ + c m^{*} \approx\log_{2} o+\log_{2}\lambda^{*}+c m ∗ ≈ log 2 o + log 2 λ ∗ + c and
T ( n , o ) = O ( n Q ) + O ( ρ ∗ o poly ( m ∗ ) ) . T(n,o)=O(nQ)+O\left(\sqrt{\rho^{*}o}\,\operatorname{poly}(m^{*})\right). T ( n , o ) = O ( n Q ) + O ( ρ ∗ o poly ( m ∗ ) ) .
The time ratio between o = 1.4 ⋅ 10 10 o=1.4\cdot10^{10} o = 1.4 ⋅ 1 0 10 and o = 2 ⋅ 10 7 o=2\cdot10^{7} o = 2 ⋅ 1 0 7 is predicted as 700 = 26 \sqrt{700}=26 700 = 26 and measured as 21.
Cost law, filtered endgame. With P ≈ λ / 2 ≈ λ ∗ / 2 P\approx\lambda/2\approx\lambda^{*}/2 P ≈ λ /2 ≈ λ ∗ /2 and 2 m ≈ λ ∗ 2 π σ m 2^{m}\approx\lambda^{*}\sqrt{2\pi}\sigma_{m} 2 m ≈ λ ∗ 2 π σ m , a round costs O ( m ( λ ∗ σ m ) 1 / 4 + m ( σ m / λ ∗ ) 1 / 2 ) O\left(m(\lambda^{*}\sigma_{m})^{1/4}+m(\sigma_{m}/\lambda^{*})^{1/2}\right) O ( m ( λ ∗ σ m ) 1/4 + m ( σ m / λ ∗ ) 1/2 ) . At λ ∗ ≍ σ m 1 / 3 \lambda^{*}\asymp\sigma_{m}^{1/3} λ ∗ ≍ σ m 1/3 the two terms balance at σ m 1 / 3 \sigma_{m}^{1/3} σ m 1/3 , and
T ( n , o ) = O ( n Q ) + O ( o 1 / 3 poly ( m ) ) . T(n,o)=O(nQ)+O\left(o^{1/3}\operatorname{poly}(m)\right). T ( n , o ) = O ( n Q ) + O ( o 1/3 poly ( m ) ) .
On the instances of Table 9 ′ the measured times (15–30 ms at large λ ∗ \lambda^{*} λ ∗ ) are dominated by the descent of phase 2, run in Python. The endgame alone falls from 341 ms to 3.8 ms at m = 40 m=40 m = 40 (Table 9 ″).
Table 9. Benchmarks, first version. The first four rows use exact ground truth over 200 reachable targets. No wrong output occurred in more than 2400 runs. At 10 10 10^{10} 1 0 10 and 10 12 10^{12} 1 0 12 a dynamic-programming table would need 2 ⋅ 10 14 2\cdot10^{14} 2 ⋅ 1 0 14 and 2 ⋅ 10 16 2\cdot10^{16} 2 ⋅ 1 0 16 bits; meet-in-the-middle on all weights would need 2 100 2^{100} 2 100 operations. The only misses are Poisson events, and raising λ ∗ \lambda^{*} λ ∗ from 50 to 500 removes them at the price of 3–4 more weights in the endgame.
The endgame in the language of arcs. On a block B B B of m m m weights, the complete spectrum resolves a single target with every frequency, at cost m ⋅ R m\cdot R m ⋅ R with R = ∑ B R=\sum_{B} R = ∑ B . The product form F B = F B 1 F B 2 F_{B}=F_{B_{1}}F_{B_{2}} F B = F B 1 F B 2 with ∣ B 1 ∣ = ∣ B 2 ∣ = m / 2 \lvert B_{1}\rvert=\lvert B_{2}\rvert=m/2 ∣ B 1 ∣ = ∣ B 2 ∣ = m /2 is a join of two sparse half-spectra at cost m ⋅ 2 m / 2 m\cdot2^{m/2} m ⋅ 2 m /2 : this is meet-in-the-middle written as a product of generating functions. The filtered endgame of § 7.6 restricts each half-spectrum to one residue class mod P P P before the join. A banded spectrum (frequencies mod L < R L<R L < R ) aliases targets and does not beat it. The o \sqrt{o} o in the cost law is the cost of the product form.
What the arcs contribute: an ablation.
Where the algorithm and the races meet. On primes restricted to a progression (q = 3 q = 3 q = 3 to 7) the arcs solve 100% of targets, and the arc centres keep the levels of Lemma 1. Restricting to p ≡ 1 ( m o d 4 ) p \equiv1 \pmod{4} p ≡ 1 ( mod 4 ) splits the arcs 1 / 8 1/8 1/8 and 3 / 8 3/8 3/8 . The split, 0.036 per weight, about 9.7 in log ∣ F ∣ \log|F| log ∣ F ∣ , measures π ( 4000 ; 8 , 5 ) − π ( 4000 ; 8 , 1 ) \pi(4000;8,5)-\pi(4000;8,1) π ( 4000 ; 8 , 5 ) − π ( 4000 ; 8 , 1 ) : the Chebyshev bias, read directly in the amplitudes the algorithm uses in its scores.
Density one. We write ρ = n / log 2 D \rho= n/\log_2 D ρ = n / log 2 D for the density of a weight set, with D = max W − min W + 1 D = \max W-\min W+1 D = max W − min W + 1 . Since S ≈ n ⋅ max W / 2 S \approx n\cdot\max W/2 S ≈ n ⋅ max W /2 , 2 n / S ≥ 1 2^n/S \ge1 2 n / S ≥ 1 if and only if ρ ≳ 1 + log 2 ( n / 2 ) / log 2 max W \rho\gtrsim1+\log_2(n/2)/\log_2\max W ρ ≳ 1 + log 2 ( n /2 ) / log 2 max W , so the two notions of density agree up to that correction. At density 2 n / S ≈ 1 2^n/S \approx1 2 n / S ≈ 1 the omicron is ≈ 2 n \approx2^n ≈ 2 n and the cost law gives 2 n / 2 2^{n/2} 2 n /2 : the method becomes meet-in-the-middle, as it must; there λ ≈ 1 \lambda\approx1 λ ≈ 1 , and the filter of § 7.6 has nothing to remove. There the arcs carry no usable information. The largest arc over q ≤ 24 q \le24 q ≤ 24 sits at − 0.30 -0.30 − 0.30 to − 0.43 -0.43 − 0.43 per weight, a relative deviation of the class counts of e − 0.3 n e^{-0.3n} e − 0.3 n to e − 0.43 n e^{-0.43n} e − 0.43 n , the fluctuation of the sea. A one-level representation search [HGJ] runs at ≈ 2 0.39 n \approx2^{0.39n} ≈ 2 0.39 n on the same instances, and the full recursive versions reach 2 0.337 n 2^{0.337n} 2 0.337 n and 2 0.291 n 2^{0.291n} 2 0.291 n [HGJ; BCJ]. In a Merkle–Hellman knapsack the trapdoor u = W − 1 ( m o d N ) u=W^{-1}\pmod N u = W − 1 ( mod N ) gives an arc at u / N u/N u / N whose factors are all close to 2, an emerging arc at a very large modulus; finding it is a search over q ∼ N q\sim N q ∼ N , which is what Shamir’s attack does by other means [Shamir]. We record this as a reading, not as a result.
The filtered endgame
The endgame block E E E of m m m weights holds about λ \lambda λ solutions (§ 7.3 ), and the plain meet-in-the-middle enumerates all 2 m / 2 2^{m/2} 2 m /2 half-sums anyway.
The filter. Split E E E into halves A and B. For a prime P P P and a residue r r r , keep the subsets of A whose sum is ≡ r ( m o d P ) \equiv r \pmod P ≡ r ( mod P ) and the subsets of B whose sum is ≡ t − r \equiv t-r ≡ t − r . A solution survives with probability 1 / P 1/P 1/ P , not 1 / P 2 1/P^2 1/ P 2 as with independent sampling of the two lists.
Parameters. The descent hands over when the peak density falls below λ ∗ = 5 ⋅ 10 4 \lambda^* = 5\cdot10^4 λ ∗ = 5 ⋅ 1 0 4 and the block has at most 60 weights. The filter is used when λ ≥ 8 \lambda\ge8 λ ≥ 8 and m ≥ 16 m \ge16 m ≥ 16 ; otherwise the block goes to the full meet-in-the-middle. These are the fixed values of the reference run BENCH5 v2; the default solver derives every one of them from the instance (§ 7.7 , Parameters derived from the instance ).
The prime. P P P is uniform among the primes of [ P 0 , 2 P 0 ) [P_0,2P_0) [ P 0 , 2 P 0 ) , with P 0 = max ( 3 , ⌈ λ / 2 ⌉ ) P_0=\max(3,\lceil\lambda/2\rceil) P 0 = max ( 3 , ⌈ λ /2 ⌉) , drawn by rejection: a uniform integer of [ P 0 , 2 P 0 ) [P_0,2P_0) [ P 0 , 2 P 0 ) is drawn until it is prime. Theorem R″ (which needs P 0 ≥ 100 P_0\ge100 P 0 ≥ 100 ) proves that a round succeeds with probability at least ( 1 − o ( 1 ) ) / ( 6 ln m M ) (1-o(1))/(6\ln mM) ( 1 − o ( 1 )) / ( 6 ln m M ) , but only for the theorem mode below: in the practical solver the block is the suffix of the sorted weights, chosen after seeing them, and m m m and P 0 P_0 P 0 come from λ ∗ \lambda^* λ ∗ and the arc estimate, not from the theorem. There the bound is a guide, not a guarantee. In practice the first round almost always succeeds (§ 8.7 ). The uniform draw is the one the theorem assumes. The runs of Table 9 ′–9″ predate it and used sympy.randprime, which returns the next prime after a uniform integer and so favours the primes that follow long gaps. Rerun with the uniform draw, Table 10 ′ gives identical outcomes, and the reference run BENCH5 v2 of § 7.7 uses it.
Table 10. On random weights the arcs are not needed: steering to the centre plus the exact endgame achieves the cost law. On sets with an almost divisor the arcs are essential: the class counts see the obstruction mod d d d and keep the few non-divisible weights available to fix the residue.
Rounds and fallback. The implementation draws a fresh prime and residue for up to six rounds, then falls back to the full meet-in-the-middle if m ≤ 44 m\le44 m ≤ 44 , so up to that size no solution is lost with respect to the plain endgame. For m > 44 m>44 m > 44 the full lists would have more than 2 22 2^{22} 2 22 elements, and the solver reports failure instead. The same bound applies when λ < 8 \lambda<8 λ < 8 and the filter is skipped. These rounds run on the same block and are
correlated through its weights; Theorem R″ uses disjoint blocks, so its independence argument does not cover them.
Theorem mode. A second mode runs the algorithm that Theorem R″ analyses: R R R disjoint blocks of m m m weights chosen by a random permutation, the centre rule of Lemma A on the rest, one filtered round per block with a fresh uniform prime, and no fallback. On independent uniform weights of b = 30 b = 30 b = 30 and 34 34 34 bits (m = 42 m = 42 m = 42 and 47 47 47 , P 0 = 436 P_0 = 436 P 0 = 436 and 825 825 825 , R = 6 R = 6 R = 6 , targets drawn inside an estimate of the window of the theorem) it found 20/20 targets per row, 30 of the 40 in the first round, at 4–6 ms per target. The hypotheses of the theorem held in 39 of the 40 runs; in the remaining one the realised window condition failed. These runs check the structure and the hypotheses of the theorem, not its quantitative guarantee: at b = 30 b = 30 b = 30 the bound gives p ≈ 1 / 164 p \approx1/164 p ≈ 1/164 , so with g = 3 g = 3 g = 3 , R = 6 R = 6 R = 6 guarantees only about 2% success, and the R R R the theorem prescribes, about 300 ⋅ ln ( 1 / δ ) 300 \cdot\ln(1/\delta) 300 ⋅ ln ( 1/ δ ) blocks of 42 weights, would need n ≳ 1.2 ⋅ 10 4 ⋅ ln ( 1 / δ ) n \gtrsim1.2 \cdot10^4 \cdot\ln(1/\delta) n ≳ 1.2 ⋅ 1 0 4 ⋅ ln ( 1/ δ ) . The 20/20 comes from the measured first-round rate.
In the language of arcs. The list { y ⊆ A : S y ≡ r mod P } \{y \subseteq A : S_y \equiv r \mathbin{\operatorname{mod}} P\} { y ⊆ A : S y ≡ r mod P } is the class r r r of F A F_A F A at the modulus P P P . The endgame is the join [ F A ] ≡ r ⋅ [ F B ] ≡ t − r [F_A]_{\equiv r} \cdot[F_B]_{\equiv t-r} [ F A ] ≡ r ⋅ [ F B ] ≡ t − r of two class-restricted half-spectra, in place of the product F B 1 F B 2 F_{B_1}F_{B_2} F B 1 F B 2 of § 7.5 . The probability that a round succeeds is the fraction of live classes at the modulus P P P (Lemma J, § 8.7 ), the same quantity that corrects the decider of § 7.2 , here at a modulus of the order of λ \lambda λ . The block size and P P P are both read from the principal arc.
Merging. Sorted half-lists are built by merging L L L and L + w L + w L + w at each weight (MERGE-LISTS, [CLRS, §35.5]), at cost O ( 2 h ) O(2^h) O ( 2 h ) instead of O ( h ⋅ 2 h ) O(h \cdot2^h) O ( h ⋅ 2 h ) . On its own this gives only a factor 1.2.
Table 9′. Time per target on the instances and targets of Table 9 (rows 5–7, same seed), first version against the filtered endgame, on one machine and one core. Every cell found 20/20 targets with 0 wrong outputs and 0 fallbacks. The first version needs 4.4 s at 10 12 10^{12} 1 0 12 here, against 2.3 s in Table 9, measured on another machine. On new draws of the four shapes of the first rows of Table 9 (exact ground truth over 200 reachable targets) the filtered solver finds 200/200 with 0 wrong outputs, at 0.9–13 ms per target.
Table 9″. The endgame alone, 20 blocks per row, targets within M / 2 M/2 M /2 of the centre; λ \lambda λ is the mean over the 20 blocks of the expected number of solutions of a block. The three methods give the same answer on 80/80 blocks, and every solution is verified. On small blocks the filter does not pay. The table is empirical: in two rows P 0 = λ / 2 < 100 P_0 = \lambda/2 < 100 P 0 = λ /2 < 100 , outside the hypotheses of Theorem R″.
Dynamic moduli
The fixed moduli q = 2 , … , 24 q = 2, \ldots, 24 q = 2 , … , 24 of §5.4 miss an almost divisor larger than 24, and on random weights they are read at every step although they carry no information. The dynamic rule chooses the moduli from the weights and, at each suffix, keeps only those whose arcs deviate.
The rule. Let W W W be sorted decreasingly, let N c ( k ) ( q ) N_c^{(k)}(q) N c ( k ) ( q ) be the number of subsets of the suffix W k = ( w k , … , w n ) W_k = (w_k,\ldots,w_n) W k = ( w k , … , w n ) , of size m = n − k + 1 m = n-k+1 m = n − k + 1 , with sum ≡ c ( m o d q ) \equiv c \pmod q ≡ c ( mod q ) , and
δ q ( k ) = max c ∣ q N c ( k ) ( q ) 2 m − 1 ∣ , ε k = min ( 1 , 1 / m ) . \delta_q(k) = \max_c \left|\frac{qN_c^{(k)}(q)}{2^m}-1\right|,\qquad\varepsilon_k = \min(1,1/m). δ q ( k ) = c max 2 m q N c ( k ) ( q ) − 1 , ε k = min ( 1 , 1/ m ) .
Candidates. C = { 2 , … , 24 } ∪ { d ≤ 2000 : d ∣ gcd ( a , b ) for one of 64 pairs ( a , b ) of weights drawn at random } \mathcal{C} = \{2,\ldots,24\} \cup\{d \le2000 : d \mid\gcd(a,b)\text{ for one of 64 pairs }(a,b)\text{ of weights drawn at random}\} C = { 2 , … , 24 } ∪ { d ≤ 2000 : d ∣ g cd( a , b ) for one of 64 pairs ( a , b ) of weights drawn at random } . If d d d divides all weights but a fraction f f f of them, a pair is missed with probability 1 − ( 1 − f ) 2 1-(1-f)^2 1 − ( 1 − f ) 2 , so d d d escapes all 64 pairs with probability ( 1 − ( 1 − f ) 2 ) 64 (1-(1-f)^2)^{64} ( 1 − ( 1 − f ) 2 ) 64 , below 10 − 80 10^{-80} 1 0 − 80 for f = 5 / 200 f = 5/200 f = 5/200 (the pairs are drawn from a fixed pseudo-random seed; drawing the two elements without replacement changes the estimate only in the third digit).
Selection. At suffix k k k the score of §5.2 reads the moduli Q ( k ) = { q ∈ C : δ q ( k ) ≥ ε k } Q(k) = \{q \in\mathcal{C} : \delta_q(k) \ge\varepsilon_k\} Q ( k ) = { q ∈ C : δ q ( k ) ≥ ε k } . The class correction is max ( 0 , max q ∈ Q ( k ) ln ( q N c ( k ) ( q ) / 2 m ) ) \max(0,\max_{q\in Q(k)}\ln(qN_c^{(k)}(q)/2^m)) max ( 0 , max q ∈ Q ( k ) ln ( q N c ( k ) ( q ) / 2 m )) at c = t m o d q c = t \bmod q c = t mod q , and an empty class gives the score − ∞ -\infty − ∞ . The negative certificate is read at the full set: if N T m o d q ( 1 ) ( q ) = 0 N_{T\bmod q}^{(1)}(q) = 0 N T mod q ( 1 ) ( q ) = 0 for some q ∈ Q ( 1 ) q \in Q(1) q ∈ Q ( 1 ) , the answer is NO with the certificate ( q , T m o d q ) (q,T\bmod q) ( q , T mod q ) . A NO answer carries one of three certificates: ( 0 , 0 ) (0,0) ( 0 , 0 ) when T < 0 T < 0 T < 0 or T > ∑ W T > \sum W T > ∑ W ; ( q , T m o d q ) (q,T\bmod q) ( q , T mod q )
when that class is empty mod q q q ; and ( − 3 , − 3 ) (-3,-3) ( − 3 , − 3 ) when an exhaustive endgame on the whole instance found no subset with sum T T T , which any exact search re-checks.
Cost. The divisors of the 64 gcds cost O ( w max ) O(\sqrt{w_{\max}}) O ( w m a x ) each by trial division. The class counts of all candidates cost O ( n ⋅ ∑ q ∈ C q ) O(n \cdot\sum_{q\in\mathcal{C}}q) O ( n ⋅ ∑ q ∈ C q ) once, in floating point as in § 7.4 , and the descent costs O ( n + ∑ k ∣ Q ( k ) ∣ ) O(n+\sum_k |Q(k)|) O ( n + ∑ k ∣ Q ( k ) ∣ ) per target.
Lemma 5.3 (pruning). Fix k k k and t t t , and let s C s_{\mathcal{C}} s C and s Q s_Q s Q be the scores of § 7.2 with the moduli C \mathcal{C} C and Q ( k ) Q(k) Q ( k ) .
If N t ( k ) m o d q = 0 N_t^{(k)} \bmod q=0 N t ( k ) mod q = 0 for some q ∈ C q\in\mathcal{C} q ∈ C , then q ∈ Q ( k ) q\in Q(k) q ∈ Q ( k ) , and s Q = s C = − ∞ s_Q=s_{\mathcal{C}}=-\infty s Q = s C = − ∞ . In particular the NO answers with the moduli Q ( 1 ) Q(1) Q ( 1 ) are exactly those with the moduli C \mathcal{C} C .
Otherwise, if 0 ≤ t ≤ S k 0\le t\le S_k 0 ≤ t ≤ S k (outside this range both scores are − ∞ -\infty − ∞ ), 0 ≤ s C − s Q ≤ ln ( 1 + ε k ) ≤ ε k 0\le s_{\mathcal{C}}-s_Q\le\ln(1+\varepsilon_k)\le\varepsilon_k 0 ≤ s C − s Q ≤ ln ( 1 + ε k ) ≤ ε k .
By Lemma C(1), applied to the suffix, δ q ( k ) ≤ ∑ d ∣ q , d ′ > 1 φ ( d ′ ) e − π 2 κ k ( d ′ ) / ( 2 d ′ 2 ) \delta_q(k)\le\sum_{d\mid q,d'>1}\varphi(d')e^{-\pi^2\kappa_k(d')/(2d'^2)} δ q ( k ) ≤ ∑ d ∣ q , d ′ > 1 φ ( d ′ ) e − π 2 κ k ( d ′ ) / ( 2 d ′2 ) , where κ k ( d ′ ) \kappa_k(d') κ k ( d ′ ) is the number of weights of W k W_k W k not divisible by d ′ d' d ′ . So q ∉ Q ( k ) q\notin Q(k) q ∈ / Q ( k ) as soon as κ k ( d ′ ) > ( 2 d ′ 2 / π 2 ) ln ( ( q − 1 ) / ε k ) \kappa_k(d')>(2d'^2/\pi^2)\ln((q-1)/\varepsilon_k) κ k ( d ′ ) > ( 2 d ′2 / π 2 ) ln (( q − 1 ) / ε k ) for every divisor d ′ > 1 d'>1 d ′ > 1 of q q q .
Proof.
An empty class gives ∣ q ⋅ 0 / 2 m − 1 ∣ = 1 ≥ ε k |q\cdot0/2^m-1|=1\ge\varepsilon_k ∣ q ⋅ 0/ 2 m − 1∣ = 1 ≥ ε k , so δ q ( k ) ≥ ε k \delta_q(k)\ge\varepsilon_k δ q ( k ) ≥ ε k and q ∈ Q ( k ) q\in Q(k) q ∈ Q ( k ) . The score with either set then returns − ∞ -\infty − ∞ at q q q . At k = 1 k=1 k = 1 this is the statement on certificates.
The class t m o d q t\bmod q t mod q is non-empty for every q ∈ C q\in\mathcal{C} q ∈ C , so every term is finite. For q ∉ Q ( k ) q\notin Q(k) q ∈ / Q ( k ) , δ q ( k ) < ε k \delta_q(k)<\varepsilon_k δ q ( k ) < ε k gives q N C / 2 m < 1 + ε k qN_{\mathcal{C}}/2^m<1+\varepsilon_k q N C / 2 m < 1 + ε k at every class, so its term is below ln ( 1 + ε k ) \ln(1+\varepsilon_k) ln ( 1 + ε k ) . The two scores share the Gaussian term, and their corrections are b C = max ( b Q , max q ∉ Q ( k ) ln ( q N C / 2 m ) ) b_{\mathcal{C}}=\max(b_Q,\max_{q\notin Q(k)}\ln(qN_{\mathcal{C}}/2^m)) b C = max ( b Q , max q ∈ / Q ( k ) ln ( q N C / 2 m )) and b Q b_Q b Q , with b Q ≥ 0 b_Q\ge0 b Q ≥ 0 . Hence b Q ≤ b C ≤ max ( b Q , ln ( 1 + ε k ) ) b_Q\le b_{\mathcal{C}}\le\max(b_Q,\ln(1+\varepsilon_k)) b Q ≤ b C ≤ max ( b Q , ln ( 1 + ε k )) .
Lemma C(1) bounds δ q ( k ) \delta_q(k) δ q ( k ) by the sum over its divisors, and ∑ d ∣ q , d ′ > 1 φ ( d ′ ) = q − 1 \sum_{d\mid q,d'>1}\varphi(d')=q-1 ∑ d ∣ q , d ′ > 1 φ ( d ′ ) = q − 1 . If every term satisfies e − π 2 κ k ( d ′ ) / ( 2 d ′ 2 ) < ε k / ( q − 1 ) e^{-\pi^2\kappa_k(d')/(2d'^2)}<\varepsilon_k/(q-1) e − π 2 κ k ( d ′ ) / ( 2 d ′2 ) < ε k / ( q − 1 ) , the sum is below ε k \varepsilon_k ε k . □
So the dynamic rule changes no NO answer and moves a score by at most ln ( 1 + ε k ) \ln(1+\varepsilon_k) ln ( 1 + ε k ) . A decision of the descent can change only when the scores of its two branches are within ln ( 1 + ε k + 1 ) \ln(1+\varepsilon_{k+1}) ln ( 1 + ε k + 1 ) of each other, that is, when the scores barely separate them. The endgame threshold does not use the class correction and is unchanged. The estimate λ = e s \lambda=e^s λ = e s handed to the endgame does include it, so P 0 P_0 P 0 can move by a factor up to 1 + ε k 1+\varepsilon_k 1 + ε k and the random choices of the endgame can differ; its answers are verified either way. Part 3 is a worst-case condition: on random weights the measured δ q ( k ) \delta_q(k) δ q ( k ) is far smaller than the bound, and no modulus is selected at the large suffixes. Figure 7 shows both cases.
Figure 7. The selection rule of Lemma 5.3 along the suffixes (suffix size m m m , decreasing to the right). (a) 195 multiples of 1009 and 5 other weights. δ 1009 \delta_{1009} δ 1009 stays above the threshold at every suffix, so q = 1009 q = 1009 q = 1009 is read throughout, while every q ≤ 24 q \le24 q ≤ 24 stays below the threshold ε = min ( 1 , 1 / m ) \varepsilon= \min(1,1/m) ε = min ( 1 , 1/ m ) until the last 15 weights or so. (b) 200 random weights in [ 1 , 10 10 ] [1,10^{10}] [ 1 , 1 0 10 ] ; no modulus reaches the threshold until the last 15 weights or so. Values below 10 − 16 10^{-16} 1 0 − 16 are rounding.
Table 10′ (PDF p. 31). Fixed against dynamic moduli , 20 planted targets per row, one machine and one core; time per target where all 20 were found. The last column lists the smallest moduli read at the suffixes of more than 40 weights, and their mean number per suffix. There were 0 wrong outputs in every cell. On random weights the dynamic rule reads no modulus and costs what the centre rule costs. The moduli 101 and 1009 are larger than 24, and only the gcd candidates find them. With five non-divisible weights at most 2 5 = 32 2^5 = 32 2 5 = 32 residues mod 1009 are reachable, so a target in another class must be refused, and a solution must use the right subset of those five weights. The fixed moduli do not see this constraint, and fail in 15 or 16 of the 20 cases. On { 1 } ∪ { p < 3000 } \{1\} \cup\{p < 3000\} { 1 } ∪ { p < 3000 } the rule selects no modulus at the full set, moduli enter only at the last suffixes, and 30/30 random targets are found with either rule.
Figure 8 follows one descent on an instance of this kind. Most decisions at the large weights are nearly indifferent; five are forced by the arc mod 1009.
Figure 8. The descent of ARCS on one planted target of an instance with 195 multiples of 1009 and 5 other weights (n = 200 n = 200 n = 200 ). Blue: the gap, in bits, between the scores of the chosen branch and of the other branch at each step; it lies between 10 − 5 10^{-5} 1 0 − 5 and 0.3 bits. Crosses: the 5 steps at which the other branch was impossible, because its class mod 1009 was empty. The descent hands over to the filtered endgame on the last 56 weights.
A preregistered check. The same comparison is part of a benchmark of five problems whose criteria were fixed, and hashed, before any instance was generated. Instance i i i of problem P P P has seed s + 1000 P + i s + 1000P + i s + 1000 P + i , where s s s is the integer formed by the first 64 bits of the sha256 of the criterion; there is one run, and every answer goes through an independent checker that verifies each subset sum and recomputes the reachable residues mod q q q in integer arithmetic for each NO certificate. The reference run is BENCH5 v2, with the endgame of § 7.6 . Problem P5 has 200 weights, 195 multiples of 1009 and 5 others, with 6 planted and 6 impossible targets. The dynamic solver found 6/6 planted targets, in a median time of 0.061 s, and certified all 6 impossible ones with the certificate q = 1009 q = 1009 q = 1009 . The fixed moduli and the solver without arcs found 1/6 each and certified none. CP-SAT, with one worker and a 60 s limit, decided none of the 12. There were no wrong answers. Figure 9 gives the other problems, including the one that ARCS loses.
Figure 9. BENCH5 v2, the reference run (criterion sha256 f81f1037. . . ; one run; every answer checked by the independent checker). Bars: correct answers per method; labels: correct/total and the median time of the correct answers. P1: reconciliation of 800 amounts. P2: a change-free payment from 1000 amounts. P3: a perfect partition of 200 values. P5: the instances above. ARCS (blue) solves 6/6 in every panel and certifies all 6 impossible targets of P5 with q = 1009 q = 1009 q = 1009 . It loses P3, where complete Karmarkar–Karp also solves 6/6 and is 10 times faster. No method gave a wrong answer. P4 (counting the subsets of { 1 } ∪ { p ≤ N } \{1\} \cup\{p \le N\} { 1 } ∪ { p ≤ N } with a given sum) is not shown: the Edgeworth estimate has relative error ≤ 4.3 ⋅ 10 − 8 \le4.3 \cdot10^{-8} ≤ 4.3 ⋅ 1 0 − 8 in every cell and is 81, 2.7 ⋅ 10 4 2.7 \cdot10^{4} 2.7 ⋅ 1 0 4 and 1.2 ⋅ 10 5 1.2 \cdot10^{5} 1.2 ⋅ 1 0 5 times faster than the dynamic program at N = 2000 N = 2000 N = 2000 , 8000 and 16 000; the cell at N = 2000 N = 2000 N = 2000 misses the preregistered factor 100.
Parameters derived from the instance. The default form of ARCS runs the steps of this section with every constant derived before the descent from the instance and from two user inputs: the accepted failure probability δ \delta δ on YES instances, and the number of operations the user will wait for, m a x o p s \mathrm{max}_{\mathrm{ops}} max ops (with a memory bound). From the density ρ = n / log 2 D \rho= n/\log_{2} D ρ = n / log 2 D and the suffix variances V k V_k V k it computes:
λ ∗ = max ( 400 , ( 2.3 n / δ ) 1 / 3 ) \lambda^{*} = \max(400,(2.3n/\delta)^{1/3}) λ ∗ = max ( 400 , ( 2.3 n / δ ) 1/3 ) , from the measured tail of § 8.6 with a union bound over the n n n decisions, and the hypothesis P 0 ≥ 100 P_0 \ge100 P 0 ≥ 100 of Theorem R′′;
the suffix k ∗ k^{*} k ∗ where the peak density 2 m / ( 2 π σ m ) 2^{m}/(\sqrt{2\pi}\sigma_m) 2 m / ( 2 π σ m ) first falls below λ ∗ \lambda^{*} λ ∗ , and the cost of the cheapest endgame on the block m ∗ = n − k ∗ m^{*} = n-k^{*} m ∗ = n − k ∗ that fits the memory (filtered rounds, full meet-in-the-middle, or the full residue scan [SS; HGJ]);
R = ⌈ ln ( 1 / δ ) / 2 ⌉ R = \left\lceil\ln(1/\delta)/2 \right\rceil R = ⌈ ln ( 1/ δ ) /2 ⌉ filtered rounds, from the model in which each of the Poisson(λ \lambda λ ) solutions survives the residue filter with probability 1 / P 1/P 1/ P ;
the moduli: q q q with ∑ q ≤ n \sum q \le n ∑ q ≤ n , and the divisors of the gcds of ⌈ ln δ / ln ( 3 / 4 ) ⌉ \left\lceil\ln\delta/ \ln(3/4) \right\rceil ⌈ ln δ / ln ( 3/4 ) ⌉ random pairs of weights, so that a divisor of at least half of the weights is missed with probability ≤ δ \le\delta ≤ δ , each kept only if its class counts cost no more than the predicted endgame.
The handover rule depends on V k V_k V k only, not on the target or on the path of the descent, so k ∗ k^{*} k ∗ is the actual handover whenever an endgame fits; the cost of that endgame is a model (Table 8 ). If the predicted cost or memory exceeds the limits, ARCS answers FAIL with the prediction, after its NO certificates. Randomness comes from the operating system, and every prime and residue drawn is part of the output, so a run is replayable and P P P is independent of the weights, as Lemma K requires.
Table 8. Table 8. Cost of the solver; Q Q Q is the number of moduli (24). With the dynamic moduli of §5.7, phase 1 costs O ( n ⋅ ∑ q ∈ Q q ) O(n\cdot\sum_{q\in\mathcal{Q}}q) O ( n ⋅ ∑ q ∈ Q q ) plus O ( w max ) O(\sqrt{w_{\max}}) O ( w m a x ) per gcd pair for the divisors, and phase 2 costs O ( n + ∑ k ∣ Q ( k ) ∣ ) O(n+\sum_k|Q(k)|) O ( n + ∑ k ∣ Q ( k ) ∣ ) . The first version also inserted k ≤ ⌈ log 2 w max ⌉ k\leq\lceil\log_2w_{\max}\rceil k ≤ ⌈ log 2 w m a x ⌉ dummies in phase 0 and used exact integer counts on W ∪ D W\cup D W ∪ D with de-blurring, O ( n 2 Q 2 / 64 ) O(n^2Q^2/64) O ( n 2 Q 2 /64 ) word operations, and a plain meet-in-the-middle on m ∗ m^* m ∗ weights, O ( m ∗ ⋅ 2 m ∗ / 2 ) O(m^*\cdot2^{m^*/2}) O ( m ∗ ⋅ 2 m ∗ /2 ) .
A second preregistered benchmark, with the same rules (criterion hashed before the instances, one run, independent checker), ran the default solver alone, with δ = 10 − 3 \delta= 10^{-3} δ = 1 0 − 3 , m a x o p s = 2 34 \mathrm{max}_{\mathrm{ops}} = 2^{34} max ops = 2 34 and 2 30 2^{30} 2 30 bytes. On 65 instances there were 0 wrong answers:
P1, P2, P3 and P5 of BENCH5, with new seeds: every instance answered, the impossible targets with the certificates q = 2 q = 2 q = 2 and q = 1009 q = 1009 q = 1009 , in median times of 0.01–0.26 s;
50 weights of 50 bits (ρ ≈ 1 \rho\approx1 ρ ≈ 1 ), a block that the fixed caps of § 7.6 refuse: 6/6 planted targets found and 6/6 random targets refused by an exhaustive endgame, verified by the checker’s own meet-in-the-middle, in 6–11 s;
40 weights of 70 bits, beyond 64-bit integers: 6/6 found;
40 weights of 60 bits (ρ ≈ 0.67 \rho\approx0.67 ρ ≈ 0.67 ): 6/6 found and 6/6 refused exhaustively, in about 1.3 s;
100 weights of 110 bits (ρ ≈ 0.91 \rho\approx0.91 ρ ≈ 0.91 ): 3/3 FAIL in 4 ms, with the prediction of 2 54 2^{54} 2 54 bytes and 2 55.6 2^{55.6} 2 55.6 operations.
The predicted block equalled the actual one in all 54 runs that reached an endgame.
Rigorous versions of the algorithm
The outputs are verified, so correctness is never in question. What needs proof is that a solution is found, with high probability and within the stated cost. We give this for random weights (Theorems R and R′) and for dense structured sets (Corollary C′).
Setting. W = ( w 1 , … , w n ) W = (w_1,\ldots,w_n) W = ( w 1 , … , w n ) , S = ∑ w i S = \sum w_i S = ∑ w i , target T T T . The indices split into a head H H H and an endgame block E E E with ∣ E ∣ = m |E| = m ∣ E ∣ = m . The descent fixes x i x_i x i on H H H ; the endgame solves ∑ i ∈ E x i w i = t \sum_{i\in E} x_iw_i = t ∑ i ∈ E x i w i = t exactly by meet-in-the-middle.
The descent never fails
Lemma A (centre rule). Process H H H in any order. At step k k k let R k R_k R k be the sum of the head weights not yet processed, t k t_k t k the residual target, c k = ( R k + S E ) / 2 c_k=(R_k+S_E)/2 c k = ( R k + S E ) /2 , and choose x k x_k x k to minimize ∣ t k − c k ∣ |t_k-c_k| ∣ t k − c k ∣ . With e k = t k − c k e_k=t_k-c_k e k = t k − c k and w ∗ = max H w i w^*=\max_{H} w_i w ∗ = max H w i ,
∣ e k ∣ ≤ max ( ∣ e 0 ∣ − 1 2 ∑ j ≤ k w j , 1 2 max j ≤ k w j ) . |e_k| \le\max\left(|e_0|-\frac{1}{2}\sum_{j\le k}w_j,\frac{1}{2}\max_{j\le k}w_j\right). ∣ e k ∣ ≤ max ∣ e 0 ∣ − 2 1 j ≤ k ∑ w j , 2 1 j ≤ k max w j . In particular, if ∣ T − S / 2 ∣ ≤ S H / 2 + w ∗ / 2 |T-S/2|\le S_H/2+w^*/2 ∣ T − S /2∣ ≤ S H /2 + w ∗ /2 , the descent ends with ∣ t − S E / 2 ∣ ≤ w ∗ / 2 |t-S_E/2|\le w^*/2 ∣ t − S E /2∣ ≤ w ∗ /2 .
Proof. c k = c k − 1 − w k / 2 c_k=c_{k-1}-w_k/2 c k = c k − 1 − w k /2 , and the better of the two choices gives ∣ e k ∣ = ∣ ∣ e k − 1 ∣ − w k / 2 ∣ |e_k|=\left||e_{k-1}|-w_k/2\right| ∣ e k ∣ = ∣ ∣ e k − 1 ∣ − w k /2 ∣ . Induction. □
Writing x i = ( 1 + ε i ) / 2 x_i=(1+\varepsilon_i)/2 x i = ( 1 + ε i ) /2 , the endgame becomes ∑ E ε i w i = u \sum_E\varepsilon_iw_i=u ∑ E ε i w i = u with u = 2 t − S E u=2t-S_E u = 2 t − S E and ∣ u ∣ ≤ w ∗ |u|\le w^* ∣ u ∣ ≤ w ∗ : a number-partitioning question. Whether it has a solution is the only probabilistic question.
A local limit theorem uniform in the size of the weights
Lemma B0′. Let w 1 , w 2 , … w_1,w_2,\ldots w 1 , w 2 , … be independent and uniform in { 1 , … , M } \{1,\ldots,M\} { 1 , … , M } , M ≥ 2 M\ge2 M ≥ 2 , with μ = ( M + 1 ) / 2 \mu=(M+1)/2 μ = ( M + 1 ) /2 , σ 2 = ( M 2 − 1 ) / 12 \sigma^2=(M^2-1)/12 σ 2 = ( M 2 − 1 ) /12 , κ 4 = − ( M 4 − 1 ) / 120 \kappa_4=-(M^4-1)/120 κ 4 = − ( M 4 − 1 ) /120 , S k = w 1 + ⋯ + w k S_k=w_1+\cdots+w_k S k = w 1 + ⋯ + w k , z = ( v − k μ ) / ( σ k ) z=(v-k\mu)/(\sigma\sqrt{k}) z = ( v − k μ ) / ( σ k ) , g k ( v ) = ( 2 π k σ 2 ) − 1 / 2 e − z 2 / 2 g_k(v)=(2\pi k\sigma^2)^{-1/2}e^{-z^2/2} g k ( v ) = ( 2 π k σ 2 ) − 1/2 e − z 2 /2 and q M = 1 / ( M sin ( π / ( 2 M ) ) ) ≤ 1 / 2 q_M=1/(M\sin(\pi/(2M)))\le1/\sqrt{2} q M = 1/ ( M sin ( π / ( 2 M ))) ≤ 1/ 2 . For k ≥ 2 k\ge2 k ≥ 2 and every v v v ,
∣ Pr ( S k = v ) − g k ( v ) ( 1 + κ 4 H e 4 ( z ) 24 σ 4 k ) ∣ ≤ 0.34 σ k 5 / 2 + 1 σ ( q M k − 2 12 + ( 0.41 k + 0.11 ) e − 0.308 k ) . \left|\Pr(S_k=v)-g_k(v)\left(1+\frac{\kappa_4He_4(z)}{24\sigma^4k}\right)\right|\le\frac{0.34}{\sigma k^{5/2}}+\frac{1}{\sigma}\left(\frac{q_M^{k-2}}{\sqrt{12}}+\left(\frac{0.41}{k}+0.11\right)e^{-0.308k}\right). Pr ( S k = v ) − g k ( v ) ( 1 + 24 σ 4 k κ 4 H e 4 ( z ) ) ≤ σ k 5/2 0.34 + σ 1 ( 12 q M k − 2 + ( k 0.41 + 0.11 ) e − 0.308 k ) . Consequently ∣ Pr ( S k = v ) − g k ( v ) ∣ ≤ C ( k , M ) / ( σ k 3 / 2 ) |\Pr(S_k=v)-g_k(v)|\le C(k,M)/(\sigma k^{3/2}) ∣ Pr ( S k = v ) − g k ( v ) ∣ ≤ C ( k , M ) / ( σ k 3/2 ) with
C ( k , M ) = 0.0599 M 2 + 1 M 2 − 1 + 0.34 k + k 3 / 2 ( q M k − 2 12 + ( 0.41 k + 0.11 ) e − 0.308 k ) . C(k,M)=0.0599\frac{M^2+1}{M^2-1}+\frac{0.34}{k}+k^{3/2}\left(\frac{q_M^{k-2}}{\sqrt{12}}+\left(\frac{0.41}{k}+0.11\right)e^{-0.308k}\right). C ( k , M ) = 0.0599 M 2 − 1 M 2 + 1 + k 0.34 + k 3/2 ( 12 q M k − 2 + ( k 0.41 + 0.11 ) e − 0.308 k ) . The constant 0.0599 = ( 1.2 / 24 ) ⋅ 3 / 2 π 0.0599=(1.2/24)\cdot3/\sqrt{2\pi} 0.0599 = ( 1.2/24 ) ⋅ 3/ 2 π is exact: it is the first Edgeworth term at z = 0 z=0 z = 0 , with ∣ κ 4 ∣ / σ 4 → 6 / 5 |\kappa_4|/\sigma^4\to6/5 ∣ κ 4 ∣/ σ 4 → 6/5 .
Proof. The characteristic function of w − μ w-\mu w − μ is f ( θ ) = sin ( M θ / 2 ) / ( M sin ( θ / 2 ) ) f(\theta)=\sin(M\theta/2)/(M\sin(\theta/2)) f ( θ ) = sin ( M θ /2 ) / ( M sin ( θ /2 )) . Put x = θ / 2 x=\theta/2 x = θ /2 , y = M θ / 2 y=M\theta/2 y = M θ /2 and Λ ( t ) = log ( sin t / t ) + t 2 / 6 \Lambda(t)=\log(\sin t/t)+t^2/6 Λ ( t ) = log ( sin t / t ) + t 2 /6 , so log f = − σ 2 θ 2 / 2 + Λ ( y ) − Λ ( x ) \log f=-\sigma^2\theta^2/2+\Lambda(y)-\Lambda(x) log f = − σ 2 θ 2 /2 + Λ ( y ) − Λ ( x ) .
On ∣ θ ∣ ≤ π / M |\theta|\le\pi/M ∣ θ ∣ ≤ π / M : Λ ( t ) = − t 4 / 180 + Λ 6 ( t ) \Lambda(t)=-t^4/180+\Lambda_6(t) Λ ( t ) = − t 4 /180 + Λ 6 ( t ) with non-positive coefficients and ∣ Λ 6 ( t ) ∣ ≤ 4.35 ⋅ 10 − 4 t 6 |\Lambda_6(t)|\le4.35\cdot10^{-4}t^6 ∣ Λ 6 ( t ) ∣ ≤ 4.35 ⋅ 1 0 − 4 t 6 on ( 0 , π / 2 ] (0,\pi/2] ( 0 , π /2 ] . Since ( y 4 − x 4 ) / 180 = − κ 4 θ 4 / 24 (y^4-x^4)/180=-\kappa_4\theta^4/24 ( y 4 − x 4 ) /180 = − κ 4 θ 4 /24 , f k = e − k σ 2 θ 2 / 2 ( 1 + k κ 4 θ 4 / 24 + E ) f^k=e^{-k\sigma^2\theta^2/2}(1+k\kappa_4\theta^4/24+E) f k = e − k σ 2 θ 2 /2 ( 1 + k κ 4 θ 4 /24 + E ) with ∣ E ∣ ≤ ( k κ 4 θ 4 / 24 ) 2 / 2 + k ∣ Λ 6 ∣ e k ∣ Λ 6 ∣ |E|\le(k\kappa_4\theta^4/24)^2/2+k|\Lambda_6|e^{k|\Lambda_6|} ∣ E ∣ ≤ ( k κ 4 θ 4 /24 ) 2 /2 + k ∣ Λ 6 ∣ e k ∣ Λ 6 ∣ . The linear term integrates to the Edgeworth term exactly. The two error terms integrate to ≤ 0.146 / ( σ k 5 / 2 ) \le0.146/(\sigma k^{5/2}) ≤ 0.146/ ( σ k 5/2 ) and ≤ 0.19 / ( σ k 5 / 2 ) \le0.19/(\sigma k^{5/2}) ≤ 0.19/ ( σ k 5/2 ) , using κ 4 2 / σ 8 ≤ 4 \kappa_4^2/\sigma^8\le4 κ 4 2 / σ 8 ≤ 4 and ( M / σ ) 6 ≤ 4096 (M/\sigma)^6\le4096 ( M / σ ) 6 ≤ 4096 .
On π / M ≤ ∣ θ ∣ ≤ π \pi/M\le|\theta|\le\pi π / M ≤ ∣ θ ∣ ≤ π : ∣ f ∣ ≤ q M |f|\le q_M ∣ f ∣ ≤ q M , and ( 2 π ) − 1 ∫ ∣ f ∣ 2 = 1 / M ≤ 1 / ( 12 σ ) (2\pi)^{-1}\int|f|^2=1/M\le1/(\sqrt{12}\sigma) ( 2 π ) − 1 ∫ ∣ f ∣ 2 = 1/ M ≤ 1/ ( 12 σ ) .
The Gaussian and Edgeworth tails beyond π / M \pi/M π / M contribute ≤ ( 0.41 / k + 0.11 ) e − 0.308 k / σ \le(0.41/k+0.11)e^{-0.308k}/\sigma ≤ ( 0.41/ k + 0.11 ) e − 0.308 k / σ , using k σ 2 π 2 / ( 2 M 2 ) ≥ 0.308 k k\sigma^2\pi^2/(2M^2)\ge0.308k k σ 2 π 2 / ( 2 M 2 ) ≥ 0.308 k . □
Against exact convolutions (M ∈ { 2 , 3 , 5 , 16 , 64 , 317 } M\in\{2,3,5,16,64,317\} M ∈ { 2 , 3 , 5 , 16 , 64 , 317 } , 2 ≤ k ≤ 160 2\le k\le160 2 ≤ k ≤ 160 ) the inequality holds in every case. The residual after the Edgeworth term is at most 0.157 against the bound’s 0.34, and the measured C ( k ) C(k) C ( k ) tends to 0.0599 for large M M M and to 0.0997 = 0.0599 · 5/3 at M = 2 M = 2 M = 2 .
The constant comes from the fourth cumulant. An envelope ∣ f ( θ ) ∣ ≤ 2 / ( M ∣ θ ∣ ) |f(\theta)| \le2/(M|\theta|) ∣ f ( θ ) ∣ ≤ 2/ ( M ∣ θ ∣ ) on [ π / M , π ] [\pi/M,\pi] [ π / M , π ] is false: ∣ f ∣ ⋅ M ∣ θ ∣ / 2 |f| \cdot M|\theta|/2 ∣ f ∣ ⋅ M ∣ θ ∣/2 reaches π / 2 \pi/2 π /2 there. The true envelope is π / ( M ∣ θ ∣ ) \pi/(M|\theta|) π / ( M ∣ θ ∣ ) , and the middle range governs only small k k k .
The endgame is non-empty
Lemma B. Let the weights of E E E be independent and uniform in { 1 , … , M } \{1,\ldots,M\} { 1 , … , M } , ∣ E ∣ = m |E| = m ∣ E ∣ = m , let Z ( u ) = # { ϵ ∈ { ± 1 } E : ∑ ϵ i w i = u } Z(u) = \#\{\epsilon\in\{\pm1\}^{E} : \sum\epsilon_iw_i = u\} Z ( u ) = # { ϵ ∈ { ± 1 } E : ∑ ϵ i w i = u } , and
λ m = 2 m + 1 M 2 π m c M , c M = 1 3 + 1 2 M + 1 6 M 2 . \lambda_m = \frac{2^{m+1}}{M\sqrt{2\pi m c_M}}, \qquad c_M = \frac{1}{3}+\frac{1}{2M}+\frac{1}{6M^2}. λ m = M 2 π m c M 2 m + 1 , c M = 3 1 + 2 M 1 + 6 M 2 1 . Fix g > 0 g > 0 g > 0 and set η = 1 / 10 \eta= 1/10 η = 1/10 . Uniformly in M ≥ 2 M \ge2 M ≥ 2 , in s s s with ∣ s − m μ ∣ ≤ g σ m |s-m\mu| \le g\sigma\sqrt{m} ∣ s − m μ ∣ ≤ g σ m and in u u u with ∣ u ∣ ≤ M |u| \le M ∣ u ∣ ≤ M , u ≡ s ( m o d 2 ) u \equiv s \pmod{2} u ≡ s ( mod 2 ) :
λ : = E [ Z ( u ) ∣ S E = s ] = λ m ( 1 + o ( 1 ) ) \lambda:= E[Z(u)\mid S_E=s] = \lambda_m(1+o(1)) λ := E [ Z ( u ) ∣ S E = s ] = λ m ( 1 + o ( 1 )) (the expected number of solutions of the block; F F F always denotes a generating function);
E [ Z ( u ) 2 ∣ S E = s ] ≤ λ + λ ⋅ 1 [ u = 0 ] + λ 2 ( 1 + O ( m − 1 / 5 ) ) E[Z(u)^2\mid S_E=s] \le\lambda+\lambda\cdot1[u=0]+\lambda^2(1+O(m^{-1/5})) E [ Z ( u ) 2 ∣ S E = s ] ≤ λ + λ ⋅ 1 [ u = 0 ] + λ 2 ( 1 + O ( m − 1/5 )) ;
Pr ( Z ( u ) = 0 ∣ S E = s ) ≤ 2 / λ + O ( m − 1 / 5 ) \Pr(Z(u)=0\mid S_E=s) \le2/\lambda+O(m^{-1/5}) Pr ( Z ( u ) = 0 ∣ S E = s ) ≤ 2/ λ + O ( m − 1/5 ) .
For u ∈ { 0 , 1 } u\in\{0,1\} u ∈ { 0 , 1 } without conditioning, these are the moment estimates behind [BCP, Theorem C(i)]. The new point is the conditioning on S E S_E S E , which Lemma A needs.
Proof. With ϵ i = + 1 \epsilon_i=+1 ϵ i = + 1 on x ⊆ E x\subseteq E x ⊆ E , ∑ ϵ i w i = 2 S x − S E \sum\epsilon_iw_i=2S_x-S_E ∑ ϵ i w i = 2 S x − S E , and the solutions are the x x x with S x = a : = ( s + u ) / 2 S_x=a:=(s+u)/2 S x = a := ( s + u ) /2 .
(1) λ = ∑ x Pr ( S x = a ) Pr ( S E ∖ x = s − a ) / Pr ( S E = s ) \lambda=\sum_x\Pr(S_x=a)\Pr(S_{E\setminus x}=s-a)/\Pr(S_E=s) λ = ∑ x Pr ( S x = a ) Pr ( S E ∖ x = s − a ) / Pr ( S E = s ) . Restrict to ∣ k − m / 2 ∣ ≤ m 3 / 5 |k-m/2|\le m^{3/5} ∣ k − m /2∣ ≤ m 3/5 , k = ∣ x ∣ k=|x| k = ∣ x ∣ ; the other x x x are a fraction ≤ 2 e − 2 m 1 / 5 \le2e^{-2m^{1/5}} ≤ 2 e − 2 m 1/5 of all, and each of their terms is O ( m / M ) O(\sqrt{m}/M) O ( m / M ) , since every local probability is ≤ 1 / M \le1/M ≤ 1/ M , so they are negligible against λ m \lambda_m λ m . On the typical range Lemma B0′ replaces each probability by its Gaussian; summed over x x x , the absolute errors give a relative error O ( m − 1 / 2 ) O(m^{-1/2}) O ( m − 1/2 ) . The Gaussian ratio is the density at a a a of the conditional law of S k S_k S k given S m = s S_m=s S m = s , N ( k s / m , σ 2 k ( m − k ) / m ) N(ks/m,\sigma^2k(m-k)/m) N ( k s / m , σ 2 k ( m − k ) / m ) ; its variance can be frozen at σ 2 m / 4 \sigma^2m/4 σ 2 m /4 , and the sum over k = m / 2 + j k=m/2+j k = m /2 + j is a Riemann sum of a Gaussian, equal to λ m ( 1 + o ( 1 ) ) \lambda_m(1+o(1)) λ m ( 1 + o ( 1 )) uniformly in M M M and in ∣ u ∣ ≤ M |u|\le M ∣ u ∣ ≤ M .
(2) For a pair ( x , y ) (x,y) ( x , y ) put C = x ∩ y C=x\cap y C = x ∩ y , A = x ∖ y A=x\setminus y A = x ∖ y , B = y ∖ x B=y\setminus x B = y ∖ x , D = E ∖ ( x ∪ y ) D=E\setminus(x\cup y) D = E ∖ ( x ∪ y ) . The conditions read S A = S B = a − S C S_A=S_B=a-S_C S A = S B = a − S C and S D = S C − u S_D=S_C-u S D = S C − u .
The diagonal gives λ \lambda λ . If exactly one of A , B A,B A , B is empty the pair is impossible. If C C C and D D D are both empty, y = E ∖ x y=E\setminus x y = E ∖ x , possible only for u = 0 u=0 u = 0 , giving λ ⋅ 1 [ u = 0 ] \lambda\cdot1[u=0] λ ⋅ 1 [ u = 0 ] .
For every other pair, bounding two factors by their maxima and ∑ c Pr ( S C = c ) Pr ( S D = c − u ) = Pr ( S C − S D = u ) \sum_c\Pr(S_C=c)\Pr(S_D=c-u)=\Pr(S_C-S_D=u) ∑ c Pr ( S C = c ) Pr ( S D = c − u ) = Pr ( S C − S D = u ) by its maximum gives at most C m 3 / 2 Cm^{3/2} C m 3/2 times the value of a typical pair. Atypical pairs are a fraction e − c m 2 η e^{-cm^{2\eta}} e − c m 2 η of all.
For typical pairs the four class sums S A S_A S A , S B S_B S B , S C S_C S C , S D S_D S D are independent sums of ∣ A ∣ |A| ∣ A ∣ , ∣ B ∣ |B| ∣ B ∣ , ∣ C ∣ |C| ∣ C ∣ , ∣ D ∣ |D| ∣ D ∣ weights, and Lemma B0′, uniform in M M M , applies to each of them. So, given S E S_E S E , the two signed sums are jointly
normal with covariance σ 2 ( ∑ ε i ε i ′ − ( ∑ ε i ) ( ∑ ε i ′ ) / m ) \sigma^2(\sum\varepsilon_i\varepsilon_i' - (\sum\varepsilon_i)(\sum\varepsilon_i')/m) σ 2 ( ∑ ε i ε i ′ − ( ∑ ε i ) ( ∑ ε i ′ ) / m ) , hence correlation r = O ( m − 1 / 2 + η ) r = O(m^{-1/2+\eta}) r = O ( m − 1/2 + η ) . The joint density divided by the product of the marginals is 1 + O ( m − 1 / 5 ) 1+O(m^{-1/5}) 1 + O ( m − 1/5 ) . Typical pairs have ∣ x ∣ |x| ∣ x ∣ , ∣ y ∣ |y| ∣ y ∣ , ∣ x △ y ∣ |x\triangle y| ∣ x △ y ∣ within m 3 / 5 m^{3/5} m 3/5 of m / 2 m/2 m /2 , so each class has at least m / 8 m/8 m /8 elements; summing the four Gaussian approximations over c c c gives the Gaussian density of the pair, and the errors of Lemma B0′ become relative errors because λ ≥ λ m / 2 \lambda\ge\lambda_m/2 λ ≥ λ m /2 by (1).
Why the signed form, and the centre at S E / 2 S_E/2 S E /2 . For a target fixed independently of E E E the unsigned count does not concentrate: two overlapping subsets share the sum of their intersection, and the second moment exceeds the square of the first by a constant factor (about 1 / 1 − 1 4 ≈ 1.15 1/\sqrt{1-\frac{1}{4}} \approx1.15 1/ 1 − 4 1 ≈ 1.15 for a typical pair). With the centre at S E / 2 S_E/2 S E /2 the common shift cancels.
Lemma B‴ (exact reduction to first moments). Let λ J ( v , t ) = E [ { ε ∈ { ± 1 } J : ∑ J ε i w i = v } ∣ S J = t ] \lambda_J(v,t) = E[\{\varepsilon\in\{\pm1\}^J : \sum_J \varepsilon_i w_i = v\}\mid S_J=t] λ J ( v , t ) = E [{ ε ∈ { ± 1 } J : ∑ J ε i w i = v } ∣ S J = t ] . Then
E [ Z ( u ) 2 ∣ S E = s ] = ∑ k = 0 m ( m k ) ∑ s 1 Pr ( S m − k = s 1 ) Pr ( S k = s − s 1 ) Pr ( S m = s ) λ m − k ( u , s 1 ) λ k ( 0 , s − s 1 ) . E[Z(u)^2\mid S_E=s] = \sum_{k=0}^{m} \binom{m}{k}\sum_{s_1} \frac{\Pr(S_{m-k}=s_1)\Pr(S_k=s-s_1)}{\Pr(S_m=s)}\lambda_{m-k}(u,s_1)\lambda_k(0,s-s_1). E [ Z ( u ) 2 ∣ S E = s ] = k = 0 ∑ m ( k m ) s 1 ∑ Pr ( S m = s ) Pr ( S m − k = s 1 ) Pr ( S k = s − s 1 ) λ m − k ( u , s 1 ) λ k ( 0 , s − s 1 ) .
Proof. Split a pair ( ε , ε ′ ) (\varepsilon,\varepsilon') ( ε , ε ′ ) into the m − k m-k m − k positions where the signs agree and the k k k where they differ. The conditions ∑ ε w = ∑ ε ′ w = u \sum\varepsilon w=\sum\varepsilon' w=u ∑ εw = ∑ ε ′ w = u become: the agreeing part sums to u u u and the differing part to 0 0 0 . Given their weight sums, the two parts are independent. □
Proposition B′ (the constant of the second moment). Fix M ≥ 2 M \ge2 M ≥ 2 and g > 0 g > 0 g > 0 , and put z = ( s − m μ ) / ( σ m ) z=(s-m\mu)/(\sigma\sqrt{m}) z = ( s − m μ ) / ( σ m ) . Uniformly in ∣ z ∣ ≤ g |z| \le g ∣ z ∣ ≤ g and ∣ u ∣ ≤ M |u| \le M ∣ u ∣ ≤ M with u ≡ s ( m o d 2 ) u \equiv s\pmod{2} u ≡ s ( mod 2 ) ,
E [ Z 2 ∣ S E = s ] λ 2 = 1 + 1 + 1 [ u = 0 ] λ + κ m + γ M z m 3 / 2 + O M , g ( m − 2 ) , \frac{E[Z^2\mid S_E=s]}{\lambda^2}
=1+\frac{1+\mathbf{1}[u=0]}{\lambda}+\frac{\kappa}{m}+\frac{\gamma_M z}{m^{3/2}}+O_{M,g}(m^{-2}), λ 2 E [ Z 2 ∣ S E = s ] = 1 + λ 1 + 1 [ u = 0 ] + m κ + m 3/2 γ M z + O M , g ( m − 2 ) , and, conditioning only on the event S E ≡ u ( m o d 2 ) S_E\equiv u\pmod{2} S E ≡ u ( mod 2 ) , with Z ‾ u = E [ Z ∣ S E ≡ u ( m o d 2 ) ] \overline{Z}_u=E[Z\mid S_E\equiv u\pmod{2}] Z u = E [ Z ∣ S E ≡ u ( mod 2 )] ,
E [ Z 2 ∣ S E ≡ u ( m o d 2 ) ] Z ‾ u 2 = 1 + 1 + 1 [ u = 0 ] Z ‾ u + κ m + c 2 ( M , u ) m 2 + O M ( m − 3 ) , c 2 ( M , u ) = c 2 ( M , 0 ) − 2 κ u 2 E w 2 , \frac{E[Z^2\mid S_E\equiv u\pmod{2}]}{\overline{Z}_u^2}
=1+\frac{1+\mathbf{1}[u=0]}{\overline{Z}_u}+\frac{\kappa}{m}+\frac{c_2(M,u)}{m^2}+O_M(m^{-3}),\qquad c_2(M,u)=c_2(M,0)-\frac{2\kappa u^2}{Ew^2}, Z u 2 E [ Z 2 ∣ S E ≡ u ( mod 2 )] = 1 + Z u 1 + 1 [ u = 0 ] + m κ + m 2 c 2 ( M , u ) + O M ( m − 3 ) , c 2 ( M , u ) = c 2 ( M , 0 ) − E w 2 2 κ u 2 , with
κ = Var ( w 2 ) 4 ( E w 2 ) 2 → 1 5 , κ c = Var ( w 2 ) − Cov ( w 2 , w ) 2 / Var ( w ) 4 ( E w 2 ) 2 → 1 80 , \kappa=\frac{\operatorname{Var}(w^2)}{4(Ew^2)^2}\to\frac{1}{5},\qquad
\kappa_c=\frac{\operatorname{Var}(w^2)-\operatorname{Cov}(w^2,w)^2/\operatorname{Var}(w)}{4(Ew^2)^2}\to\frac{1}{80}, κ = 4 ( E w 2 ) 2 Var ( w 2 ) → 5 1 , κ c = 4 ( E w 2 ) 2 Var ( w 2 ) − Cov ( w 2 , w ) 2 / Var ( w ) → 80 1 , γ M = σ ( B − 2 β A ) 4 ( E w 2 ) 2 → − 3 80 , A = Var ( w 2 ) − Cov ( w 2 , w ) 2 Var ( w ) , β = Cov ( w , w 2 ) Var ( w ) E w 2 , B = E [ R 2 ( w − μ ) ] Var ( w ) , \gamma_M=\frac{\sigma(B-2\beta A)}{4(Ew^2)^2}\to-\frac{\sqrt{3}}{80},\qquad
A=\operatorname{Var}(w^2)-\frac{\operatorname{Cov}(w^2,w)^2}{\operatorname{Var}(w)},\quad
\beta=\frac{\operatorname{Cov}(w,w^2)}{\operatorname{Var}(w)Ew^2},\quad
B=\frac{E[R^2(w-\mu)]}{\operatorname{Var}(w)}, γ M = 4 ( E w 2 ) 2 σ ( B − 2 β A ) → − 80 3 , A = Var ( w 2 ) − Var ( w ) Cov ( w 2 , w ) 2 , β = Var ( w ) E w 2 Cov ( w , w 2 ) , B = Var ( w ) E [ R 2 ( w − μ )] , where R = w 2 − E w 2 − ( Cov ( w 2 , w ) / Var ( w ) ) ( w − μ ) R=w^2-Ew^2-(\operatorname{Cov}(w^2,w)/\operatorname{Var}(w))(w-\mu) R = w 2 − E w 2 − ( Cov ( w 2 , w ) / Var ( w )) ( w − μ ) .
Proof. Draw signs ε , ε ′ ∈ { ± 1 } E \varepsilon,\varepsilon'\in\{\pm1\}^E ε , ε ′ ∈ { ± 1 } E uniformly and independently of the weights. Then, with $\lambda=E[Z\mid S_E=s] as in Lemma B, λ ⋅ Pr ( S E = s ) = 2 m Pr ( ∑ Y i = ( s , u ) ) \lambda\cdot\Pr(S_E=s)=2^m\Pr(\sum Y_i=(s,u)) λ ⋅ Pr ( S E = s ) = 2 m Pr ( ∑ Y i = ( s , u )) with Y i = ( w i , ε i w i ) Y_i=(w_i,\varepsilon_iw_i) Y i = ( w i , ε i w i ) , and E [ Z 2 ∣ S E = s ] ⋅ Pr ( S E = s ) = 4 m Pr ( ∑ X i = ( s , u , u ) ) \mathbb{E}[Z^2\mid S_E=s]\cdot\Pr(S_E=s)=4^m\Pr(\sum X_i=(s,u,u)) E [ Z 2 ∣ S E = s ] ⋅ Pr ( S E = s ) = 4 m Pr ( ∑ X i = ( s , u , u )) with X i = ( w i , ε i w i , ε i ′ w i ) X_i=(w_i,\varepsilon_iw_i,\varepsilon'_iw_i) X i = ( w i , ε i w i , ε i ′ w i ) . So the three quantities in the ratio are local probabilities of sums of m m m independent copies of a bounded lattice vector, in dimensions 3, 1 and 2. X X X has mean ( μ , 0 , 0 ) (\mu,0,0) ( μ , 0 , 0 ) , covariance diag ( σ 2 , E w 2 , E w 2 ) \operatorname{diag}(\sigma^2,\mathbb{E}w^2,\mathbb{E}w^2) diag ( σ 2 , E w 2 , E w 2 ) , and generates the lattice { a ≡ b ≡ c ( m o d 2 ) } \{a\equiv b\equiv c\pmod2\} { a ≡ b ≡ c ( mod 2 )} of index 4; Y Y Y generates { a ≡ b ( m o d 2 ) } \{a\equiv b\pmod2\} { a ≡ b ( mod 2 )} , of index 2. The Edgeworth expansion for sums of independent lattice vectors [BR, §22], with all moments available, gives each probability as the lattice index times the Gaussian density times 1 + ∑ r = 1 3 m − r / 2 P r + O ( m − 2 ) 1+\sum_{r=1}^{3}m^{-r/2}P_r+O(m^{-2}) 1 + ∑ r = 1 3 m − r /2 P r + O ( m − 2 ) . The indices ( 4 ⋅ 1 / 2 2 ) (4\cdot1/2^2) ( 4 ⋅ 1/ 2 2 ) and the Gaussian factors cancel exactly in the ratio. In standardized coordinates the cumulants that involve the sign coordinates are κ 122 = κ 133 = Cov ( w , w 2 ) / ( σ E w 2 ) \kappa_{122}=\kappa_{133}=\operatorname{Cov}(w,w^2)/(\sigma\mathbb{E}w^2) κ 122 = κ 133 = Cov ( w , w 2 ) / ( σ E w 2 ) , κ 2222 = κ 3333 = E w 4 / ( E w 2 ) 2 − 3 \kappa_{2222}=\kappa_{3333}=\mathbb{E}w^4/(\mathbb{E}w^2)^2-3 κ 2222 = κ 3333 = E w 4 / ( E w 2 ) 2 − 3 , κ 1122 = κ 1133 \kappa_{1122}=\kappa_{1133} κ 1122 = κ 1133 and κ 2233 = E w 4 / ( E w 2 ) 2 − 1 \kappa_{2233}=\mathbb{E}w^4/(\mathbb{E}w^2)^2-1 κ 2233 = E w 4 / ( E w 2 ) 2 − 1 ; the others of order three vanish because ε w \varepsilon w εw is symmetric and ε , ε ′ \varepsilon,\varepsilon' ε , ε ′ are independent.
Order m − 1 / 2 m^{-1/2} m − 1/2 : P 1 P_1 P 1 is − κ 122 z -\kappa_{122}z − κ 122 z for X X X , − κ 122 z / 2 -\kappa_{122}z/2 − κ 122 z /2 for Y Y Y and 0 for S E S_E S E , and these cancel in P 1 ( X ) + P 1 ( S E ) − 2 P 1 ( Y ) P_1(X)+P_1(S_E)-2P_1(Y) P 1 ( X ) + P 1 ( S E ) − 2 P 1 ( Y ) .
Order m − 1 m^{-1} m − 1 : every fourth-cumulant term cancels except 6 κ 2233 / 24 = κ 6\kappa_{2233}/24=\kappa 6 κ 2233 /24 = κ . The third-cumulant terms of P 2 P_2 P 2 give κ 122 2 ( z 2 − 1 ) / 4 \kappa_{122}^2(z^2-1)/4 κ 122 2 ( z 2 − 1 ) /4 , and the expansion of the logarithm gives − 1 2 ( P 1 ( X ) 2 + P 1 ( S E ) 2 − 2 P 1 ( Y ) 2 ) = − κ 122 2 z 2 / 4 -\frac{1}{2}(P_1(X)^2+P_1(S_E)^2-2P_1(Y)^2)=-\kappa_{122}^2z^2/4 − 2 1 ( P 1 ( X ) 2 + P 1 ( S E ) 2 − 2 P 1 ( Y ) 2 ) = − κ 122 2 z 2 /4 . The sum is κ − κ 122 2 / 4 = κ c \kappa-\kappa_{122}^2/4=\kappa_c κ − κ 122 2 /4 = κ c , independent of z z z .
Order m − 3 / 2 m^{-3/2} m − 3/2 : the term is odd in z z z , and its coefficient is γ M \gamma_M γ M : it is the linear change in z z z of the conditional variance of ∑ w i 2 \sum w_i^2 ∑ w i 2 given S E S_E S E , ( σ B / Var ( w ) ) z / m (\sigma_B/\operatorname{Var}(w))z/\sqrt{m} ( σ B / Var ( w )) z / m relative to m A mA m A , against the shift of the conditional mean of ∑ w i 2 \sum w_i^2 ∑ w i 2 , which enters squared.
The unconditional statement is the same computation with X = ( ε w , ε ′ w ) X=(\varepsilon w,\varepsilon'w) X = ( εw , ε ′ w ) , lattice index 2 on the event S E ≡ u ( m o d 2 ) S_E\equiv u\pmod2 S E ≡ u ( mod 2 ) , and Y = ε w Y=\varepsilon w Y = εw : the term of order m − 1 m^{-1} m − 1 is κ 1122 / 4 = κ \kappa_{1122}/4=\kappa κ 1122 /4 = κ , the odd orders vanish because both laws are symmetric, and c 2 ( M , u ) c_2(M,u) c 2 ( M , u ) collects the terms of order m − 2 m^{-2} m − 2 ; its dependence on u u u comes from the cross fourth-cumulant term, c 2 ( M , u ) = c 2 ( M , 0 ) − 2 κ u 2 / E w 2 c_2(M,u)=c_2(M,0)-2\kappa u^2/\mathbb{E}w^2 c 2 ( M , u ) = c 2 ( M , 0 ) − 2 κ u 2 / E w 2 .
Heuristically, the sub-block first moments are proportional to ( ∑ w i 2 ) − 1 / 2 (\sum w_i^2)^{-1/2} ( ∑ w i 2 ) − 1/2 . Without conditioning, the fluctuation of ∑ w i 2 \sum w_i^2 ∑ w i 2 gives κ / m \kappa/m κ / m , the δ n 2 \delta_n^2 δ n 2 of [BCP, Theorem 4.1]. Conditioning on S E S_E S E removes the part of ∑ w i 2 \sum w_i^2 ∑ w i 2 explained by ∑ w i \sum w_i ∑ w i : in units of M M M , 4 / 45 − 1 / 12 = 1 / 180 4/45-1/12=1/180 4/45 − 1/12 = 1/180 , and κ c = ( 1 / 180 ) / ( 4 / 9 ) = 1 / 80 \kappa_c=(1/180)/(4/9)=1/80 κ c = ( 1/180 ) / ( 4/9 ) = 1/80 . Measured at m = 12 m=12 m = 12 , M = 32 M=32 M = 32 over about 10 6 10^6 1 0 6 instances: unconditional excess + 0.013 +0.013 + 0.013 (prediction 0.017 at M = ∞ M=\infty M = ∞ ), conditional excess − 0.003 ± 0.001 -0.003\pm0.001 − 0.003 ± 0.001 against a prediction of + 0.001 +0.001 + 0.001 . The conditional value disagrees with the leading term by about 4 standard errors: at this m m m the next order, of size about − 0.4 / m 2 -0.4/m^2 − 0.4/ m 2 , dominates. In either case, given S E S_E S E the variance of the count is close to that of a Poisson variable. An exact check, by convolution and without sampling (b_prime_exact.py): the unconditional remainder times m 2 m^2 m 2 is 0.25, 0.28 and 0.30 for M = 16 M=16 M = 16 (m = 80 m=80 m = 80 ), 64 (m = 80 m=80 m = 80 ) and 256 (m = 40 m=40 m = 40 ), against c 2 = 0.246 c_2=0.246 c 2 = 0.246 , 0.274, 0.281 computed from the series (the values c 2 ( M , 0 ) c_2(M,0) c 2 ( M , 0 ) ; at M = 16 M=16 M = 16 the exact remainder times m 2 m^2 m 2 is − 0.008 -0.008 − 0.008 at u = 8 u=8 u = 8 and − 0.771 -0.771 − 0.771 at u = 16 u=16 u = 16 , against − 0.009 -0.009 − 0.009 and − 0.772 -0.772 − 0.772 ); conditionally, at the centre and M = 16 M=16 M = 16 , the remainder times m 2 m^2 m 2 is 0.017 for m = 28 , 40 , 56 m=28,40,56 m = 28 , 40 , 56 ; at z = 1 z=1 z = 1 and z = 2 z=2 z = 2 the remainder is linear in z z z , and remainder ⋅ m 3 / 2 / z = − 0.0104 , − 0.0128 , − 0.0138 , − 0.0145 \cdot m^{3/2}/z=-0.0104,-0.0128,-0.0138,-0.0145 ⋅ m 3/2 / z = − 0.0104 , − 0.0128 , − 0.0138 , − 0.0145 at m = 20 , 40 , 80 , 120 m=20,40,80,120 m = 20 , 40 , 80 , 120 , approaching γ 16 = − 0.0171 \gamma_{16}=-0.0171 γ 16 = − 0.0171 with a correction of order m − 1 / 2 m^{-1/2} m − 1/2 .
Proposition B''' (the identity evaluated exactly). For moderate M M M the distributions of S k S_k S k are computed exactly by convolution, and Lemma B''' gives the conditional second moment exactly over the whole window ∣ s − m μ ∣ ≤ 2 σ m |s-m\mu|\le2\sigma\sqrt{m} ∣ s − m μ ∣ ≤ 2 σ m and all ∣ u ∣ ≤ M |u|\le M ∣ u ∣ ≤ M :
Table 11. For these M M M the per-round failure probability is ≤ 1 2 \le\frac{1}{2} ≤ 2 1 as soon as λ ≥ 5 \lambda\ge5 λ ≥ 5 . Below 2 / λ 2/\lambda 2/ λ there is a floor that decays like κ c / m \kappa_c/m κ c / m .
The theorems
Theorem R (random weights). Let w 1 , … , w n w_1,\ldots,w_n w 1 , … , w n be independent and uniform in { 1 , … , M } \{1,\ldots,M\} { 1 , … , M } , M = 2 b M=2^b M = 2 b , fix g ≥ 0 g\ge0 g ≥ 0 , and let the target T T T be fixed or, more generally, a function of the weights of H H H and of S E S_E S E only. Choose m m m with λ m ≥ λ ∗ \lambda_m\ge\lambda^* λ m ≥ λ ∗ . The probability that ∣ T − S / 2 ∣ ≤ S H / 2 \lvert T-S/2\rvert\le S_H/2 ∣ T − S /2 ∣ ≤ S H /2 and the centre rule on H H H followed by meet-in-the-middle on E E E returns no solution is at most 2 / λ ∗ + O ( m − 1 / 5 ) + 2 e − g 2 / 6 2/\lambda^*+O(m^{-1/5})+2e^{-g^2/6} 2/ λ ∗ + O ( m − 1/5 ) + 2 e − g 2 /6 , uniformly in M ≥ 2 M\ge2 M ≥ 2 . The time is O ( n log n ) + O ( λ ∗ M ⋅ m 5 / 4 ) O(n\log n)+O(\sqrt{\lambda^*M}\mathbin{\cdot}m^{5/4}) O ( n log n ) + O ( λ ∗ M ⋅ m 5/4 ) . Every returned solution is verified.
Proof. Lemma A places the residual within M / 2 M/2 M /2 of S E / 2 S_E/2 S E /2 ; since T T T depends on E E E only through S E S_E S E , so does u u u . S E S_E S E lies within g g g standard deviations of its mean with probability ≥ 1 − 2 e − g 2 / 6 \ge1-2e^{-g^2/6} ≥ 1 − 2 e − g 2 /6 (Hoeffding). On that event, since H H H is independent of E E E , Lemma B(3) applies conditionally on S E S_E S E , and Lemma B(1) gives λ ≥ λ ∗ ( 1 − O ( m − 1 / 5 ) ) \lambda\ge\lambda^*(1-O(m^{-1/5})) λ ≥ λ ∗ ( 1 − O ( m − 1/5 )) , so the failure probability is at most 2 / λ ∗ + O ( m − 1 / 5 ) 2/\lambda^*+O(m^{-1/5}) 2/ λ ∗ + O ( m − 1/5 ) . The bound is on the joint probability of the hypothesis on T T T and the failure. □
Theorem R′ (failure probability δ \delta δ ). Fix r = ⌈ log 2 ( 2 / δ ) ⌉ r=\lceil\log_2(2/\delta)\rceil r = ⌈ log 2 ( 2/ δ )⌉ disjoint endgame blocks E 1 , … , E r E_1,\ldots,E_r E 1 , … , E r and let G G G be the remaining indices; assume ∣ T − S / 2 ∣ ≤ S G / 2 − r m M \lvert T-S/2\rvert\le S_G/2-rmM ∣ T − S /2 ∣ ≤ S G /2 − r m M , with T T T fixed or a function of the weights of G G G and of the block sums only. In round j j j , first include every other block entirely or not at all, by a rule that looks only at the block sums, so that the target T j T_j T j left for G ∪ E j G\cup E_j G ∪ E j satisfies ∣ T j − ( S G + S E j ) / 2 ∣ ≤ S G / 2 + M / 2 \lvert T_j-(S_G+S_{E_j})/2\rvert\le S_G/2+M/2 ∣ T j − ( S G + S E j ) /2 ∣ ≤ S G /2 + M /2 (adding whole blocks greedily achieves this). Then run the centre rule on G G G alone, whose weights are ≤ M \le M ≤ M , and meet-in-the-middle on E j E_j E j . With g = 6 log ( 4 r / δ ) g=\sqrt{6\log(4r/\delta)} g = 6 log ( 4 r / δ ) , λ m ≥ 8 \lambda_m\ge8 λ m ≥ 8 and m m m large enough that Lemma B(3) gives ≤ 1 2 \le\frac{1}{2} ≤ 2 1 on the window, the probability that ∣ T − S / 2 ∣ ≤ S G / 2 − r m M \lvert T-S/2\rvert\le S_G/2-rmM ∣ T − S /2 ∣ ≤ S G /2 − r m M and the algorithm fails is ≤ δ \le\delta ≤ δ ; the time is O ( log ( 1 / δ ) ⋅ ( n log n + λ m M m 5 / 4 ) ) O(\log(1/\delta)\mathbin{\cdot}(n\log n+\sqrt{\lambda_mM}m^{5/4})) O ( log ( 1/ δ ) ⋅ ( n log n + λ m M m 5/4 )) .
Proof. By Lemma A with head G G G , the residual of round j j j satisfies ∣ u j ∣ ≤ M \lvert u_j\rvert\le M ∣ u j ∣ ≤ M . Given the σ \sigma σ -algebra generated by the weights of G G G and the block sums, the residual of every round is determined, and the internal configurations of the blocks are independent, each conditioned on its sum. So the failures are conditionally independent, each with probability ≤ 1 2 \le\frac{1}{2} ≤ 2 1 on the event that all block sums are in the window, by Lemma B(1) (λ ≥ 6 \lambda\ge6 λ ≥ 6 from λ m ≥ 8 \lambda_m\ge8 λ m ≥ 8 ) and Lemma B(3). The complement of that event has probability ≤ 2 r e − g 2 / 6 = δ / 2 \le2re^{-g^2/6}=\delta/2 ≤ 2 r e − g 2 /6 = δ /2 . □
For b = O ( log n ) b=O(\log n) b = O ( log n ) the time is polynomial. For ( log n ) 2 ≪ b ≪ n (\log n)^2\ll b\ll n ( log n ) 2 ≪ b ≪ n it is 2 b / 2 + o ( b ) 2^{b/2+o(b)} 2 b /2 + o ( b ) . This is the rigorous form of the “no arcs, centre rule” variant of the ablation.
Dense instances: the arcs and the almost divisors
Lemma C. Let d ≥ 2 d \ge2 d ≥ 2 , r ( c ) = # { x : ∑ i x i w i ≡ c ( m o d d ) } r(c)=\#\{x:\sum_i x_iw_i \equiv c \pmod d\} r ( c ) = # { x : ∑ i x i w i ≡ c ( mod d )} and, for d ′ ∣ d d' \mid d d ′ ∣ d , k ( d ′ ) = # { i : d ′ ∤ w i } k(d')=\#\{i:d'\nmid w_i\} k ( d ′ ) = # { i : d ′ ∤ w i } .
∣ d ⋅ r ( c ) / 2 n − 1 ∣ ≤ ∑ a = 1 d − 1 ∏ i ∣ cos ( π a w i / d ) ∣ ≤ ∑ d ′ ∣ d , d ′ > 1 φ ( d ′ ) e − π 2 k ( d ′ ) / ( 2 d ′ 2 ) \left|d\cdot r(c)/2^n-1\right|\le\sum_{a=1}^{d-1}\prod_i\left|\cos(\pi aw_i/d)\right|\le\sum_{d'\mid d,\ d'>1}\varphi(d')e^{-\pi^2k(d')/(2d'^2)} ∣ d ⋅ r ( c ) / 2 n − 1 ∣ ≤ ∑ a = 1 d − 1 ∏ i ∣ cos ( π a w i / d ) ∣ ≤ ∑ d ′ ∣ d , d ′ > 1 φ ( d ′ ) e − π 2 k ( d ′ ) / ( 2 d ′2 ) .
If all but k k k weights are divisible by d d d and 2 k < d 2^k<d 2 k < d , at least d − 2 k d-2^k d − 2 k classes are empty, and some arc a / d a/d a / d , a ≠ 0 a\ne0 a = 0 , has ∏ i ∣ cos ( π a w i / d ) ∣ ≥ 1 / ( d − 1 ) \prod_i|\cos(\pi aw_i/d)|\ge1/(d-1) ∏ i ∣ cos ( π a w i / d ) ∣ ≥ 1/ ( d − 1 ) .
Proof. (1) r ( c ) = d − 1 ∑ a e ( − a c / d ) ∏ i ( 1 + e ( a w i / d ) ) r(c)=d^{-1}\sum_a e(-ac/d)\prod_i(1+e(aw_i/d)) r ( c ) = d − 1 ∑ a e ( − a c / d ) ∏ i ( 1 + e ( a w i / d )) ; for a / d = a ′ / d ′ a/d=a'/d' a / d = a ′ / d ′ in lowest terms, a factor with d ′ ∤ w i d'\nmid w_i d ′ ∤ w i has modulus ≤ cos ( π / d ′ ) ≤ e − π 2 / ( 2 d ′ 2 ) \le\cos(\pi/d')\le e^{-\pi^2/(2d'^2)} ≤ cos ( π / d ′ ) ≤ e − π 2 / ( 2 d ′2 ) . (2) The divisible weights do not move the residue; for an empty class the sum over a ≠ 0 a\ne0 a = 0 equals − 1 -1 − 1 .
Corollary C′ (via Bringmann–Wellnitz). Let X X X be a multiset of n n n weights with sum Σ X \Sigma_X Σ X and largest multiplicity μ X \mu_X μ X . Suppose X X X is C δ C_\delta C δ -dense in the sense of [BW, Def. 3.1], with C δ = 1699200 log ( 2 n ) log 2 ( 2 μ X ) C_\delta=1699200\log(2n)\log^2(2\mu_X) C δ = 1699200 log ( 2 n ) log 2 ( 2 μ X ) , and ( 4 + 2 C g ) μ X max X Σ X / n 2 ≤ t ≤ Σ X / 2 (4+2C_g)\mu_X\max X\Sigma_X/n^2\le t\le\Sigma_X/2 ( 4 + 2 C g ) μ X max X Σ X / n 2 ≤ t ≤ Σ X /2 , with C g = 169920 log ( 2 μ X ) C_g=169920\log(2\mu_X) C g = 169920 log ( 2 μ X ) . For every d ′ ≤ D = ⌊ 4 μ X Σ X / n 2 ⌋ d'\le D=\lfloor4\mu_X\Sigma_X/n^2\rfloor d ′ ≤ D = ⌊ 4 μ X Σ X / n 2 ⌋ compute the exact class counts r d ′ ( c ) r_{d'}(c) r d ′ ( c ) from the arcs a / d ′ a/d' a / d ′ . Then t t t is a subset sum if and only if r d ′ ( t m o d d ′ ) > 0 r_{d'}(t\bmod d')>0 r d ′ ( t mod d ′ ) > 0 for every d ′ ≤ D d'\le D d ′ ≤ D .
Proof. Necessity is clear. By [BW, Theorems 4.1 and 4.3] there is d ≤ 4 μ X Σ X / n 2 d\le4\mu_X\Sigma_X/n^2 d ≤ 4 μ X Σ X / n 2 with t ∈ S X t\in\mathcal{S}_X t ∈ S X if and only if t m o d d ∈ S X m o d d t\bmod d\in\mathcal{S}_X\bmod d t mod d ∈ S X mod d . For t > Σ X / 2 t>\Sigma_X/2 t > Σ X /2 use complements.
The decider costs O ( n D 2 ) = O ( n 3 ) O(nD^2)=O(n^3) O ( n D 2 ) = O ( n 3 ) operations, against O ~ ( n ) \widetilde{O}(n) O ( n ) for [BW]: it is simple and exact, not faster. [BW]’s almost divisors may have up to α μ X Σ X / n 2 \alpha\mu_X\Sigma_X/n^2 α μ X Σ X / n 2 non-divisible elements, far more than log 2 d \log_2d log 2 d , so the reading is exact through the class counts, not through the size of the arc as in Lemma C(2).
Corollary C′′ (constructor on dense instances). Under the hypotheses of Corollary C′ a solution is constructed in O ( n ⋅ Σ X ) = O ( n 4 / ( C δ μ X ) ) O(n\cdot\Sigma_X)=O(n^4/(C_\delta\mu_X)) O ( n ⋅ Σ X ) = O ( n 4 / ( C δ μ X )) operations.
Proof. C δ C_\delta C δ -density means n 2 ≥ C δ μ X max X n^2\ge C_\delta\mu_X\max X n 2 ≥ C δ μ X max X [BW, Def. 3.1], so Σ X ≤ n ⋅ max X ≤ n 3 / ( C δ μ X ) \Sigma_X\le n\cdot\max X\le n^3/(C_\delta\mu_X) Σ X ≤ n ⋅ max X ≤ n 3 / ( C δ μ X ) , and the table of reachable sums over [ 0 , Σ X ] [0,\Sigma_X] [ 0 , Σ X ] , with backtracking, returns a subset of sum t t t .
The constructor does not use the arcs: on dense instances the sums are polynomially bounded. A constructor through the class counts alone, by self-reduction, would need the hypotheses of [BW] to persist along the descent.
Las Vegas on random instances
The algorithm already has one-sided failure: outputs are verified, failure is reported, and Theorem R′ makes it ≤ δ \le\delta ≤ δ at a cost × log ( 1 / δ ) \times\log(1/\delta) × log ( 1/ δ ) . A strict Las Vegas algorithm on random instances would always answer, falling back to meet-in-the-middle on all weights after r r r rounds, and this would be affordable if the per-round failure were p ≤ 2 − m / 2 p\le2^{-m/2} p ≤ 2 − m /2 . The measured tail is far below the Chebyshev bound. With M = 64 M=64 M = 64 and S E S_E S E at the centre, Pr ( Z = 0 ) = 0.0075 , 0.0011 , 1.2 ⋅ 10 − 4 \Pr(Z=0)=0.0075,0.0011,1.2\cdot10^{-4} Pr ( Z = 0 ) = 0.0075 , 0.0011 , 1.2 ⋅ 1 0 − 4 at λ = 6.7 , 12.7 , 24.4 \lambda=6.7,12.7,24.4 λ = 6.7 , 12.7 , 24.4 , roughly λ − 3 \lambda^{-3} λ − 3 ; the fourth moment is E ( Z / λ − 1 ) 4 ≈ ( 3.5 − 6.5 ) / λ 2 E(Z/\lambda-1)^4\approx(3.5-6.5)/\lambda^2 E ( Z / λ − 1 ) 4 ≈ ( 3.5 − 6.5 ) / λ 2 . A proved bound of this kind would suffice as soon as m ≥ ( 4 / 3 ) ( b + O ( log m ) ) m\ge(4/3)(b+O(\log m)) m ≥ ( 4/3 ) ( b + O ( log m )) . The tail is not Poisson (e − λ e^{-\lambda} e − λ would be 3 ⋅ 10 − 6 3\cdot10^{-6} 3 ⋅ 1 0 − 6 at λ = 12.7 \lambda=12.7 λ = 12.7 ), and it is not dominated by exact modular obstructions. Moments of fixed order around λ \lambda λ cannot give an exponential tail, since the relative variance has the floor κ c / m \kappa_c/m κ c / m of Proposition B′; the proof below goes through the Fourier integral instead.
Theorem LV (exponential tail of the endgame count). In the setting of Lemma B, with M = 2 b M = 2^b M = 2 b , ∣ s − m μ ∣ ≤ g σ m |s-m\mu| \le g\sigma\sqrt{m} ∣ s − m μ ∣ ≤ g σ m and ∣ u ∣ ≤ M |u| \le M ∣ u ∣ ≤ M , u ≡ s ( m o d 2 ) u \equiv s \pmod{2} u ≡ s ( mod 2 ) , there are m 0 m_0 m 0 and C g C_g C g such that for m ≥ m 0 m \ge m_0 m ≥ m 0
Pr ( Z ( u ) = 0 ∣ S E = s ) ≤ C g ( m 5 / 2 M 5 ρ m + 2 − 0.53 m ) , ρ = sup M ≥ 2 sup ∥ θ ∥ ≥ 1 2 M , ∥ θ − 1 2 ∥ ≥ 1 4 M E cos 4 ( π w θ ) ≤ 0.446. \Pr(Z(u)=0 \mid S_E=s) \le C_g\left(m^{5/2}M^5\rho^m+2^{-0.53m}\right), \qquad\rho=\sup_{M\ge2}\ \sup_{\lVert\theta\rVert\ge\frac{1}{2M},\ \lVert\theta-\frac{1}{2}\rVert\ge\frac{1}{4M}} \mathbb{E}\cos^4(\pi w\theta)\le0.446. Pr ( Z ( u ) = 0 ∣ S E = s ) ≤ C g ( m 5/2 M 5 ρ m + 2 − 0.53 m ) , ρ = M ≥ 2 sup ∥ θ ∥ ≥ 2 M 1 , ∥ θ − 2 1 ∥ ≥ 4 M 1 sup E cos 4 ( π w θ ) ≤ 0.446. The bound ρ ≤ 0.44495 \rho\le0.44495 ρ ≤ 0.44495 , uniformly in M ≥ 2 M \ge2 M ≥ 2 , is computer-assisted (lv_rate_certified.py); it enters the proof only through the last item.
Hence the per-round failure is at most 2 − m / 2 2^{-m/2} 2 − m /2 as soon as m ≥ 7.6 ( b + O ( log m ) ) m \ge7.6(b+O(\log m)) m ≥ 7.6 ( b + O ( log m )) , and the algorithm that falls back to meet-in-the-middle on all weights after the rounds is Las Vegas on random instances.
Proof. Put a = ( s + u ) / 2 a=(s+u)/2 a = ( s + u ) /2 and V = ∑ E w i 2 V=\sum_{E}w_i^2 V = ∑ E w i 2 . Write
Z ( u ) = ∫ 0 1 F ( θ ) e ( − a θ ) d θ = 2 m ∫ − 1 / 2 1 / 2 cos ( π u θ ) P ( θ ) d θ , P ( θ ) = ∏ i ∈ E cos ( π w i θ ) . Z(u)=\int_0^1 F(\theta)e(-a\theta)\,d\theta=2^m\int_{-1/2}^{1/2}\cos(\pi u\theta)P(\theta)\,d\theta,\qquad P(\theta)=\prod_{i\in E}\cos(\pi w_i\theta). Z ( u ) = ∫ 0 1 F ( θ ) e ( − a θ ) d θ = 2 m ∫ − 1/2 1/2 cos ( π u θ ) P ( θ ) d θ , P ( θ ) = i ∈ E ∏ cos ( π w i θ ) .
which holds because s ≡ u ( m o d 2 ) s\equiv u\pmod{2} s ≡ u ( mod 2 ) . The integrand is even. Split [ 0 , 1 2 ] [0,\frac{1}{2}] [ 0 , 2 1 ] into three parts:
the major arc [ 0 , 1 / ( 2 M ) ] [0,1/(2M)] [ 0 , 1/ ( 2 M )] ;
the rest B = [ 1 / ( 2 M ) , 1 2 − 1 / ( 4 M ) ] \mathcal{B}=[1/(2M),\frac{1}{2}-1/(4M)] B = [ 1/ ( 2 M ) , 2 1 − 1/ ( 4 M )] ;
the parity window [ 1 2 − 1 / ( 4 M ) , 1 2 ] [\frac{1}{2}-1/(4M),\frac{1}{2}] [ 2 1 − 1/ ( 4 M ) , 2 1 ] .
Put
λ 0 ( w ) = 2 m ( 2 π V ) 1 / 2 , λ min = 2 m ( 2 π m M 2 ) 1 / 2 . \lambda_0(w)=2^m\left(\frac{2}{\pi V}\right)^{1/2},\qquad\lambda_{\min}=2^m\left(\frac{2}{\pi mM^2}\right)^{1/2}. λ 0 ( w ) = 2 m ( π V 2 ) 1/2 , λ m i n = 2 m ( π m M 2 2 ) 1/2 .
Since V ≤ m M 2 V\le mM^2 V ≤ m M 2 , λ 0 ( w ) ≥ λ min \lambda_0(w)\ge\lambda_{\min} λ 0 ( w ) ≥ λ m i n .
Good weights. Let k 1 = # { i : w i > M / 2 } k_1=\#\{i:w_i>M/2\} k 1 = # { i : w i > M /2 } and j = # { i : w i odd } j=\#\{i:w_i\text{ odd}\} j = # { i : w i odd } , and let G = { k 1 ≥ m / 20 , j ≥ m / 20 } G=\{k_1\ge m/20,j\ge m/20\} G = { k 1 ≥ m /20 , j ≥ m /20 } . On G G G , V ≥ k 1 M 2 / 4 ≥ m M 2 / 80 V\ge k_1M^2/4\ge mM^2/80 V ≥ k 1 M 2 /4 ≥ m M 2 /80 .
Case M ≥ 4 M\ge4 M ≥ 4 . Write M = 2 M ′ M=2M' M = 2 M ′ and w i = M ′ b i + y i w_i=M'b_i+y_i w i = M ′ b i + y i , where b i = 1 [ w i > M / 2 ] b_i=1[w_i>M/2] b i = 1 [ w i > M /2 ] and y i y_i y i is uniform in { 1 , … , M ′ } \{1,\ldots,M'\} { 1 , … , M ′ } , independent of b i b_i b i . Given ( b i ) (b_i) ( b i ) , S E = M ′ k 1 + ∑ i y i S_E=M'k_1+\sum_i y_i S E = M ′ k 1 + ∑ i y i is a sum of m m m independent uniform variables on M ′ ≥ 2 M'\ge2 M ′ ≥ 2 values. By Lemma B0′, every value has probability at most 13 / ( σ ′ m ) 13/(\sigma'\sqrt{m}) 13/ ( σ ′ m ) , with σ ′ 2 = ( M ′ 2 − 1 ) / 12 {\sigma'}^2=(M'^2-1)/12 σ ′ 2 = ( M ′2 − 1 ) /12 . Hence
Pr ( k 1 < m / 20 , S E = s ) ≤ 2 − m # { b ∈ { 0 , 1 } m : 20 ∣ b ∣ < m } ⋅ 13 σ ′ m . \Pr(k_1<m/20,S_E=s)\le2^{-m}\#\{b\in\{0,1\}^m:20|b|<m\}\cdot\frac{13}{\sigma'\sqrt{m}}. Pr ( k 1 < m /20 , S E = s ) ≤ 2 − m # { b ∈ { 0 , 1 } m : 20∣ b ∣ < m } ⋅ σ ′ m 13 .
The same holds for j j j , with w i = 2 y i − 1 + p i w_i=2y_i-1+p_i w i = 2 y i − 1 + p i , where p i ∈ { 0 , 1 } p_i\in\{0,1\} p i ∈ { 0 , 1 } records the parity and y i y_i y i is uniform in { 1 , … , M ′ } \{1,\ldots,M'\} { 1 , … , M ′ } . Given ( p i ) (p_i) ( p i ) , S E = 2 ∑ i y i − # { i : p i = 0 } S_E=2\sum_i y_i-\#\{i:p_i=0\} S E = 2 ∑ i y i − # { i : p i = 0 } .
# { b ∈ { 0 , 1 } m : 20 ∣ b ∣ < m } ≤ ∑ b x m − 20 ∣ b ∣ = ( x ( 1 + x − 20 ) ) m ≤ ( 5 / 4 ) m \#\{b \in\{0,1\}^{m}: 20|b| < m\} \le\sum_b x^{m-20|b|} = \left(x(1+x^{-20})\right)^m \le(5/4)^m # { b ∈ { 0 , 1 } m : 20∣ b ∣ < m } ≤ b ∑ x m − 20∣ b ∣ = ( x ( 1 + x − 20 ) ) m ≤ ( 5/4 ) m
So each of the two events has probability at most ( 5 / 8 ) m ⋅ 13 / ( σ ′ m ) (5/8)^m \cdot13/(\sigma'\sqrt{m}) ( 5/8 ) m ⋅ 13/ ( σ ′ m ) .
Dividing by Pr ( S E = s ) \Pr(S_E=s) Pr ( S E = s ) . In the window, Pr ( S E = s ) ≥ e − g 2 / 2 / ( 2 2 π σ m ) \Pr(S_E=s) \ge e^{-g^2/2}/(2\sqrt{2\pi}\sigma\sqrt{m}) Pr ( S E = s ) ≥ e − g 2 /2 / ( 2 2 π σ m ) once 17 2 π e g 2 / 2 / m ≤ 1 / 2 17\sqrt{2\pi}e^{g^2/2}/m \le1/2 17 2 π e g 2 /2 / m ≤ 1/2 , by Lemma B0′. Also σ ≤ 3 σ ′ \sigma\le3\sigma' σ ≤ 3 σ ′ . Hence
Pr ( G c ∣ S E = s ) ≤ 156 2 π e g 2 / 2 ( 5 / 8 ) m ≤ 156 2 π e g 2 / 2 2 − 0.53 m , \Pr(G^{\mathrm{c}}\mid S_E=s) \le156\sqrt{2\pi}e^{g^2/2}(5/8)^m \le156\sqrt{2\pi}e^{g^2/2}2^{-0.53m}, Pr ( G c ∣ S E = s ) ≤ 156 2 π e g 2 /2 ( 5/8 ) m ≤ 156 2 π e g 2 /2 2 − 0.53 m ,
because 5 / 8 ≤ 2 − 0.53 5/8 \le2^{-0.53} 5/8 ≤ 2 − 0.53 .
Case M = 2 M=2 M = 2 . Each w i w_i w i is 1 or 2, so S E + j = 2 m S_E+j=2m S E + j = 2 m . In the window, s ≤ 3 m / 2 + g m / 2 s \le3m/2+g\sqrt{m}/2 s ≤ 3 m /2 + g m /2 , so j ≥ m / 4 ≥ m / 20 j \ge m/4 \ge m/20 j ≥ m /4 ≥ m /20 once m ≥ 4 g 2 m \ge4g^2 m ≥ 4 g 2 . Also k 1 = m − j = s − m ≥ m / 2 − g m / 2 ≥ m / 4 k_1=m-j=s-m \ge m/2-g\sqrt{m}/2 \ge m/4 k 1 = m − j = s − m ≥ m /2 − g m /2 ≥ m /4 , and V ≥ m = m M 2 / 4 V \ge m=mM^2/4 V ≥ m = m M 2 /4 . So G G G holds on every instance with S E = s S_E=s S E = s , and Pr ( G c ∣ S E = s ) = 0 \Pr(G^{\mathrm{c}}\mid S_E=s)=0 Pr ( G c ∣ S E = s ) = 0 .
∣ g ( θ ) − P ( θ ) ∣ ≤ π 4 θ 4 4 ∑ i w i 4 ⋅ g ( θ ) . |g(\theta)-P(\theta)|\le\frac{\pi^4\theta^4}{4}\sum_i w_i^4\cdot g(\theta). ∣ g ( θ ) − P ( θ ) ∣ ≤ 4 π 4 θ 4 i ∑ w i 4 ⋅ g ( θ ) .
On 1 / ( π M ) ≤ θ ≤ 1 / ( 2 M ) 1/(\pi M)\le\theta\le1/(2M) 1/ ( π M ) ≤ θ ≤ 1/ ( 2 M ) , ∣ x i ∣ ≤ π / 2 |x_i|\le\pi/2 ∣ x i ∣ ≤ π /2 and 0 ≤ P ≤ g 0\le P\le g 0 ≤ P ≤ g . Here cos x ≤ e − x 2 / 2 \cos x\le e^{-x^2/2} cos x ≤ e − x 2 /2 holds for ∣ x ∣ ≤ 2 |x|\le2 ∣ x ∣ ≤ 2 , from Taylor’s bound for ∣ x ∣ ≤ 1 |x|\le1 ∣ x ∣ ≤ 1 and cos x = 2 cos 2 ( x / 2 ) − 1 \cos x=2\cos^2(x/2)-1 cos x = 2 cos 2 ( x /2 ) − 1 .
We compare with Gaussian integrals rather than with λ ( w ) \lambda(w) λ ( w ) . Use cos ( π u θ ) ≥ 1 − π 2 u 2 θ 2 / 2 \cos(\pi u\theta)\ge1-\pi^2u^2\theta^2/2 cos ( π u θ ) ≥ 1 − π 2 u 2 θ 2 /2 , ∫ 0 ∞ θ 2 g = ( 2 π 2 V ) − 1 ∫ 0 ∞ g \int_0^\infty\theta^2g=(2\pi^2V)^{-1}\int_0^\infty g ∫ 0 ∞ θ 2 g = ( 2 π 2 V ) − 1 ∫ 0 ∞ g , ∫ 0 ∞ θ 4 g = 3 ( π 2 V ) − 2 ∫ 0 ∞ g \int_0^\infty\theta^4g=3(\pi^2V)^{-2}\int_0^\infty g ∫ 0 ∞ θ 4 g = 3 ( π 2 V ) − 2 ∫ 0 ∞ g , and ∫ θ 0 ∞ g ≤ g ( θ 0 ) / ( π 2 V θ 0 ) \int_{\theta_0}^\infty g\le g(\theta_0)/(\pi^2V\theta_0) ∫ θ 0 ∞ g ≤ g ( θ 0 ) / ( π 2 V θ 0 ) . With θ 0 = 1 / ( π M ) \theta_0=1/(\pi M) θ 0 = 1/ ( π M ) this gives
2 m + 1 ∫ 0 1 / ( 2 M ) cos ( π u θ ) P ( θ ) d θ ≥ λ 0 ( w ) ( 1 − u 2 2 V − 3 ∑ i w i 4 4 V 2 − η 3 ) , η 3 = 3 2 e − V / ( 2 M 2 ) π V / M 2 2^{m+1}\int_0^{1/(2M)}\cos(\pi u\theta)P(\theta)\,d\theta
\ge\lambda_0(w)\left(1-\frac{u^2}{2V}-\frac{3\sum_i w_i^4}{4V^2}-\eta_3\right),\qquad
\eta_3=\frac{3\sqrt{2}e^{-V/(2M^2)}}{\sqrt{\pi V/M^2}} 2 m + 1 ∫ 0 1/ ( 2 M ) cos ( π u θ ) P ( θ ) d θ ≥ λ 0 ( w ) ( 1 − 2 V u 2 − 4 V 2 3 ∑ i w i 4 − η 3 ) , η 3 = π V / M 2 3 2 e − V / ( 2 M 2 )
On G G G , u 2 ≤ M 2 u^2\le M^2 u 2 ≤ M 2 and V ≥ m M 2 / 80 V\ge mM^2/80 V ≥ m M 2 /80 , so u 2 / ( 2 V ) ≤ 40 / m u^2/(2V)\le40/m u 2 / ( 2 V ) ≤ 40/ m . Also ∑ w i 4 ≤ M 2 V \sum w_i^4\le M^2V ∑ w i 4 ≤ M 2 V , so 3 ∑ w i 4 / ( 4 V 2 ) ≤ 60 / m 3\sum w_i^4/(4V^2)\le60/m 3 ∑ w i 4 / ( 4 V 2 ) ≤ 60/ m . Since V / M 2 ≥ m / 80 V/M^2\ge m/80 V / M 2 ≥ m /80 and e − t / 2 ≤ 2 / t e^{-t/2}\le2/t e − t /2 ≤ 2/ t , η 3 ≤ 6 2 ⋅ M 2 / V ≤ 480 2 / m \eta_3\le6\sqrt{2}\cdot M^2/V\le480\sqrt{2}/m η 3 ≤ 6 2 ⋅ M 2 / V ≤ 480 2 / m .
For m ≥ 12000 m\ge12000 m ≥ 12000 the bracket is ≥ 3 / 4 \ge3/4 ≥ 3/4 . So the major arc, counted on both sides of 0, is at least ( 3 / 4 ) λ 0 ( w ) ≥ ( 3 / 4 ) λ min (3/4)\lambda_0(w)\ge(3/4)\lambda_{\min} ( 3/4 ) λ 0 ( w ) ≥ ( 3/4 ) λ m i n .
Parity window, on $G. For w w w even, ∣ cos ( π w ( 1 / 2 − δ ) ) ∣ ≤ 1 |\cos(\pi w(1/2-\delta))|\le1 ∣ cos ( π w ( 1/2 − δ )) ∣ ≤ 1 . For w w w odd it equals ∣ sin ( π w δ ) ∣ ≤ sin ( π / 4 ) |\sin(\pi w\delta)|\le\sin(\pi/4) ∣ sin ( π w δ ) ∣ ≤ sin ( π /4 ) , since $0\le w\delta\le 1/4$. So ∣ P ∣ ≤ 2 − j / 2 ≤ 2 − m / 40 |P|\le2^{-j/2}\le2^{-m/40} ∣ P ∣ ≤ 2 − j /2 ≤ 2 − m /40 on a window of total length 1 / ( 2 M ) 1/(2M) 1/ ( 2 M ) . The window therefore contributes at most
2 m 2 − j / 2 / ( 2 M ) ≤ λ min / 4. 2^{m}2^{-j/2}/(2M) \le\lambda_{\min}/4. 2 m 2 − j /2 / ( 2 M ) ≤ λ m i n /4.
This holds as soon as 2 j ≥ 2 π m 2^j \ge2\pi m 2 j ≥ 2 π m . Since m ≤ 20 j m \le20j m ≤ 20 j , it follows from 40 π j ≤ 2 j 40\pi j \le2^j 40 π j ≤ 2 j , which is true for j ≥ 12 j \ge12 j ≥ 12 .
Pr ( 2 m + 1 R ( w ) ≥ λ min / 4 ) ≤ ρ m / 16 ( λ min / 2 m + 3 ) 4 = 64 π 2 m 2 M 4 ρ m . \Pr\left(2^{m+1}R(w) \ge\lambda_{\min}/4\right) \le\frac{\rho^m/16}{(\lambda_{\min}/2^{m+3})^4}=64\pi^2m^2M^4\rho^m. Pr ( 2 m + 1 R ( w ) ≥ λ m i n /4 ) ≤ ( λ m i n / 2 m + 3 ) 4 ρ m /16 = 64 π 2 m 2 M 4 ρ m .
Dividing by Pr ( S E = s ) ≥ e − g 2 / 2 / ( 2 2 π σ m ) \Pr(S_E=s)\ge e^{-g^2/2}/(2\sqrt{2\pi}\sigma\sqrt{m}) Pr ( S E = s ) ≥ e − g 2 /2 / ( 2 2 π σ m ) , and using σ ≤ M \sigma\le M σ ≤ M , gives at most 128 π 2 2 π e g 2 / 2 m 5 / 2 M 5 ρ m 128\pi^2\sqrt{2\pi}e^{g^2/2}m^{5/2}M^5\rho^m 128 π 2 2 π e g 2 /2 m 5/2 M 5 ρ m conditionally.
On G G G , and outside the event of the last item, we get
Z ( u ) ≥ 3 4 λ 0 ( w ) − 1 4 λ min − 2 m + 1 R ( w ) > ( 3 4 − 1 4 − 1 4 ) λ min > 0. Z(u) \ge\frac{3}{4}\lambda_0(w)-\frac{1}{4}\lambda_{\min}-2^{m+1}R(w) > \left(\frac{3}{4}-\frac{1}{4}-\frac{1}{4}\right)\lambda_{\min}>0. Z ( u ) ≥ 4 3 λ 0 ( w ) − 4 1 λ m i n − 2 m + 1 R ( w ) > ( 4 3 − 4 1 − 4 1 ) λ m i n > 0.
Hence, for m ≥ max ( 12000 , 4 g 2 , 34 2 π e g 2 / 2 ) m\ge\max(12000,4g^2,34\sqrt{2\pi}e^{g^2/2}) m ≥ max ( 12000 , 4 g 2 , 34 2 π e g 2 /2 ) ,
Pr ( Z ( u ) = 0 ∣ S E = s ) ≤ 2 2 π e g 2 / 2 ( 78 + 64 π 2 ) ( m 5 / 2 M 5 ρ m + 2 − 0.53 m ) . \Pr(Z(u)=0\mid S_E=s)\le2\sqrt{2\pi}e^{g^2/2}(78+64\pi^2)\left(m^{5/2}M^5\rho^m+2^{-0.53m}\right). Pr ( Z ( u ) = 0 ∣ S E = s ) ≤ 2 2 π e g 2 /2 ( 78 + 64 π 2 ) ( m 5/2 M 5 ρ m + 2 − 0.53 m ) .
The rate follows from 0.44619 ≤ 2 − 22 0.44619\le2^{-22} 0.44619 ≤ 2 − 22 : the per-round failure is at most 2 − m / 2 2^{-m/2} 2 − m /2 as soon as m ≥ 7.6 ( b + log 2 m ) m\ge7.6(b+\log_2m) m ≥ 7.6 ( b + log 2 m ) and m ≥ m 0 m\ge m_0 m ≥ m 0 . □
The constant 7.6 7.6 7.6 is far from the 4 / 3 4/3 4/3 that the measured tail λ − 3 \lambda^{-3} λ − 3 would give: the proof spends the factor M 5 M^5 M 5 to turn a fourth moment into a tail. Theorem R″ below keeps the one-sided failure with a per-round success probability at least ( 1 − o ( 1 ) ) / ( 6 ln m M ) (1-o(1))/(6\ln mM) ( 1 − o ( 1 )) / ( 6 ln m M ) , at a much smaller block.
The filtered endgame: Theorem R″
Setting.
It is that of Lemma B: a block E E E of m m m indices fixed in advance, with weights independent and uniform in { 1 , … , M } \{1,\ldots,M\} { 1 , … , M } .
A search scheme is a family P \mathcal{P} P of ordered pairs ( y , z ) (y,z) ( y , z ) of disjoint subsets of E E E , fixed in advance. The endgame of § 7.6 uses P 1 = { ( x ∩ A , x ∩ B ) : x ⊆ E } \mathcal{P}_1=\{(x\cap A,x\cap B):x\subseteq E\} P 1 = {( x ∩ A , x ∩ B ) : x ⊆ E } for fixed halves A A A , B B B with ∣ A ∣ = h = ⌊ m / 2 ⌋ |A|=h=\lfloor m/2\rfloor ∣ A ∣ = h = ⌊ m /2 ⌋ .
Put
N = # { ( y , z ) ∈ P : S y + S z = a } , Z r = # { ( y , z ) ∈ P : S y + S z = a , S y = r ( m o d P ) } , Y P = ∑ r Z r 2 . N=\#\{(y,z)\in\mathcal{P}:S_y+S_z=a\},\qquad Z_r=\#\{(y,z)\in\mathcal{P}:S_y+S_z=a,\ S_y=r\pmod{P}\},\qquad Y_P=\sum_r Z_r^2. N = # {( y , z ) ∈ P : S y + S z = a } , Z r = # {( y , z ) ∈ P : S y + S z = a , S y = r ( mod P )} , Y P = r ∑ Z r 2 .
For P 1 \mathcal{P}_1 P 1 , N = Z ( u ) N=Z(u) N = Z ( u ) of Lemma B. A round draws r r r uniformly in Z / P \mathbb{Z}/P Z / P , given the weights and P P P , and succeeds if and only if Z r > 0 Z_r>0 Z r > 0 .
Lemma J (averaging over the residues). For every finitely supported law of the weights and of P P P ,
Pr ( round succeeds ) ≥ ( E N ) 2 E [ P ⋅ Y P ] . \Pr(\text{round succeeds})\ge\frac{(\mathbb{E}N)^2}{\mathbb{E}[P\cdot Y_P]}. Pr ( round succeeds ) ≥ E [ P ⋅ Y P ] ( E N ) 2 .
Proof.
By Cauchy–Schwarz, N = ∑ r ∈ R P Z r ≤ ∣ R P ∣ 1 / 2 Y P 1 / 2 N=\sum_{r\in R_P}Z_r\le|R_P|^{1/2}Y_P^{1/2} N = ∑ r ∈ R P Z r ≤ ∣ R P ∣ 1/2 Y P 1/2 . Hence ∣ R P ∣ / P ≥ N 2 / ( P ⋅ Y P ) |R_P|/P\ge N^2/(P\cdot Y_P) ∣ R P ∣/ P ≥ N 2 / ( P ⋅ Y P ) , with 0 / 0 = 0 0/0=0 0/0 = 0 , since N = 0 N=0 N = 0 if and only if Y P = 0 Y_P=0 Y P = 0 .
The function ( z , t ) ↦ z 2 / t (z,t)\mapsto z^2/t ( z , t ) ↦ z 2 / t on t > 0 t>0 t > 0 , extended by 0 0 0 at ( 0 , 0 ) (0,0) ( 0 , 0 ) and by + ∞ +\infty + ∞ elsewhere on t = 0 t=0 t = 0 , is convex and lower semicontinuous: it is the closure of the perspective of z 2 z^2 z 2 .
The lemma uses nothing about the scheme or the weights.
Lemma K (a random prime). Let P P P be uniform among the primes of [ P 0 , 2 P 0 ) [P_0,2P_0) [ P 0 , 2 P 0 ) , with P 0 ≥ 100 P_0\ge100 P 0 ≥ 100 and P P P independent of the weights. For every integer Δ ≠ 0 \Delta\ne0 Δ = 0 with ∣ Δ ∣ ≤ X |\Delta|\le X ∣Δ∣ ≤ X ,
E [ P ⋅ 1 [ P ∣ Δ ] ] ≤ 6 ln X . \mathbb{E}[P\cdot1[P\mid\Delta]]\le6\ln X. E [ P ⋅ 1 [ P ∣ Δ ]] ≤ 6 ln X .
Proof.
From π ( y ) > y / ln y \pi(y)>y/\ln y π ( y ) > y / ln y for y ≥ 17 y\ge17 y ≥ 17 and π ( y ) < 1.25506 ⋅ y / ln y \pi(y)<1.25506\cdot y/\ln y π ( y ) < 1.25506 ⋅ y / ln y [RoS] it follows that π ( 2 P 0 ) − π ( P 0 ) ≥ P 0 / ( 3 ln P 0 ) \pi(2P_0)-\pi(P_0)\ge P_0/(3\ln P_0) π ( 2 P 0 ) − π ( P 0 ) ≥ P 0 / ( 3 ln P 0 ) for P 0 ≥ 100 P_0\ge100 P 0 ≥ 100 . The ratio is 0.483 0.483 0.483 at P 0 = 100 P_0=100 P 0 = 100 and increases; the inequality was also checked directly on [ 100 , 2 ⋅ 10 4 ] [100,2\cdot10^4] [ 100 , 2 ⋅ 1 0 4 ] and at 10 5 10^5 1 0 5 , 10 6 10^6 1 0 6 and 10 7 10^7 1 0 7 .
Proposition K′. Let D e q = E # { ( τ , τ ′ ) ∈ P 2 , τ ≠ τ ′ , both hitting a , S y = S y ′ } D_{\mathrm{eq}}=\mathbb{E}\#\{(\tau,\tau')\in\mathcal{P}^2,\ \tau\ne\tau',\text{ both hitting }a,\ S_y=S_{y'}\} D eq = E # {( τ , τ ′ ) ∈ P 2 , τ = τ ′ , both hitting a , S y = S y ′ } . Then
E [ P ⋅ Y P ] ≤ 2 P 0 ( E N + D e q ) + 6 ln ( m M ) ( E N ) 2 , \mathbb{E}[P\cdot Y_P]\le2P_0(\mathbb{E}N+D_{\mathrm{eq}})+6\ln(mM)(\mathbb{E}N)^2, E [ P ⋅ Y P ] ≤ 2 P 0 ( E N + D eq ) + 6 ln ( m M ) ( E N ) 2 , and hence
Pr ( round succeeds ) ≥ [ 2 P 0 E N ( 1 + D e q E N ) + 6 ln ( m M ) E N 2 ( E N ) 2 ] − 1 . \Pr(\text{round succeeds}) \ge\left[\frac{2P_0}{EN}\left(1+\frac{D_{\mathrm{eq}}}{EN}\right)+6\ln(mM)\frac{EN^2}{(EN)^2}\right]^{-1}. Pr ( round succeeds ) ≥ [ E N 2 P 0 ( 1 + E N D eq ) + 6 ln ( m M ) ( E N ) 2 E N 2 ] − 1 .
Proof.
Lemma V (equal half-sums). For P 1 \mathcal{P}_1 P 1 , let ψ = 2 m / 2 / M \psi=2^{m/2}/M ψ = 2 m /2 / M . Uniformly in M ≥ 2 M\ge2 M ≥ 2 and in the window, for m ≥ m 0 ( g ) m\ge m_0(g) m ≥ m 0 ( g ) ,
D e q λ ≤ 0.72 e g 2 / 2 m ( 3 ψ + ψ 2 ) ( 1 + O ( m − 1 / 5 ) ) , λ = E [ Z ( u ) ∣ S E = s ] . \frac{D_{\mathrm{eq}}}{\lambda}\le0.72e^{g^2/2}m(3\psi+\psi^2)\left(1+O(m^{-1/5})\right),\qquad\lambda=E[Z(u)\mid S_E=s]. λ D eq ≤ 0.72 e g 2 /2 m ( 3 ψ + ψ 2 ) ( 1 + O ( m − 1/5 ) ) , λ = E [ Z ( u ) ∣ S E = s ] .
Proof. Three facts are used.
(T2) Let X 1 , … , X K X_1,\ldots,X_K X 1 , … , X K be the sums of disjoint classes, and Λ \Lambda Λ an integer d × K d\times K d × K matrix whose columns at d d d non-empty classes form a non-singular submatrix. Then Pr ( Λ X = b ) ≤ ∏ t max v Pr ( X j t = v ) \Pr(\Lambda X=b)\le\prod_t\max_v\Pr(X_{j_t}=v) Pr ( Λ X = b ) ≤ ∏ t max v Pr ( X j t = v ) : given the other sums, at most one vector of pivot sums solves the system.
A pair ( x , x ′ ) (x,x') ( x , x ′ ) splits E E E into 8 classes, by membership in x x x and x ′ x' x ′ (patterns 11, 10, 01, 00) and by side. The event is { S x = a , S x ′ = a , S x A = S x A ′ , S E = s } \{S_x=a,S_{x'}=a,S_{x_A}=S_{x'_A},S_E=s\} { S x = a , S x ′ = a , S x A = S x A ′ , S E = s } . Since the weights are ≥ 1 \ge1 ≥ 1 , two classes required to have equal sums cannot have exactly one of them empty.
Otherwise x ′ = E ∖ x x' = E \setminus x x ′ = E ∖ x , which is possible only for u = 0 u = 0 u = 0 . Then S E = s S_E = s S E = s follows from S x = a S_x = a S x = a , and the pivots ( 10 A , 10 B , 01 A ) (10_A,10_B,01_A) ( 1 0 A , 1 0 B , 0 1 A ) have determinant 1: probability ≤ M − 3 \le M^{-3} ≤ M − 3 , at most 2 m 2^m 2 m pairs.
Summing. D e q ≤ [ ( 2 2 m − h + 2 m + h + 2 m ) M − 3 + 4 m M − 4 ] / Pr ( S E = s ) D_{\mathrm{eq}} \le[(2^{2m-h} + 2^{m+h} + 2^m)M^{-3} + 4^mM^{-4}]/\Pr(S_E = s) D eq ≤ [( 2 2 m − h + 2 m + h + 2 m ) M − 3 + 4 m M − 4 ] / Pr ( S E = s ) . By Lemma B(1), λ = λ m ( 1 + O ( m − 1 / 5 ) ) \lambda= \lambda_m(1 + O(m^{-1/5})) λ = λ m ( 1 + O ( m − 1/5 )) with λ m = 2 m + 1 / ( M 2 π m c M ) \lambda_m = 2^{m+1}/(M\sqrt{2\pi m c_M}) λ m = 2 m + 1 / ( M 2 π m c M ) and c M ≤ 5 / 8 c_M \le5/8 c M ≤ 5/8 . With (T3) and σ < M / 12 \sigma< M/\sqrt{12} σ < M / 12 ,
D e q λ ≤ ( 1 + O ( m − 1 / 5 ) ) 2 π c M 2 12 c 1 m [ 2 m − h + 2 h + 1 M + 2 m M 2 ] . \frac{D_{\mathrm{eq}}}{\lambda} \le(1 + O(m^{-1/5})) \frac{\sqrt{2\pi c_M}}{2\sqrt{12}c_1} m \left[\frac{2^{m-h} + 2^h + 1}{M} + \frac{2^m}{M^2}\right]. λ D eq ≤ ( 1 + O ( m − 1/5 )) 2 12 c 1 2 π c M m [ M 2 m − h + 2 h + 1 + M 2 2 m ] .
Finally 2 m − h + 2 h + 1 ≤ 3 ⋅ 2 m / 2 2^{m-h} + 2^h + 1 \le3 \cdot2^{m/2} 2 m − h + 2 h + 1 ≤ 3 ⋅ 2 m /2 and 2 π ⋅ 5 / 8 ⋅ 2 π / ( 2 12 ) ≤ 0.72 \sqrt{2\pi}\cdot5/8\cdot\sqrt{2\pi}/(2\sqrt{12}) \le0.72 2 π ⋅ 5/8 ⋅ 2 π / ( 2 12 ) ≤ 0.72 . □
Theorem R′′ (filtered endgame). Take the setting of Theorem R′ with R R R disjoint blocks in place of r r r , so that ∣ T − S / 2 ∣ ≤ S G / 2 − R m M \lvert T - S/2\rvert\le S_G/2 - RmM ∣ T − S /2 ∣ ≤ S G /2 − R m M , and fix g ≥ 0 g \ge0 g ≥ 0 with 2 e − g 2 / 6 < 1 2e^{-g^2/6} < 1 2 e − g 2 /6 < 1 (say g = 3 g = 3 g = 3 ). In round j j j replace the meet-in-the-middle by the filtered endgame of § 7.6 on E j E_j E j . The prime P j P_j P j is uniform among the primes of [ P 0 , 2 P 0 ) [P_0,2P_0) [ P 0 , 2 P 0 ) , and r j r_j r j is uniform in Z / P j \mathbb{Z}/P_j Z / P j , both drawn independently of everything else. Assume P 0 ≥ 100 P_0 \ge100 P 0 ≥ 100 .
Then, given the weights of G G G and the block sums, the rounds fail independently. A round whose block sum lies in the window fails with probability at most 1 − p 1-p 1 − p , where
p = [ 2 P 0 λ m ( 1 + 0.72 e g 2 / 2 m ( 3 ψ + ψ 2 ) ) + 6 ln ( m M ) ( 1 + 2 λ m + O ( m − 1 / 5 ) ) ] − 1 ( 1 − O ( m − 1 / 5 ) ) . p = \left[\frac{2P_0}{\lambda_m}\left(1 + 0.72e^{g^2/2}m(3\psi+ \psi^2)\right) + 6\ln(mM)\left(1 + \frac{2}{\lambda_m} + O(m^{-1/5})\right)\right]^{-1}(1 - O(m^{-1/5})). p = [ λ m 2 P 0 ( 1 + 0.72 e g 2 /2 m ( 3 ψ + ψ 2 ) ) + 6 ln ( m M ) ( 1 + λ m 2 + O ( m − 1/5 ) ) ] − 1 ( 1 − O ( m − 1/5 )) .
The expected cost of a round is O ( m ⋅ 2 m / 4 + m ⋅ 2 m / 2 / P 0 ) O(m \cdot2^{m/4} + m \cdot2^{m/2}/P_0) O ( m ⋅ 2 m /4 + m ⋅ 2 m /2 / P 0 ) .
A round whose block sum leaves the window counts as failed; this happens with probability at most 2 e − g 2 / 6 2e^{-g^2/6} 2 e − g 2 /6 , independently across blocks.
Now choose P 0 = ⌊ λ m / 2 ⌋ P_0 = \lfloor\lambda_m/2\rfloor P 0 = ⌊ λ m /2 ⌋ and m m m the least positive integer with 2 m ≥ ( σ m ) 4 / 3 2^m \ge(\sigma\sqrt{m})^{4/3} 2 m ≥ ( σ m ) 4/3 (by minimality also 2 m ≤ 2 ( σ m ) 4 / 3 2^m \le2(\sigma\sqrt{m})^{4/3} 2 m ≤ 2 ( σ m ) 4/3 ), so m = ( 4 / 3 ) b + ( 2 / 3 ) log 2 b + O ( 1 ) m = (4/3)b + (2/3)\log_2 b + O(1) m = ( 4/3 ) b + ( 2/3 ) log 2 b + O ( 1 ) . Then:
with R = ⌈ ln ( 1 / δ ) / ( ( 1 − 2 e − g 2 / 6 ) ⋅ p ) ⌉ R = \lceil\ln(1/\delta)/((1 - 2e^{-g^2/6})\cdot p)\rceil R = ⌈ ln ( 1/ δ ) / (( 1 − 2 e − g 2 /6 ) ⋅ p )⌉ rounds, the probability that ∣ T − S / 2 ∣ ≤ S G / 2 − R m M \lvert T - S/2\rvert\le S_G/2 - RmM ∣ T − S /2 ∣ ≤ S G /2 − R m M and the algorithm fails is at most δ \delta δ , provided n ≥ ∣ G ∣ + R m n \ge\lvert G\rvert+ Rm n ≥ ∣ G ∣ + R m ;
Proof.
As in Theorem R′, the weights of G G G and the block sums determine the residual of every round. The internal configurations of the blocks are independent, each conditioned on its sum, and the filters are drawn independently, so the failures are conditionally independent.
In a round, Proposition K′ applies. By Lemma B, E N = λ = λ m ( 1 + O ( m − 1 / 5 ) ) \mathbb{E}N = \lambda= \lambda_m(1 + O(m^{-1/5})) E N = λ = λ m ( 1 + O ( m − 1/5 )) and E N 2 ≤ λ + λ ⋅ 1 [ u = 0 ] + λ 2 ( 1 + O ( m − 1 / 5 ) ) \mathbb{E}N^2 \le\lambda+ \lambda\cdot1[u = 0] + \lambda^2(1 + O(m^{-1/5})) E N 2 ≤ λ + λ ⋅ 1 [ u = 0 ] + λ 2 ( 1 + O ( m − 1/5 )) ; Lemma V bounds D e q D_{\mathrm{eq}} D eq . This gives p p p .
The filtered lists have expected size 2 ∣ A ∣ ⋅ E [ 1 / P ] 2^{|A|}\cdot\mathbb{E}[1/P] 2 ∣ A ∣ ⋅ E [ 1/ P ] and 2 ∣ B ∣ ⋅ E [ 1 / P ] 2^{|B|}\cdot\mathbb{E}[1/P] 2 ∣ B ∣ ⋅ E [ 1/ P ] , both O ( 2 m / 2 / P 0 ) O(2^{m/2}/P_0) O ( 2 m /2 / P 0 ) , since r r r is uniform given P P P . They are built from the lists of the quarters, of O ( 2 m / 4 ) O(2^{m/4}) O ( 2 m /4 ) elements, sorted by residue, and joined after sorting, which gives the cost per round.
With the stated m m m , 2 m / 4 ≍ ( σ m ) 1 / 3 2^{m/4} \asymp(\sigma\sqrt{m})^{1/3} 2 m /4 ≍ ( σ m ) 1/3 and 2 m / 2 / P 0 ≍ M m / 2 m / 2 ≍ ( σ m ) 1 / 3 2^{m/2}/P_0 \asymp M\sqrt{m}/2^{m/2} \asymp(\sigma\sqrt{m})^{1/3} 2 m /2 / P 0 ≍ M m / 2 m /2 ≍ ( σ m ) 1/3 . Also λ m ≍ M 1 / 3 m 1 / 6 ≥ 200 \lambda_m \asymp M^{1/3}m^{1/6} \ge200 λ m ≍ M 1/3 m 1/6 ≥ 200 for M M M large, and m ψ ≍ m 4 / 3 M − 1 / 3 → 0 m\psi\asymp m^{4/3}M^{-1/3} \to0 m ψ ≍ m 4/3 M − 1/3 → 0 .
The block sums of disjoint blocks are independent, and Lemma A needs no window. By Hoeffding each block sum lies in the window with probability at least 1 − 2 e − g 2 / 6 1-2e^{-g^2/6} 1 − 2 e − g 2 /6 , and then the round succeeds with probability at least p p p . The failure probability is therefore at most ( 1 − ( 1 − 2 e − g 2 / 6 ) p ) R ≤ δ (1-(1-2e^{-g^2/6})p)^R \le\delta ( 1 − ( 1 − 2 e − g 2 /6 ) p ) R ≤ δ .
Since g g g is fixed, Lemmas B and V apply with their fixed-g g g constants. In p p p , 6 ln ( m M ) ⋅ O ( m − 1 / 5 ) = o ( ln m M ) 6\ln(mM)\cdot O(m^{-1/5})=o(\ln mM) 6 ln ( m M ) ⋅ O ( m − 1/5 ) = o ( ln m M ) and e g 2 / 2 m ψ → 0 e^{g^2/2m\psi}\to0 e g 2 /2 m ψ → 0 , which gives p ≥ ( 1 − o ( 1 ) ) / ( 6 ln m M ) p\ge(1-o(1))/(6\ln mM) p ≥ ( 1 − o ( 1 )) / ( 6 ln m M ) . □
What is new, and what is not.
Theorem R″ adds a short proof for the filtered endgame as implemented in the theorem mode of § 7.6 , in the model of this paper; the practical solver, with its suffix block and repeated rounds, is outside it. Its constant 6 ln ( m M ) 6\ln(mM) 6 ln ( m M ) is the price of using no distributional input in the filter. In the runs of Table 9 the first round almost always succeeds. With P P P between λ / 2 \lambda/2 λ /2 and λ \lambda λ , between 1 and 2 survivors are expected (about 1.39 on average), and the Poisson value is about 0.75. Lemma J with the heuristic coincidence rate 1 / P 1/P 1/ P gives at least 2 / 3 2/3 2/3 at P = P 0 P=P_0 P = P 0 .
Representations. Lemma J and Proposition K′ hold for any scheme, in particular for the representation schemes of [HGJ; BCJ]. In our endgame the density is a free parameter, and part of the multiplicity that representations create at density one is already supplied by the λ \lambda λ solutions of the block. Representation methods can still beat 2 b / 3 2^{b/3} 2 b /3 : [BCJ] runs heuristically in 2 0.291 b 2^{0.291b} 2 0.291 b at density one. We do not use them here because no rigorous analysis of them exists in our model; supplying the moments of Proposition K′ for those schemes would be the way to obtain one.
Constraint propagation: structural collapse and convergence
The arcs read a set of weights through its quotients Z / q Z/q Z / q . Seen from far enough, this is one instance of a general mechanism: propagation of constraints on quotients and on reachable sets. The algorithm of § 7 is built from a few operations: a forward pass that computes reachable sets, residue counts on quotients, injections of decisions, a backward pass, and a final search. This section develops the general theory of these operations on an arbitrary network of constraints; §8 reads the algorithm of § 7 inside it.
The idea in one line. A network of constraints splits into two parts. The structural part (equalities with parity, functional definitions on a DAG) is solved in one pass, without search. The computational part (assertions, cycles, non-bijective constraints read backwards) needs iteration to a fixpoint, and that is where the whole cost lives.
The model
Variables V V V , domains W : V → P ( V a l ) W:V\to\mathcal{P}(\mathrm{Val}) W : V → P ( Val ) , order W ′ ⊑ W ⟺ ∀ v W ′ ( v ) ⊆ W ( v ) W'\sqsubseteq W\Longleftrightarrow\forall vW'(v)\subseteq W(v) W ′ ⊑ W ⟺ ∀ v W ′ ( v ) ⊆ W ( v ) . In the full state s = ( facts , domains , clusters ) s=(\text{facts},\text{domains},\text{clusters}) s = ( facts , domains , clusters ) the information order is s ⊑ s ′ ⟺ F ( s ) ⊆ F ( s ′ ) ∧ ∀ v D s ( v ) ⊆ D s ′ ( v ) s\sqsubseteq s'\Longleftrightarrow F(s)\subseteq F(s')\land\forall vD_s(v)\subseteq D_{s'}(v) s ⊑ s ′ ⟺ F ( s ) ⊆ F ( s ′ ) ∧ ∀ v D s ( v ) ⊆ D s ′ ( v ) .
Projection π v ( c , W ) = { a ∈ W ( v ) ∣ ∃ α ( α ( v ) = a ∧ c ( α ) ∧ ∀ u ∈ vars ( c ) α ( u ) ∈ W ( u ) } \pi_v(c,W)=\{a\in W(v)\mid\exists\alpha(\alpha(v)=a\land c(\alpha)\land\forall u\in\operatorname{vars}(c)\alpha(u)\in W(u)\} π v ( c , W ) = { a ∈ W ( v ) ∣ ∃ α ( α ( v ) = a ∧ c ( α ) ∧ ∀ u ∈ vars ( c ) α ( u ) ∈ W ( u )} ; filter T c ( W ) ( v ) = π v ( c , W ) T_c(W)(v)=\pi_v(c,W) T c ( W ) ( v ) = π v ( c , W ) ; support defect υ ( c , W ) = max v ∣ W ( v ) ∖ π v ( c , W ) ∣ / ∣ W ( v ) ∣ \upsilon(c,W)=\max_v |W(v)\setminus\pi_v(c,W)|/|W(v)| υ ( c , W ) = max v ∣ W ( v ) ∖ π v ( c , W ) ∣/∣ W ( v ) ∣ . (υ \upsilon υ is a different object from the omicron o ( W ) o(W) o ( W ) of the weights in §1–6, and the two are kept apart here.)
The structural part
Definition 7.1. T s t r u c t = Eval ∘ Par T_{\mathrm{struct}}=\operatorname{Eval}\circ\operatorname{Par} T struct = Eval ∘ Par , where:
Par is union-find with parity on C p a r C_{\mathrm{par}} C par [Tarjan]. Every variable is written x = r ⊕ b x x=r\oplus b_x x = r ⊕ b x with r r r the root of its class; there is one domain per class (a shared cell). The shared form is S = { W ∣ ∀ x ∼ y , W ( x ) = W ( y ) ⊕ ( b x ⊕ b y ) } \mathcal{S}=\{W\mid\forall x\sim y,W(x)=W(y)\oplus(b_x\oplus b_y)\} S = { W ∣ ∀ x ∼ y , W ( x ) = W ( y ) ⊕ ( b x ⊕ b y )} .
Eval is one pass over Def in a topological order of the parity classes (the graph of the definitions with the classes of Par contracted, assumed acyclic): W ( x ) ← W ( x ) ∩ f x ( ∏ u ∈ pred ( x ) W ( u ) ) W(x)\leftarrow W(x)\cap f_x(\prod_{u\in\operatorname{pred}(x)}W(u)) W ( x ) ← W ( x ) ∩ f x ( ∏ u ∈ pred ( x ) W ( u )) (forward image). A topological order of the variables alone is not enough (Remark 7.2).
Theorem 7.2 (structural collapse).
(a) T s t r u c t ∘ T s t r u c t = T s t r u c t T_{\mathrm{struct}}\circ T_{\mathrm{struct}}=T_{\mathrm{struct}} T struct ∘ T struct = T struct , and T s t r u c t ( W ) ∈ S T_{\mathrm{struct}}(W)\in\mathcal{S} T struct ( W ) ∈ S .
(b) For W ∈ S W\in\mathcal{S} W ∈ S closed under Eval, T s t r u c t ( W ) = W T_{\mathrm{struct}}(W)=W T struct ( W ) = W .
(c) Injection: if W ∈ S W\in\mathcal{S} W ∈ S and one variable is fixed, its parity class is updated in O ( 1 ) O(1) O ( 1 ) . If every input in I is fixed and no parity class contains two inputs, one pass of Eval leaves every domain with at most one value, in time O ( ∑ x cost ( f x ) ) O(\sum_x\operatorname{cost}(f_x)) O ( ∑ x cost ( f x )) . If moreover the network has a solution α \alpha α with α ( r ) \alpha(r) α ( r ) in the initial cell of every class, no domain becomes empty and every domain is exactly { α ( x ) } \{\alpha(x)\} { α ( x )} . Without such a solution a cell can become empty even when no class contains two inputs: two definitions may write one class inconsistently (x : = u x:=u x := u , y : = ¬ u y:=\neg u y := ¬ u with x = y x=y x = y ; Lean: Eval_blocks_counterexample). Two inputs in one class may also be fixed inconsistently. In both cases the conflict appears as an empty cell, in O ( 1 ) O(1) O ( 1 ) .
(d) For W ∈ S W\in\mathcal{S} W ∈ S closed under Eval, υ ( c , W ) = 0 \upsilon(c,W)=0 υ ( c , W ) = 0 for every c ∈ C p a r c\in C_{\mathrm{par}} c ∈ C par and every definition read forwards.
Proof. (a) On a parity class the intersection, with the bit applied, is the same for every member, and intersecting again changes nothing. In a topological order of the classes every class receives the images of parents whose classes are already final, so a second pass changes nothing. (b) Follows from (a). (c) An injection into S \mathcal{S} S intersects the cell of the class. With singleton inputs every image f x ( singletons ) f_x(\text{singletons}) f x ( singletons ) has at most one value, by induction on the topological order. A solution α \alpha α with α ( r ) \alpha(r) α ( r ) in every initial cell lies in every image and every intersection, so no cell becomes empty and each domain is { α ( x ) } \{\alpha(x)\} { α ( x )} . (d) In S \mathcal{S} S every value has support in the parity constraint; after Eval every value of x x x is an image of values of its parents. □
Scope. The collapse holds on the shared form, not for every W ′ ≥ T s t r u c t ( W 0 ) W' \ge T_{\mathrm{struct}}(W_0) W ′ ≥ T struct ( W 0 ) , and it covers equalities, parities (NOT, binary XOR) and functional definitions on the complete DAG.
Remark 7.2′ (the order of Eval). With x : = u x := u x := u , z : = w z := w z := w and the parity constraint u = z u = z u = z , the order x , z x, z x , z is topological on the variables, but the pass for z z z narrows the shared cell of u u u after x x x has read it, so a second pass changes x x x : T s t r u c t T_{\mathrm{struct}} T struct is not idempotent. Ordering the classes, not the variables, removes the problem (Lean: Tstruct_not_idem_counterexample).
Theorem 7.3 (information limit). Let S S S be the set of solutions. If fixing one variable v v v determines all the others, then ∣ S ∣ ≤ 2 |S| \le2 ∣ S ∣ ≤ 2 ; the same holds for every extension by auxiliary variables that preserves the projection onto V V V . With definitions and assertions only, solutions correspond injectively to inputs: ∣ S ∣ ≤ 2 ∣ I ∣ |S| \le2^{|I|} ∣ S ∣ ≤ 2 ∣ I ∣ (for Boolean Val).
Proof. If fixing v v v determines everything, s ↦ s v s \mapsto s_v s ↦ s v is injective on S S S . An extension S ′ S' S ′ projecting onto S S S has ∣ S ∣ ≤ ∣ S ′ ∣ ≤ 2 |S| \le|S'| \le2 ∣ S ∣ ≤ ∣ S ′ ∣ ≤ 2 . With definitions only, the inputs determine everything (Theorem 7.2 (c)). □
Reading. “Solve one, solve all” holds exactly on the components with a single free input. An auxiliary variable X X X built in the knowledge that the chain does not block is a certificate: checking it is forward propagation, finding it is search (the definition of NP). For Subset Sum, o ≤ 1 o \le1 o ≤ 1 (Lemma 2.1 ) is the case in which the certificate is built backwards in O ( n ) O(n) O ( n ) (§ 3 ).
The computational part
Theorem 7.4. Let V V V and Val be finite, and assume every T c T_c T c , c ∈ C c o m p ∪ D e f c \in\mathcal{C}_{\mathrm{comp}} \cup\mathrm{Def} c ∈ C comp ∪ Def (definitions also read backwards), is the generalized arc consistency filter.
(i) T c o m p T_{\mathrm{comp}} T comp is decreasing and monotone: T c o m p ( W ) ⊑ W T_{\mathrm{comp}}(W) \sqsubseteq W T comp ( W ) ⊑ W and W ⊑ W ′ → T c o m p ( W ) ⊑ T c o m p ( W ′ ) W \sqsubseteq W' \to T_{\mathrm{comp}}(W) \sqsubseteq T_{\mathrm{comp}}(W') W ⊑ W ′ → T comp ( W ) ⊑ T comp ( W ′ ) .
(ii) T c o m p ( W ) = W ⟺ ∀ c ν ( c , W ) = 0 T_{\mathrm{comp}}(W) = W \Longleftrightarrow\forall c\,\nu(c,W) = 0 T comp ( W ) = W ⟺ ∀ c ν ( c , W ) = 0 .
(iii) Let μ ( W ) = ∑ v ( ∣ W ( v ) ∣ − 1 ) \mu(W) = \sum_v (|W(v)| - 1) μ ( W ) = ∑ v ( ∣ W ( v ) ∣ − 1 ) , and let T f a i l T_{\mathrm{fail}} T fail be T c o m p T_{\mathrm{comp}} T comp with the state replaced by the failure state as soon as a domain becomes empty. If every domain of W W W is non-empty, then T f a i l m ( W ) = T f a i l μ ( W ) + 1 ( W ) T_{\mathrm{fail}}^m(W) = T_{\mathrm{fail}}^{\mu(W)+1}(W) T fail m ( W ) = T fail μ ( W ) + 1 ( W ) for every m ≥ μ ( W ) + 1 m \ge\mu(W) + 1 m ≥ μ ( W ) + 1 . μ ( W ) \mu(W) μ ( W ) rounds do not suffice in general: one variable with W = { 0 } W = \{0\} W = { 0 } and the assertion x = 1 x = 1 x = 1 has μ ( W ) = 0 \mu(W) = 0 μ ( W ) = 0 but T c o m p ( W ) ≠ W T_{\mathrm{comp}}(W) \ne W T comp ( W ) = W (Lean: Tcomp_bound_counterexample).
(iv) The limit W ∗ W^* W ∗ is the largest W ′ ⊑ W W' \sqsubseteq W W ′ ⊑ W with ν ( c , W ′ ) = 0 \nu(c,W') = 0 ν ( c , W ′ ) = 0 for every c c c , and it does not depend on the order of the filters (chaotic iteration [Apt]).
Proof. (i) Each filter shrinks domains, and projection is monotone. (ii) T c ( W ) = W ⟺ π v ( c , W ) = W ( v ) T_c(W) = W \Longleftrightarrow\pi_v(c,W) = W(v) T c ( W ) = W ⟺ π v ( c , W ) = W ( v ) . (iii) Each non-fixed step either decreases μ ∈ N \mu\in\mathbb{N} μ ∈ N or empties a domain, after which the state is absorbing. (iv) Every W ′ ⊑ W W' \sqsubseteq W W ′ ⊑ W fixed by all T c T_c T c stays below every iterate by monotonicity; the limit is fixed, hence it is the largest. □
Remark 7.5 (a natural bound that fails). A natural bound on the number of iterations is ∑ c ν ( c , W 0 ) ⋅ d \sum_c \nu(c,W_0) \cdot d ∑ c ν ( c , W 0 ) ⋅ d . It fails. Take the chain x 1 ≠ ⋯ ≠ x k x_1 \ne\cdots\ne x_k x 1 = ⋯ = x k with D ( x 1 ) = { 1 } D(x_1)=\{1\} D ( x 1 ) = { 1 } , D ( x i ) = { i − 1 , i } D(x_i)=\{i-1,i\} D ( x i ) = { i − 1 , i } . Then ∑ c υ ( c , W 0 ) ⋅ d = 1 \sum_c \upsilon(c,W_0)\cdot d=1 ∑ c υ ( c , W 0 ) ⋅ d = 1 , but k − 1 k-1 k − 1 iterations are needed in the worst order (simulated: k = 3 , 5 , 10 , 20 k=3,5,10,20 k = 3 , 5 , 10 , 20 give 2, 4, 9, 19). The initial defect does not see cascading prunings; the bound μ ( W ) \mu(W) μ ( W ) of Theorem 7.4 (iii) has the right order.
Factorization and algorithm
Theorem 7.6 (factorization). T = T c o m p ∘ T s t r u c t T=T_{\mathrm{comp}}\circ T_{\mathrm{struct}} T = T comp ∘ T struct .
Par costs O ( ∣ C p a r ∣ ⋅ α ( n ) ) O(|C_{\mathrm{par}}|\cdot\alpha(n)) O ( ∣ C par ∣ ⋅ α ( n )) with union-find; Eval costs one pass, O ( ∑ x cost ( f x ) ) O(\sum_x \operatorname{cost}(f_x)) O ( ∑ x cost ( f x )) .
Every injection costs O ( 1 ) O(1) O ( 1 ) on its class; with all inputs fixed, one pass of Eval.
T c o m p T_{\mathrm{comp}} T comp takes at most μ ( W ) + 1 \mu(W)+1 μ ( W ) + 1 steps and returns W ∗ W^* W ∗ , independent of order.
Algorithm.
Union-find with parity on C p a r C_{\mathrm{par}} C par .
Topological order of the parity classes of the definitions (complete DAG with the classes contracted, active arcs).
Injections: update the class, then Eval forwards.
AC-3-style worklist [Mackworth] on C c o m p C_{\mathrm{comp}} C comp and on the definitions read backwards, to the fixpoint.
Outcome: an empty domain means unsatisfiable; all singletons means a solution; otherwise the network is locally consistent and search over the free inputs is needed (at most 2 ∣ I ∣ 2^{|I|} 2 ∣ I ∣ branches, Theorem 7.3 ).
Definitional variables
The aim is to determine as much as possible in one pass: once one variable (or a few) is fixed, how many others follow without search. The tool is the definitional variable X : = f ( nodes ) X:=f(\text{nodes}) X := f ( nodes ) . It does not change the solutions, but it makes explicit a link that local propagation does not see.
Theorem 7.7. Let S S S be the set of solutions, with the values already fixed, and R A B = π A , B ( S ) R_{AB}=\pi_{A,B}(S) R A B = π A , B ( S ) . There is a definitional extension X X X such that fixing A A A determines B B B in one pass of T s t r u c t T_{\mathrm{struct}} T struct if and only if R A B R_{AB} R A B is functional, B = g ( A ) B=g(A) B = g ( A ) on S S S . A A A and B B B lie in the same class of Par if and only if g g g is a bijection.
Proof. (⇐ \Leftarrow ⇐ ) X : = g ( A ) X:=g(A) X := g ( A ) is a definition; the link B = X B=X B = X holds on every solution, so adding it is conservative; once A A A is fixed, Eval computes X X X and Par fixes B B B . (⇒ \Rightarrow ⇒ ) A definitional extension preserves the projection of the solutions: if two solutions have the same A A A and different B B B , no pass fixes B B B from A A A (Theorem 7.3 ). □
X X X does not create links; it makes them evaluable. If R A B R_{AB} R A B is not functional (for instance A ∨ B = 1 A\lor B=1 A ∨ B = 1 ), no X X X helps and search is needed.
Theorem 7.7 is the network form of implicit definability: Beth’s theorem turns implicit into explicit definability, Padoa’s method tests it, and Craig interpolation extracts X X X from a proof, in the vocabulary common to the two sides [Beth; Craig]. In model counting, definable variables are detected and eliminated in [LLM].
Algorithm Ext. Repeat until nothing changes:
Linear X X X (Gauss over GF(2)). Each XOR constraint, of any arity, and each known value is a row. The reduced form gives, for every pivot, X : = ⨁ ( free variables ) ⊕ b X := \bigoplus(\text{free variables}) \oplus b X := ⨁ ( free variables ) ⊕ b . Rows with one variable are determined values; rows with two variables are parity classes of Par.
Local X X X from definitions. With one input known, a definition becomes linear: and ( a , 1 ) ⇒ y = a \operatorname{and}(a,1) \Rightarrow y=a and ( a , 1 ) ⇒ y = a ; and ( a , 0 ) ⇒ y = 0 \operatorname{and}(a,0) \Rightarrow y=0 and ( a , 0 ) ⇒ y = 0 ; dually for or; ite ( 1 , a , b ) ⇒ y = a \operatorname{ite}(1,a,b) \Rightarrow y=a ite ( 1 , a , b ) ⇒ y = a ; ite ( c , a , a ) ⇒ y = a \operatorname{ite}(c,a,a) \Rightarrow y=a ite ( c , a , a ) ⇒ y = a ; not ( a ) ⇒ y = ¬ a \operatorname{not}(a) \Rightarrow y=\neg a not ( a ) ⇒ y = ¬ a . These rows go to step 1.
Arc consistency on the rest (definitions not yet linear, also read backwards). New values return to step 1.
Proposition 7.8 (soundness). Every value fixed by Ext holds in every solution. Proof. The rows of step 2 are implied by the definitions with the known input; Gauss and arc consistency are sound; induction on the rounds. □
Proposition 7.9 (completeness in the affine case). If the network has only XOR constraints, Ext determines exactly the forced variables, and for every pair ( A , B ) (A,B) ( A , B ) it fixes B B B from A A A if and only if R A B R_{AB} R A B is functional: Theorem 7.7 becomes a polynomial algorithm. Proof. The solutions form an affine subspace. x x x is forced ⟺ e x \Longleftrightarrow e_x ⟺ e x lies in the row space. In reduced form this happens ⟺ \Longleftrightarrow ⟺ some row equals e x e_x e x : the only row with pivot x x x must appear in the combination, and no other. □
This is the affine class of Schaefer’s dichotomy [Schaefer], and Gaussian elimination for XOR constraints is standard in SAT solving [SNC]. The point here is the reading: Gauss is the systematic construction of the X X X of Theorem 7.7 , and it moves every XOR constraint from the computational to the structural part.
Probing: non-local X X X . For each free variable A A A , run Ext with A = 0 A=0 A = 0 and with A = 1 A=1 A = 1 .
If one branch fails, A A A is forced to the other value.
If B B B is determined in both branches with the same value, B B B is forced.
If B B B is determined in both branches and follows A A A , add X X X : B = A ⊕ c B=A\oplus c B = A ⊕ c (a parity row).
The new rows return to Ext, and the procedure is repeated until nothing changes. One round costs 2 n 2n 2 n runs of Ext, which is polynomial. Probing (failed literals, equivalences by probing) is a known SAT preprocessing technique [LMS]; here it is read as a generator of definitional X X X .
Proposition 7.10 (soundness of probing). Every X X X found by probing holds on every solution. Proof. Every solution has A = 0 A=0 A = 0 or A = 1 A=1 A = 1 . By Proposition 7.8 the values found in a branch hold on every solution of that branch, so the relation between A A A and B B B that is recorded holds on all of them. □
Proposition 7.10′ (probing to depth ℓ \ell ℓ ). Let Probe 0 = Ext \operatorname{Probe}_0 = \operatorname{Ext} Probe 0 = Ext , and let Probe ℓ \operatorname{Probe}_{\ell} Probe ℓ run Probe ℓ − 1 \operatorname{Probe}_{\ell-1} Probe ℓ − 1 on the network with A = 0 A = 0 A = 0 and with A = 1 A = 1 A = 1 for every variable A A A , already fixed or not, record what probing records, and, when one branch fails, also adopt the values fixed in the other branch; repeat until nothing changes.
Then:
(a) every X X X found by Probe ℓ \operatorname{Probe}_{\ell} Probe ℓ holds on every solution;
(b) if each inner Probe ℓ − 1 \operatorname{Probe}_{\ell-1} Probe ℓ − 1 runs a single round, one round of Probe ℓ \operatorname{Probe}_{\ell} Probe ℓ costs at most ( 2 n ) ℓ (2n)^{\ell} ( 2 n ) ℓ runs of Ext \operatorname{Ext} Ext ;
(c) if some set B B B of at most ℓ \ell ℓ variables is a strong backdoor for Ext \operatorname{Ext} Ext [WGS] (for every assignment of B B B , Ext \operatorname{Ext} Ext either fails or returns a solution), then Probe ℓ \operatorname{Probe}_{\ell} Probe ℓ fails if and only if the network has no solution, and otherwise fixes every variable that is constant on the solutions.
Proof. (a) Induction on ℓ \ell ℓ : ℓ = 0 \ell= 0 ℓ = 0 is Proposition 7.8 , and the step is the argument of Proposition 7.10 with Probe ℓ − 1 \operatorname{Probe}_{\ell-1} Probe ℓ − 1 in place of Ext \operatorname{Ext} Ext ; a failed branch has no solutions, so the values of the other branch hold on all of them. (b) A round makes 2 n 2n 2 n calls of Probe ℓ − 1 \operatorname{Probe}_{\ell-1} Probe ℓ − 1 , each of one round by assumption. (c) Induction on ℓ \ell ℓ . For ℓ = 0 \ell= 0 ℓ = 0 , B = ∅ B = \varnothing B = ∅ and Ext \operatorname{Ext} Ext decides alone. For ℓ ≥ 1 \ell\ge1 ℓ ≥ 1 take A ∈ B A \in B A ∈ B ; in both branches B ∖ { A } B \setminus\{A\} B ∖ { A } is a strong backdoor of size at most ℓ − 1 \ell- 1 ℓ − 1 . If the network has no solution, neither branch has one, both fail by induction, and Probe ℓ \operatorname{Probe}_{\ell} Probe ℓ fails. Otherwise let X X X be constant, equal to c c c , on the solutions. A branch without solutions fails, and in a branch with solutions Probe ℓ − 1 \operatorname{Probe}_{\ell-1} Probe ℓ − 1 fixes X = c X = c X = c by induction; in either case Probe ℓ \operatorname{Probe}_{\ell} Probe ℓ records X = c X = c X = c . □
One-level probing cannot be complete in general (it would decide SAT in polynomial time); probing to depth ℓ \ell ℓ costs ( 2 n ) ℓ (2n)^{\ell} ( 2 n ) ℓ and is complete exactly up to backdoors of size ℓ \ell ℓ (Proposition 7.10 ′), and beyond them search remains. The three levels (Gauss, local linearization, probing) all produce correct definitional X X X , and none creates information that is not in the solutions (Theorem 7.7 ). The limit of what can be determined in one pass is exactly the functionality of R A B R_{AB} R A B , and the cost of reaching it is where the difficulty of the problem lives.
Convergence of the full operator
The propagation operator acts on states s = ( F , D , Cl ) s = (F,D,\operatorname{Cl}) s = ( F , D , Cl ) : facts, domains and clusters. The operator is K = Merge ∘ Unary ∘ Bridge ∘ LocalDed K = \operatorname{Merge} \circ\operatorname{Unary} \circ\operatorname{Bridge} \circ\operatorname{LocalDed} K = Merge ∘ Unary ∘ Bridge ∘ LocalDed :
LocalDed applies inference rules inside each cluster;
Bridge keeps a value of a variable only if some consistent assignment satisfies, together, all the constraints touching that variable (a filter stronger than arc consistency, close to a global solve on a complete graph);
Unary applies the unary constraints;
Merge merges clusters that share variables.
Its measure is ν ( s ) = ∣ Cl ( s ) ∣ + ∑ v ∣ D s ( v ) ∣ \nu(s) = |\operatorname{Cl}(s)| + \sum_v |D_s(v)| ν ( s ) = ∣ Cl ( s ) ∣ + ∑ v ∣ D s ( v ) ∣ .
Lemma 7.11.
L1: F ( K s ) = F ( s ) F(Ks) = F(s) F ( K s ) = F ( s ) . L2: D K s ( v ) ⊆ D s ( v ) D_{Ks}(v) \subseteq D_s(v) D K s ( v ) ⊆ D s ( v ) .
L3: Cl ( K s ) = Cl ( s ) \operatorname{Cl}(Ks) = \operatorname{Cl}(s) Cl ( K s ) = Cl ( s ) , or ∣ Cl ( K s ) ∣ < ∣ Cl ( s ) ∣ |\operatorname{Cl}(Ks)| < |\operatorname{Cl}(s)| ∣ Cl ( K s ) ∣ < ∣ Cl ( s ) ∣ . (By induction on the merging loop: a step without over-
laps returns the same clusters; with an overlap the count drops.)
Theorem 7.12 (termination). ∀ s 0 ∃ n ≤ ν ( s 0 ) ∀ m ≥ n K m ( s 0 ) = K n ( s 0 ) \forall s_0 \exists n \le\nu(s_0) \forall m \ge n K^m(s_0) = K^n(s_0) ∀ s 0 ∃ n ≤ ν ( s 0 ) ∀ m ≥ n K m ( s 0 ) = K n ( s 0 ) . Proof. By L4, as long as there is no fixpoint ν \nu ν drops strictly in N \mathbb{N} N ; from a fixpoint the sequence stays put, by induction. □
Theorem 7.13 (closure). With s ∗ = K n ( s 0 ) s^* = K^n(s_0) s ∗ = K n ( s 0 ) : Fix ( s ∗ ) ∧ s 0 ⪯ s ∗ ∧ ∀ s ′ ( Fix ( s ′ ) ∧ s 0 ⪯ s ′ → s ∗ ⪯ s ′ ) \operatorname{Fix}(s^*) \land s_0 \preceq s^* \land\forall s'(\operatorname{Fix}(s') \land s_0 \preceq s' \to s^* \preceq s') Fix ( s ∗ ) ∧ s 0 ⪯ s ∗ ∧ ∀ s ′ ( Fix ( s ′ ) ∧ s 0 ⪯ s ′ → s ∗ ⪯ s ′ ) . The fixpoint reached is the least informed among the fixpoints above s 0 s_0 s 0 : it invents nothing. Proof. By induction on k k k , K k ( s 0 ) ⪯ s ′ K^k(s_0) \preceq s' K k ( s 0 ) ⪯ s ′ using L5 and Fix ( s ′ ) \operatorname{Fix}(s') Fix ( s ′ ) ; with k = n k=n k = n , s ∗ ⪯ s ′ s^* \preceq s' s ∗ ⪯ s ′ .
Remark 7.14 (a maximality statement that fails). The natural statement that a maximal fixpoint is reached is false. With one domain { 0 , 1 } \{0,1\} { 0 , 1 } , no constraints and no facts, the state with domain { 0 } \{0\} { 0 } and fact ( t , g , 0 ) (t,g,0) ( t , g , 0 ) is a fixpoint above s ∗ s^* s ∗ , but not below it. The correct statement is the closure of Theorem 7.13.
Tests
All tests compare with brute force on small networks; scripts are listed in Data and code availability.
Table 18.
Scale (XOR constraints with a planted solution, 1% of the variables injected): n = 1000 n = 1000 n = 1000 , Ext determines 871 variables in 0.27 s against 16 for arc consistency; n = 2000 n = 2000 n = 2000 , 1705 in 1.3 s against 45. All values agree with the planted solution.
The Subset Sum algorithm as propagation
Model. Subset Sum is the network of §7.1 with inputs x i ∈ { 0 , 1 } x_i \in\{0,1\} x i ∈ { 0 , 1 } , definitions s 0 = 0 s_0 = 0 s 0 = 0 , s i : = s i − 1 + w i ⋅ x i s_i := s_{i-1} + w_i \cdot x_i s i := s i − 1 + w i ⋅ x i (a chain in the complete DAG), and the assertion s n = T s_n = T s n = T .
Proposition 8.1 (forward pass = Eval). The forward pass R i = R i − 1 ∪ ( R i − 1 + w i ) R_i = R_{i-1} \cup(R_{i-1} + w_i) R i = R i − 1 ∪ ( R i − 1 + w i ) of Remark 2.4 is exactly Eval on the chain: R i = W ( s i ) R_i = W(s_i) R i = W ( s i ) . Proof. Forward image of s i − 1 + w i ⋅ x i s_{i-1} + w_i \cdot x_i s i − 1 + w i ⋅ x i with x i ∈ { 0 , 1 } x_i \in\{0,1\} x i ∈ { 0 , 1 } .
Proposition 8.2 (one backward round suffices). After Eval, one round of the arc consistency filters from i = n i = n i = n down to 1 reaches the fixpoint W ∗ W^* W ∗ of T c o m p T_{\mathrm{comp}} T comp , and W ∗ ( s i ) W^*(s_i) W ∗ ( s i ) is exactly the set of values reachable from 0 and extendable to T T T . Hence the backward choice "take w i w_i w i if T − w i ∈ R i − 1 T - w_i \in R_{i-1} T − w i ∈ R i − 1 " never gets stuck.
Proof. Downward induction on i i i . If W ∗ ( s i ) W^*(s_i) W ∗ ( s i ) is the set of reachable and extendable values, the filter of constraint i i i leaves in s i − 1 s_{i-1} s i − 1 the v ∈ R i − 1 v \in R_{i-1} v ∈ R i − 1 with v ∈ W ∗ ( s i ) v \in W^*(s_i) v ∈ W ∗ ( s i ) or v + w i ∈ W ∗ ( s i ) v + w_i \in W^*(s_i) v + w i ∈ W ∗ ( s i ) , that is, the reachable and extendable ones. Constraint i i i touches nothing else, and the constraints already processed stay consistent.
This is a case of Freuder’s theorem on acyclic networks [Freuder]. The bound μ ( W ) \mu(W) μ ( W ) of Theorem 7.4(iii) is very pessimistic here: in the right order one round suffices, while in the unfavourable order up to about n n n rounds are needed, the same phenomenon as in Remark 7.5. The domains are unions of K i K_i K i intervals, so T = T c o m p ∘ T s t r u c t T = T_{\mathrm{comp}} \circ T_{\mathrm{struct}} T = T comp ∘ T struct costs O ( n ⋅ K max ) O(n \cdot K_{\max}) O ( n ⋅ K m a x ) . With o ≤ 1 o \le1 o ≤ 1 , K = 1 K = 1 K = 1 and the cost is O ( n ) O(n) O ( n ) : the linear search of §2 is a corollary of Theorem 7.6.
Proposition 8.3 (the dummies are an extension that does not block but does not conserve). W ′ = W ∪ D W' = W \cup D W ′ = W ∪ D makes K = 1 K = 1 K = 1 (the chain does not fragment), but R ( W ′ ) ⊇ R ( W ) R(W') \supseteq R(W) R ( W ′ ) ⊇ R ( W ) with strict inclusion in general: the extension does not preserve the projection onto the original solutions, so it does not satisfy the hypothesis of Theorem 7.3. This is why a negative answer on W ′ W' W ′ is valid (T ∉ R ( W ′ ) ⟹ T ∉ R ( W ) T \notin R(W') \Longrightarrow T \notin R(W) T ∈ / R ( W ′ ) ⟹ T ∈ / R ( W ) , which is Theorem 7.13 applied to a relaxation), while the backward choice on the original variables alone can get stuck.
The exact table R i R_i R i is a conservative extension that does not block, but its size is n ⋅ K n \cdot K n ⋅ K . The dummies have size O ( n + log max W ) O(n + \log\max W) O ( n + log max W ) , but they are not conservative. Having both properties with size polynomial in ( n , log max W ) (n,\log\max W) ( n , log max W ) on every instance is equivalent to a polynomial algorithm for Subset Sum. This is an equivalence, not progress.
Proposition 8.4 (the arcs are Eval on a quotient). N c ( q ) > 0 ⟺ N_c(q)>0 \Longleftrightarrow N c ( q ) > 0 ⟺ the class c c c survives Eval on the chain reduced mod q q q , s i s_i s i mod $q. Proof. N c ( q ) = # { subsets with sum ≡ c ( m o d q ) } N_c(q)=\#\{\text{subsets with sum}\equiv c\pmod q\} N c ( q ) = # { subsets with sum ≡ c ( mod q )} , and Eval mod q q q computes the support of the same recurrence. □ \square □ An arc obstruction is a domain that empties in the quotient; by Theorem 7.13 (a relaxation deletes no solution) it is always correct.
Three semirings (Remark 2.4). The chain is evaluated in three semirings, linked by homomorphisms:
Table 1 (PDF p. 55).
Propagation lives in B \mathbb{B} B ; the arcs live in N \mathbb{N} N and C \mathbb{C} C and project onto B \mathbb{B} B through the support. Evaluating ∏ ( 1 + z w i ) \prod(1+z^{w_i}) ∏ ( 1 + z w i ) at roots of unity to count subset sums is the mechanism of [LN]; the residue classes, the emerging arcs and the de-blurring are not there.
Proposition 8.5 (the blur is invertible on counts, not on Booleans). With dummies 1 , 2 , … , 2 k − 1 1,2,\ldots,2^{k-1} 1 , 2 , … , 2 k − 1 (M = 2 k M=2^k M = 2 k ), F W ∪ D = F W ⋅ ( 1 − z M ) / ( 1 − z ) F_{W\cup D}=F_W\cdot(1-z^M)/(1-z) F W ∪ D = F W ⋅ ( 1 − z M ) / ( 1 − z ) , so
r W ( T ) = ∑ j ≥ 0 [ r W ∪ D ( T − j M ) − r W ∪ D ( T − j M − 1 ) ] . r_W(T)=\sum_{j\ge0}\left[r_{W\cup D}(T-jM)-r_{W\cup D}(T-jM-1)\right]. r W ( T ) = j ≥ 0 ∑ [ r W ∪ D ( T − j M ) − r W ∪ D ( T − j M − 1 ) ] . the blur identity of §5.4 solved by telescoping. In B [ Z ] \mathbb{B}[\mathbb{Z}] B [ Z ] the factor { 0 , … , M − 1 } \{0,\ldots,M-1\} { 0 , … , M − 1 } is not invertible (union has no inverses), and R ( W ∪ D ) R(W\cup D) R ( W ∪ D ) does not determine R ( W ) R(W) R ( W ) .
The solver of §5 in the framework.
Table 2 (PDF p. 55).
Outside o ≤ 1 o \le1 o ≤ 1 , Corollary C′ is the one regime in which Theorem 7.6 decides without search, and it does so by the structure theorem of [BW].
Tests.
Table 15.
Discussion
Literature
Table 16.
In the dense regime Bringmann–Wellnitz is rigorous and faster. Our contribution there is the arc reading of their obstructions (almost divisors are the moduli with vanishing class counts), and the measured extension of the solver to weights of 10 10 − 10 12 10^{10}-10^{12} 1 0 10 − 1 0 12 , outside their polynomial regime.
For b = O ( ( log n ) 2 ) b=O((\log n)^2) b = O (( log n ) 2 ) , Flaxman–Przydatek is polynomial and better. For b = n c b=n^c b = n c , Lyubashevsky’s generalized-birthday algorithm runs in 2 O ( b / log n ) 2^{O(b/\log n)} 2 O ( b / l o g n ) on random modular instances, faster than the 2 b / 2 + o ( b ) 2^{b/2+o(b)} 2 b /2 + o ( b ) of Theorem R′ in that window. Theorem R′ gives a proof for the simplest algorithm (centre rule and meet-in-the-middle) on integer instances, with explicit constants in its probabilistic ingredients.
Wan–Shi’s algorithm is the “no arcs, centre rule” variant of our ablation, stated heuristically and without experiments. Theorem R′ proves its guarantee. The arcs add the treatment of congruence obstructions (12 / 12 12/12 12/12 against 2 − 4 / 12 2-4/12 2 − 4/12 ).
Theorem R″ is the four-list form [SS; Wag] of Theorem R′. It gives a proof for the theorem mode of the implemented endgame, through Lemma J, with the moments of Lemma B as the only probabilistic input.
On the number-theoretic side, Richert’s theorem (every integer > 6 >6 > 6 is a sum of distinct primes) [Richert] and the Roth–Szekeres asymptotics for partitions into distinct primes [RSz] treat the arcs away from 0 as an error term. Lemma 1 rests on classical facts about cyclotomic values. The reading of the arcs of Π ( 1 + z p ) \Pi(1+z^p) Π ( 1 + z p ) as weighted prime races, Proposition 3 with logarithmic-cosine weights, and the lobe bounds of Lemmas P and Q are, as far as we could find, new.
On the propagation side (§ 9 –§ 10 ):
Union-find for equalities and forward evaluation of circuits are standard (congruence closure in SMT solvers, presolve in constraint programming). Labeled union-find [LUF] factors constraints by grouplabelled relations (affine, XOR, modular) and refines with an AC-3 schedule; it does not treat functional definitions or DAGs. What §7 adds is the single factorization T = T c o m p ∘ T s t r u c t T = T_{\mathrm{comp}} \circ T_{\mathrm{struct}} T = T comp ∘ T struct with parities and definitions on the complete DAG, the information limit (Theorem 7.3 ), the corrected bound (Theorem 7.4 (iii) and Remark 7.5), and the closure form of convergence (Theorem 7.13 ).
Counting subset sums by evaluating the generating polynomial at roots of unity is the method of [LN]. The residue classes mod q q q , the emerging arcs, the prime races, the dummies and the exact de-blurring are not there.
Scope
The zeros. Propositions 3 and 30 are equivalences, and Theorem S is an Ω \Omega Ω -result. The lemmas of §6 concern independent random weights; the primes are one deterministic sequence, and carrying those lemmas over to them is the same question as the hypothesis at square-root scale. The numerical statements about the races and the moments of the primes are computed in finite ranges.
The Euler product. The Euler product can be read as a structural collapse of the coefficients onto the primes, with the sign of Re ζ ′ / ζ \operatorname{Re}\zeta'/\zeta Re ζ ′ / ζ in the computational part (the zeros), as the hybrid product of [GHK] shows.
Conclusion
For the primes, completeness makes the decision problem trivial and the counting problem arithmetic. The generating function of the prime subset sums has arcs at the rationals a / q a/q a / q . They emerge exactly at q = 2 k q=2^k q = 2 k and q = 2 p q=2^p q = 2 p , their neighbourhoods sink into the sea uniformly in q q q , and their heights are prime races whose one-sided bound is equivalent, under the conditions ( R ) (R) ( R ) and ( N ) (N) ( N ) , to GRH for the even characters they see. That equivalence is unconditional for q = 8 q=8 q = 8 , 10 and 14, where the absence of real zeros is certified, and on the arc at 14 the race has no last sign change. The principal arc carries ζ \zeta ζ in the centre and width of its Gaussian.
For arbitrary weights, the dummies of HURS restore completeness by blurring the counts, and the blur can be removed exactly, so the solver reads the arcs directly on the original weights. The arcs then become the decision rule of a solver whose cost is governed by its endgame: the square root of the omicron with a plain meet-in-the-middle, and about its cube root once the endgame is filtered by a residue class, which is itself an arc at a modulus of the order of the number of solutions. It returns only exact solutions, finds them on instances far beyond dynamic programming, and needs its arcs precisely where the structure theorem of dense Subset Sum puts the obstructions. On random weights of b b b bits the simplest form of the method has a proof: a uniform local limit theorem, and a concentration of signed subset sums conditioned on their total, give a solution with probability 1 − δ 1-\delta 1 − δ in time 2 b / 2 + o ( b ) ⋅ log ( 1 / δ ) 2^{b/2+o(b)}\cdot\log(1/\delta) 2 b /2 + o ( b ) ⋅ log ( 1/ δ ) . In the modular model this is slower than generalized birthday; its interest is the proof and the explicit constants. With the residue filter the same ingredients, through an averaging over the residues, give 2 b / 3 + o ( b ) 2^{b/3+o(b)} 2 b /3 + o ( b ) : this is the four-list method, and its interest is again the proof.
The algorithm is an instance of a general propagation theory. Every constraint network factors into a structural part solved in one pass and a computational part that converges, in any order, to the least informed fixpoint; definitional variables make explicit exactly the links that are functional on the solutions. Read in this theory, the forward pass of the solver is structural evaluation, the arcs are propagation on quotients, the dummies are an extension that does not block but does not conserve, and de-blurring works because that loss, irreversible on reachable sets, is reversible on counts. Dense instances in the sense of Bringmann–Wellnitz are the regime, beyond completeness, in which propagation alone decides.
Data and code availability
All computations are reproducible with the scripts listed here (Python, NumPy, SymPy, mpmath, matplotlib for the figures, python-flint/Arb for the certifications, and OR-Tools for the CP-SAT method of BENCH5; the versions used are listed in requirements.txt).
Arcs and races: python/arcs_theory/arcs_fig.py, arcform2.py, edgeworth_arcs.py, edgeworth_arcs3.py (Proposition C′, Table 2′), arc_races.py.
Lobes: python/arcs_theory/lobes2.py, lobe_proof_check.py, lobe_bound.py, lobe_tail.py; certification of Corollary Q′ in Arb: python/certification/certify_lobes_arb.py, with output python/certification/lobes_arb.txt.
Certification of a zero on the line for the cubic character mod 7 (Theorem S): python/certification/certify_zero_cubic7.py, a sign change of Z ( t ) Z(t) Z ( t ) on [4.35546875,4.3564453125], with output python/certification/zero_cubic7_out128.txt.
Filtered endgame and floating-point counts (§5.4–5.6, Table 9 ′–Table 9 ″, Theorem R″): python/algorithm/arcs_float.py, endgame_fast.py, test_123.py, bench_big2.py, bench_small2.py.
The solver: python/algorithm/arcs_rho.py (default ARCS, parameters derived from the instance, §5.7) and python/algorithm/arcs_solver.py (ARCS with the fixed constants of BENCH5 v2), with the pseudocode in pseudocode/ARCS_pseudocode.md.
The benchmark of the default solver (§5.7): criterion with its sha256, runner, independent checker, results and logs, in benchmarks/arcs_rho/.
The benchmark BENCH5 (§5.7, Figure 9 ), in benchmarks/bench5_v2/. The reference run v2: criterion (with its sha256 and an English translation), bench5.py, checker5.py, export5.py, results, run and check logs, and an export of every instance and answer as plain text with verify_one.py, which verifies the YES answers (the NO certificates are verified by checker5.py).
Algorithm: python/algorithm/decider.py, constructor3.py, poisson.py, deblur.py, bench_deblur.py, bench_big.py, ablation.py, nearprime.py, reps.py; shared modules hurs_arcs.py and hurs_hybrid.py.
Section 6, in python/random_weights/: rig_check.py, b0_check.py, b0p_check.py, lemmaB_check.py, b_moment.py, b_cond.py, exact_B3.py, poisson_tail.py, moments4.py, b_prime_exact.py (Proposition B′), lv_rate.py and lv_rate_certified.py (Theorem LV).
Section 7, in python/propagation/: run_tests.py (Table 13 ), ext.py (algorithm Ext, Table 14 and the scale test), probe.py (probing).
Table 13. The generated networks have parity constraints between inputs only; the configuration of Remark 7.2 (a parity class with members defined at different depths) does not occur in them.
Table 14. Fraction of the variables forced by brute force (excluding the injected ones) that each method determines.
Figures, in python/figures/: Figure 5 comes from python/arcs_theory/arcs_fig.py; each of the others from its own script fig_*.py, with the shared style figstyle.py and, for Figure 6 , the measured times fig_endgame_rows.json.
Figure 5. The heights H a / q ( N ) ⋅ log N / N H_{a/q}(N)\cdot\log N/\sqrt{N} H a / q ( N ) ⋅ log N / N of the arcs 1/6, 1/8, 1/10 and 1/14, for N N N from 10 4 10^4 1 0 4 to 10 8 10^8 1 0 8 (blue), against the Rubinstein–Sarnak mean with the finite-x x x factor of the squares of the primes (red) and its ± 2 \pm2 ± 2 sd band, computed from L ( 1 , χ ) L(1,\chi) L ( 1 , χ ) and L ′ ( 1 , χ ) L'(1,\chi) L ′ ( 1 , χ ) (Table 5 ). At q = 6 q=6 q = 6 only the principal character enters and the height vanishes identically.
Table 5. The races on the arcs against Rubinstein–Sarnak. With the finite-x x x factor of the squares of the primes, 1 2 li ( x ) ⋅ log x / x \frac{1}{2}\operatorname{li}(\sqrt{x})\cdot\log x/\sqrt{x} 2 1 li ( x ) ⋅ log x / x averaged over the range (≈ 1.21 \approx1.21 ≈ 1.21 ; computed, not fitted), the predicted means are − 0.53 -0.53 − 0.53 and − 0.29 -0.29 − 0.29 , against − 0.55 -0.55 − 0.55 and − 0.29 -0.29 − 0.29 measured. The measured means and standard deviations agree with the prediction, with no free parameter; the curves leave the ± 2 \pm2 ± 2 sd band only in short excursions (Figure 5 ).
Figure 6. Time per block of the endgame on m m m random weights whose range makes the block hold about λ ≈ 200 \lambda\approx200 λ ≈ 200 solutions; median over 3–5 blocks, one core. Orange: plain meet-in-the-middle. Blue: the filtered endgame. Below m ≈ 24 m \approx24 m ≈ 24 the quarter lists and the overhead dominate and the filter does not pay, as in Table 9. Beyond, with λ \lambda λ and therefore P P P fixed, both costs grow like 2 m / 2 2^{m/2} 2 m /2 , and the filter divides the plain cost by about P P P (dotted: the plain cost divided by 150). At m = 44 m = 44 m = 44 : 1.47 s against 9 ms.
A Lean 4 project, in lean/: the certified answer checker (checkYes, checkNo, checkRange, proved sound; the exhaustive certificate (− 3 , − 3 -3,-3 − 3 , − 3 ), proved sound and complete) and verify_bench, which rechecks every answer of the two benchmarks; and the statements of the paper, including the analytic ones (Theorem E , Propositions C, C′, 3, 30, Theorem S, Lemmas L, W , Q, Corollary Q′, Lemmas B0′, B, B‴, V, Proposition B′, Theorems R, R′, R″, LV, and the propagation theory of §7–8): all 62 items of the paper are covered. Published theorems (Siegel–Walfisz, Vinogradov–Vaughan, Jackson, Rosser–Schoenfeld, the prime number theorem, von Koch, Bringmann–Wellnitz, [BR, Theorem 22.1], and for Proposition 3 the GRH bound for π ( x , χ ) \pi(x,\chi) π ( x , χ ) [Davenport]) and the numerical certificates above enter as explicit hypotheses, never as axioms. Not formalized: Proposition B‴ (exact computations) and the running times. No sorry; only the standard axioms.
The scripts, the pseudocode of the solver, the benchmark files and the Lean project are in the public repository arcs-algo, github.com/anthem87/arcs-algo (AGPL-3.0-or-later; the version described here is commit 372ba68). This paper is archived at doi:10.5281/zenodo.23912385 (all versions).
AI tools were used to assist with computations, the drafting of text and the checking of proofs. All results were verified by the author, who takes full responsibility for the content.