Algorithm Search⌘K

Proofs: Howgrave-Graham-Joux algorithm

These are the human proofs of Howgrave-Graham-Joux algorithm, at full length.

The one-level HGJ search returns a correct solution, and a round with a surviving representation succeeds full

This proof shows: correctness, termination.

Notation. For v∈{0,1}nv \in \{0, 1\}^n write ⟨a,v⟩=∑iaivi\langle a, v \rangle = \sum_i a_i v_i and supp(v)={i:vi=1}\mathrm{supp}(v) = \{i : v_i = 1\}. For a set XX of positions, ∣v∣X=∣supp(v)∩X∣|v|_X = |\mathrm{supp}(v) \cap X|. A solution is a vector e∈{0,1}ne \in \{0, 1\}^n with ∣e∣{0,…,n−1}=w|e|_{\{0, \ldots, n-1\}} = w and ⟨a,e⟩=t\langle a, e \rangle = t. The numbers p,q,p1,q1,Mp, q, p_1, q_1, M are those of lines L1 to L3. Since 0≤p1≤p0 \le p_1 \le p and 0≤q1≤q0 \le q_1 \le q, M≥1M \ge 1, so the residues of line L6 exist.

Lemma 1 (LIST). For a split (P,Q)(P, Q) of the positions, integers i,j≥0i, j \ge 0 and a residue rr, LIST(P,i,Q,j,r)(P, i, Q, j, r) returns each vector v∈{0,1}nv \in \{0, 1\}^n with ∣v∣P=i|v|_P = i, ∣v∣Q=j|v|_Q = j and ⟨a,v⟩≡r(modM)\langle a, v \rangle \equiv r \pmod M exactly once, and no other vector.

Proof. Each such vv is z′+zz' + z for exactly one pair: z′z' the part of vv on PP, with ii ones, and zz the part on QQ, with jj ones, because PP and QQ are disjoint and cover all positions. Since ⟨a,v⟩=⟨a,z′⟩+⟨a,z⟩\langle a, v \rangle = \langle a, z' \rangle + \langle a, z \rangle, the condition ⟨a,v⟩≡r\langle a, v \rangle \equiv r holds if and only if ⟨a,z⟩≡r−⟨a,z′⟩(modM)\langle a, z \rangle \equiv r - \langle a, z' \rangle \pmod M, that is, if and only if zz is in the bucket G[(r−⟨a,z′⟩) mod M]G[(r - \langle a, z' \rangle) \bmod M] of line L12. Line L14 visits each z′z' once and each zz of that bucket once, and appends z′+zz' + z. So it appends exactly the vectors vv of the statement, each once. □\square

Lemma 2 (soundness of a round). If line L10 returns v=x+yv = x + y, then vv is a solution.

Proof. By Lemma 1 (line L7), ∣x∣P=p1|x|_P = p_1 and ∣x∣Q=q1|x|_Q = q_1; by Lemma 1 (line L8), ∣y∣P=p−p1|y|_P = p - p_1 and ∣y∣Q=q−q1|y|_Q = q - q_1. Line L10 takes yy from H[t−⟨a,x⟩]H[t - \langle a, x \rangle], so ⟨a,y⟩=t−⟨a,x⟩\langle a, y \rangle = t - \langle a, x \rangle. It returns only if supp(x)∩supp(y)=∅\mathrm{supp}(x) \cap \mathrm{supp}(y) = \emptyset. Then x+y∈{0,1}nx + y \in \{0, 1\}^n, its number of ones is p1+q1+(p−p1)+(q−q1)=p+q=wp_1 + q_1 + (p - p_1) + (q - q_1) = p + q = w, and ⟨a,x+y⟩=⟨a,x⟩+⟨a,y⟩=t\langle a, x + y \rangle = \langle a, x \rangle + \langle a, y \rangle = t. □\square

Lemma 3 (a surviving representation is found). Consider a round with split (P,Q)(P, Q) and residue RR. Suppose a solution ee has ∣e∣P=p|e|_P = p and ∣e∣Q=q|e|_Q = q, and a vector x∗∈{0,1}nx^* \in \{0, 1\}^n with supp(x∗)⊆supp(e)\mathrm{supp}(x^*) \subseteq \mathrm{supp}(e), ∣x∗∣P=p1|x^*|_P = p_1, ∣x∗∣Q=q1|x^*|_Q = q_1 has ⟨a,x∗⟩≡R(modM)\langle a, x^* \rangle \equiv R \pmod M. Then the round returns a solution.

Proof. Let y∗=e−x∗y^* = e - x^*. Since supp(x∗)⊆supp(e)\mathrm{supp}(x^*) \subseteq \mathrm{supp}(e), y∗∈{0,1}ny^* \in \{0, 1\}^n, its support is disjoint from that of x∗x^*, ∣y∗∣P=p−p1|y^*|_P = p - p_1 and ∣y∗∣Q=q−q1|y^*|_Q = q - q_1. Also ⟨a,y∗⟩=t−⟨a,x∗⟩≡t−R(modM)\langle a, y^* \rangle = t - \langle a, x^* \rangle \equiv t - R \pmod M. By Lemma 1, x∗∈Lxx^* \in L_x and y∗∈Lyy^* \in L_y, and line L9 puts y∗y^* in H[⟨a,y∗⟩]=H[t−⟨a,x∗⟩]H[\langle a, y^* \rangle] = H[t - \langle a, x^* \rangle]. Line L10 examines the pair (x∗,y∗)(x^*, y^*) unless it returns earlier. At that pair the supports are disjoint, so it returns. In both cases the round returns, and by Lemma 2 the result is a solution. □\square

The number of vectors x∗x^* as in Lemma 3 for a fixed balanced ee is (pp1)(qq1)=M\binom{p}{p_1}\binom{q}{q_1} = M: choose p1p_1 of the pp ones of ee in PP and q1q_1 of the qq ones in QQ. This is why line L3 sets MM to this count.

Theorem. For every input and every number of rounds, HGJ stops, and it returns a solution if one exists, and NONE otherwise.

Proof. Termination. The loop of line L4 runs a fixed number of rounds. In each round the lists are finite, since there are at most 2n2^n vectors, so lines L5 to L10 stop. Line L11 checks the (nw)\binom{n}{w} sets of ww positions, a finite number.

Correctness. The algorithm returns either at line L10 or at line L11. A result of line L10 is a solution by Lemma 2. Line L11 returns a ww-subset only after it checks that its sum is tt, which is a solution, and returns NONE only after it has checked all ww-subsets and found none, so then no solution exists. If a solution exists, either some round returns one at line L10, or line L11 is reached, and line L11 then finds one, since it checks every ww-subset. ■\blacksquare

Remark (what is not proved). Lemma 3 says when a round succeeds. That a round succeeds with constant probability, and that the lists have the heuristic sizes of the page, relies on the assumption that the residues ⟨a,x⟩ mod M\langle a, x \rangle \bmod M of the representations and of the other list entries behave like independent uniform values. This assumption is not proved; the theorem above does not use it.

Back to Howgrave-Graham-Joux algorithm