23.2 Lattice Reduction

23.2.1 Two-Dimensional Lattices

Let v1, v2 form the basis of a two-dimensional lattice. Our first goal is to replace this basis with what will be called a reduced basis.

If v1>v2, then swap v1 and v2, so we may assume that v1v2. Ideally, we would like to replace v2 with a vector v2 perpendicular to v1. As in the Gram-Schmidt process from linear algebra, the vector

v2=v2v1v2v1v1v1
(23.1)

is perpendicular to v1. But this vector might not lie in the lattice. Instead, let t be the closest integer to (v1v2)/(v1v1) (for definiteness, take 0 to be the closest integer to ±12, and ±1 to be closest to ±32, etc.). Then we replace the basis {v1, v2} with the basis

{v1, v2tv1}.

We then repeat the process with this new basis.

We say that the basis {v1, v2} is reduced if

v1v2 and 12v1v2v1v112.

The above reduction process stops exactly when we obtain a reduced basis, since this means that t=0.

An illustration shows a reduced basis.
An illustration shows a non-reduced basis.

In the figures, the first basis is reduced because v2 is longer than v1 and the projection of v2 onto v1 is less than half the length of v1. The second basis is nonreduced because the projection of v2 onto v1 is too long. It is easy to see that a basis {v1, v2} is reduced when v2 is at least as long as v1 and v2 lies within the dotted lines of the figures.

Example

Let’s start with v1=(31, 59) and v2=(37, 70). We have v1<v2, so we do not swap the two vectors. Since

v1v2v1v1=52774442, 

we take t=1. The new basis is

v1=v1=(31, 59)andv2=v2v1=(6, 11).

Swap v1 and v2 and rename the vectors to obtain a basis

v1=(6, 11)andv2=(31, 59).

We have

v1v2v1v1=835157, 

so we take t=5. This yields vectors

(6, 11) and(1, 4)=(31, 59)5(6, 11).

Swap these and name them v1(3)=(1, 4) and v2(3)=(6, 11). We have

v1(3)v2(3)v1(3)v1(3)=5017, 

so t=3. This yields, after a swap,

v1r=(3, 1)andv2r=(1, 4).

Since v1rv2r and

v1rv2rv1rv1r=110, 

the basis {v1r, v2r} is reduced.

A natural question is whether this process always produces a reduced basis. The answer is yes, as we prove in the following theorem. Moreover, the first vector in the reduced basis is a shortest vector for the lattice.

We summarize the discussion in the following.

Theorem

Let {v1, v2} be a basis for a two-dimensional lattice in R2. Perform the following algorithm:

  1. If v1>v2, swap v1 and v2 so that v1v2.

  2. Let t be the closest integer to (v1v2)/(v1v1).

  3. If t=0, stop. If t0, replace v2 with v2tv1 and return to step 1.

The algorithm stops in finite time and yields a reduced basis {v1r, v2r} of the lattice. The vector v1r is a shortest nonzero vector for the lattice.

Proof

First we prove that the algorithm eventually stops. As in Equation 23.1, let μ=(v1v2)/(v1v1) and let v2=v2μv1. Then

v2tv1=v2+(μt)v1.

Since v1 and v2 are orthogonal, the Pythagorean theorem yields

v2tv12=v22+(μt)v12=v22+(μt)2v12.

Also, since v2=v2+μv1, and again since v1 and v2 are orthogonal,

v22=v22+μ2v12.

Note that if 1/2μ1/2 then t=0 and μt=μ. Otherwise, |μt|1/2t|μ|. Therefore, if t0, we have |μt|<|μ|, which implies that

v2tv12=v22+(μt)2v12<v22+μ2v12=v22.

Therefore, if the process continues forever without yielding a reduced basis, then the lengths of the vectors decrease indefinitely. However, there are only finitely many vectors in the lattice that are shorter than the original basis vector v2. Therefore, the lengths cannot decrease forever, and a reduced basis must be found eventually.

To prove that the vector v1 in a reduced basis is a shortest nonzero vector for the lattice, let av1+bv2 be any nonzero vector in the lattice, where a and b are integers. Then

av1+bv22=(av1+bv2)(av1+bv2)=a2v12+b2v22+2abv1v2.

Because {v1, v2} is reduced,

12v1v1v1v212v1v1, 

which implies that 2abv1v2|ab|v12. Therefore,

av1+bv22=(av1+bv2)(av1+bv2)=a2v12+2abv1v2+b2v22a2v12|ab|v12+b2v22a2v12|ab|v12+b2v12, 

since v22v12 by assumption. Therefore,

av1+bv22(a2|ab|+b2)v12.

But a2|ab|+b2 is an integer. Writing it as (|a|12|b|)2+14|b|2, we see that it is nonnegative, and it equals 0 if and only if a=b=0. Since av1+bv20, we must have a2|ab|+b21. Therefore,

av1+bv22v12, 

so v1 is a shortest nonzero vector.

23.2.2 The LLL algorithm

Lattice reduction in dimensions higher than two is much more difficult. One of the most successful algorithms was invented by A. Lenstra, H. Lenstra, and L. Lovász and is called the LLL algorithm. In many problems, a short vector is needed, and it is not necessary that the vector be the shortest. The LLL algorithm takes this approach and looks for short vectors that are almost as short as possible. This modified approach makes the algorithm run very quickly (in what is known as polynomial time). The algorithm performs calculations similar to those in the two-dimensional case, but the steps are more technical, so we omit details, which can be found in [Cohen], for example. The result is the following.

Theorem

Let L be the n-dimensional lattice generated by v1, , vn in Rn. Define the determinant of the lattice to be

D=|det(v1, ..., vn)|.

(This can be shown to be independent of the choice of basis. It is the volume of the parallelepiped spanned by v1, , vn.) Let λ be the length of a shortest nonzero vector in L. The LLL algorithm produces a basis {b1, , bn} of L satisfying

  1. b12(n1)/4D1/n

  2. b12(n1)/2λ

  3. b1b2bn2n(n1)/4D.

Statement (2) says that b1 is close to being a shortest vector, at least when the dimension n is small. Statement (3) says that the new basis vectors are in some sense close to being orthogonal. More precisely, if the vectors b1, , bn are orthogonal, then the volume D equals the product b1b2bn. The fact that this product is no more than 2n(n1)/4 times D says that the vectors are mostly close to orthogonal.

The running time of the LLL algorithm is less than a constant times n6log3B, where n is the dimension and B is a bound on the lengths of the original basis vectors. In practice it is much faster than this bound. This estimate shows that the running time is quite good with respect to the size of the vectors, but potentially not efficient when the dimension gets large.

Example

Let’s consider the lattice generated by (31, 59) and (37, 70), which we considered earlier when looking at the two-dimensional algorithm. The LLL algorithm yields the same result, namely b1=(3, 1) and b2=(1, 4). We have D=13 and λ=10 (given by (3, 1), for example). The statements of the theorem are

  1. b1=1021/413

  2. b1=1021/210

  3. b1b2=101721/213.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset