The precise definition of LLL-reduced is as follows: Given a basis
define its Gram–Schmidt process orthogonal basis
and the Gram-Schmidt coefficients
for any .
Then the basis is LLL-reduced if there exists a parameter in (0.25, 1] such that the following holds:
(size-reduced) For . By definition, this property guarantees the length reduction of the ordered basis.
(Lovász condition) For k = 2,3,..,n .
Here, estimating the value of the parameter, we can conclude how well the basis is reduced. Greater values of lead to stronger reductions of the basis. Initially, A. Lenstra, H. Lenstra and L. Lovász demonstrated the LLL-reduction algorithm for . Note that although LLL-reduction is well-defined for , the polynomial-time complexity is guaranteed only for in .
The LLL algorithm computes LLL-reduced bases. There is no known efficient algorithm to compute a basis in which the basis vectors are as short as possible for lattices of dimensions greater than 4.[4] However, an LLL-reduced basis is nearly as short as possible, in the sense that there are absolute bounds such that the first basis vector is no more than times as long as a shortest vector in the lattice,
the second basis vector is likewise within of the second successive minimum, and so on.
The LLL algorithm has found numerous other applications in MIMO detection algorithms[6] and cryptanalysis of public-key encryption schemes: knapsack cryptosystems, RSA with particular settings, NTRUEncrypt, and so forth. The algorithm can be used to find integer solutions to many problems.[7]
In particular, the LLL algorithm forms a core of one of the integer relation algorithms. For example, if it is believed that r=1.618034 is a (slightly rounded) root to an unknown quadratic equation with integer coefficients, one may apply LLL reduction to the lattice in spanned by and . The first vector in the reduced basis will be an integer linear combination of these three, thus necessarily of the form ; but such a vector is "short" only if a, b, c are small and is even smaller. Thus the first three entries of this short vector are likely to be the coefficients of the integral quadratic polynomial which has r as a root. In this example the LLL algorithm finds the shortest vector to be [1, -1, -1, 0.00025] and indeed has a root equal to the golden ratio, 1.6180339887....
Properties of LLL-reduced basis
Let be a -LLL-reduced basis of a lattice. From the definition of LLL-reduced basis, we can derive several other useful properties about .
The first vector in the basis cannot be much larger than the shortest non-zero vector: . In particular, for , this gives .[8]
The first vector in the basis is also bounded by the determinant of the lattice: . In particular, for , this gives .
The product of the norms of the vectors in the basis cannot be much larger than the determinant of the lattice: let , then .
INPUT
a lattice basis b1, b2, ..., bn in Zm
a parameter δ with 1/4 < δ < 1, most commonly δ = 3/4
PROCEDUREB* <- GramSchmidt({b1, ..., bn}) = {b1*, ..., bn*}; and do not normalizeμi,j <- InnerProduct(bi, bj*)/InnerProduct(bj*, bj*); using the most current values ofbi and bj*k <- 2;
whilek <= ndoforjfromk−1 to 1 doif |μk,j| > 1/2 thenbk <- bk − ⌊μk,j⌉bj;
UpdateB*and the relatedμi,j's as needed.(The naive method is to recomputeB*wheneverbichanges:B* <- GramSchmidt({b1, ..., bn}) = {b1*, ..., bn*})
end ifend forif InnerProduct(bk*, bk*) > (δ − μ2k,k−1) InnerProduct(bk−1*, bk−1*) thenk <- k + 1;
else
Swap bk and bk−1;
UpdateB*and the relatedμi,j's as needed.k <- max(k−1, 2);
end ifend whilereturnB the LLL reduced basis of {b1, ..., bn}
OUTPUT
the reduced basis b1, b2, ..., bn in Zm
Examples
Example from Z3
Let a lattice basis , be given by the columns of
then the reduced basis is
which is size-reduced, satisfies the Lovász condition, and is hence LLL-reduced, as described above. See W. Bosma.[10] for details of the reduction process.
Example from Z[i]4
Likewise, for the basis over the complex integers given by the columns of the matrix below,
then the columns of the matrix below give an LLL-reduced basis.