Babai's nearest-plane algorithm #
Babai's nearest-plane algorithm ([Bab86]; [Reg04], Lecture 3, §1) on the rows of an
integer matrix B : Vector (Vector ℤ m) n and an integer target t ∈ ℤᵐ, with exact rational
Gram–Schmidt vectors b*ⱼ. Starting from r = t, for j = n - 1, …, 0 it rounds the
Gram–Schmidt coordinate cⱼ = ⌊⟨r, b*ⱼ⟩ / ⟨b*ⱼ, b*ⱼ⟩⌉ and sets r ← r - cⱼ bⱼ; the output is
t - r (Cslib.Algorithms.LatticeReduction.nearestPlane). It is a lattice point, and every
Gram–Schmidt coordinate of t - (t - r) = r lies in [-1/2, 1/2]
(Cslib.Algorithms.LatticeReduction.isNearestPlane_nearestPlane).
Cslib.Algorithms.LatticeReduction.babai runs nearestPlane on the output of the LLL algorithm
Cslib.Algorithms.LatticeReduction.lll. For linearly independent rows, the output y satisfies
|y - t|² ≤ 2ⁿ |v - t|² for every lattice vector v
(Cslib.Algorithms.LatticeReduction.babai_dotProduct_le): it solves the closest vector problem
within a factor 2^{n/2}, [Reg04], Lecture 3, Lemma 6.
The target is an integer vector, as in [Reg04]; the abstract bound
Cslib.Algorithms.LatticeReduction.IsNearestPlane.norm_sq_le holds for arbitrary real targets.
Main definitions #
Cslib.Algorithms.LatticeReduction.nearestPlane: the nearest-plane loop.Cslib.Algorithms.LatticeReduction.babai: LLL reduction followed by the nearest-plane loop.
Main results #
Cslib.Algorithms.LatticeReduction.isNearestPlane_nearestPlane: the output of the loop satisfies the nearest-plane condition.Cslib.Algorithms.LatticeReduction.babai_mem_span: the output ofbabaiis a lattice vector.Cslib.Algorithms.LatticeReduction.babai_dotProduct_le: the approximation factor2^{n/2}.
The running time is not formalized: the loop costs O(n m) rational operations after the
Gram–Schmidt computation, but there is no cost model here, and the running time of lll is itself
not yet bounded.
References #
The loop invariant: r - nearestPlaneAux G B k r = ∑ⱼ eⱼ bⱼ with eⱼ = 0 for j ≥ k, and
the Gram–Schmidt coordinates of the output at j < k lie in [-1/2, 1/2].
The output of the nearest-plane loop: t - nearestPlane B t is the residual of the loop, so
nearestPlane B t = ∑ⱼ eⱼ bⱼ for some integers eⱼ, and every Gram–Schmidt coordinate of
t - nearestPlane B t lies in [-1/2, 1/2].
Babai's algorithm solves the closest vector problem within a factor 2^{n/2}
([Reg04], Lecture 3, Lemma 6): for linearly independent integer rows b₀, …, bₙ₋₁ and an
integer target t, the output y satisfies |y - t|² ≤ 2ⁿ |v - t|² for every vector v of the
lattice spanned by the rows.