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 write and . For a set of positions, . A solution is a vector with and . The numbers are those of lines L1 to L3. Since and , , so the residues of line L6 exist.
Lemma 1 (LIST). For a split of the positions, integers and a residue , LIST returns each vector with , and exactly once, and no other vector.
Proof. Each such is for exactly one pair: the part of on , with ones, and the part on , with ones, because and are disjoint and cover all positions. Since , the condition holds if and only if , that is, if and only if is in the bucket of line L12. Line L14 visits each once and each of that bucket once, and appends . So it appends exactly the vectors of the statement, each once.
Lemma 2 (soundness of a round). If line L10 returns , then is a solution.
Proof. By Lemma 1 (line L7), and ; by Lemma 1 (line L8), and . Line L10 takes from , so . It returns only if . Then , its number of ones is , and .
Lemma 3 (a surviving representation is found). Consider a round with split and residue . Suppose a solution has and , and a vector with , , has . Then the round returns a solution.
Proof. Let . Since , , its support is disjoint from that of , and . Also . By Lemma 1, and , and line L9 puts in . Line L10 examines the pair 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.
The number of vectors as in Lemma 3 for a fixed balanced is : choose of the ones of in and of the ones in . This is why line L3 sets 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 vectors, so lines L5 to L10 stop. Line L11 checks the sets of 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 -subset only after it checks that its sum is , which is a solution, and returns NONE only after it has checked all -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 -subset.
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 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.