In mathematics, the goal of lattice basis reduction is to find a basis with short, nearly orthogonal vectors when given an integer lattice basis as input. This is realized using different algorithms, whose running time is usually at least exponential in the dimension of the lattice.
One measure of nearly orthogonal is the orthogonality defect. This compares the product of the lengths of the basis vectors with the volume of the parallelepiped they define. For perfectly orthogonal basis vectors, these quantities would be the same.
Any particular basis of [math]\displaystyle{ n }[/math] vectors may be represented by a matrix [math]\displaystyle{ B }[/math], whose columns are the basis vectors [math]\displaystyle{ b_i, i = 1, \ldots, n }[/math]. In the fully dimensional case where the number of basis vectors is equal to the dimension of the space they occupy, this matrix is square, and the volume of the fundamental parallelepiped is simply the absolute value of the determinant of this matrix [math]\displaystyle{ \det(B) }[/math]. If the number of vectors is less than the dimension of the underlying space, then volume is [math]\displaystyle{ \sqrt{\det(B^T B)} }[/math]. For a given lattice [math]\displaystyle{ \Lambda }[/math], this volume is the same (up to sign) for any basis, and hence is referred to as the determinant of the lattice [math]\displaystyle{ \det(\Lambda) }[/math] or lattice constant [math]\displaystyle{ d(\Lambda) }[/math].
The orthogonality defect is the product of the basis vector lengths divided by the parallelepiped volume;
From the geometric definition it may be appreciated that [math]\displaystyle{ \delta(B) \ge 1 }[/math] with equality if and only if the basis is orthogonal.
If the lattice reduction problem is defined as finding the basis with the smallest possible defect, then the problem is NP-hard[citation needed]. However, there exist polynomial time algorithms to find a basis with defect [math]\displaystyle{ \delta(B) \le c }[/math] where c is some constant depending only on the number of basis vectors and the dimension of the underlying space (if different)[citation needed]. This is a good enough solution in many practical applications[citation needed].
For a basis consisting of just two vectors, there is a simple and efficient method of reduction closely analogous to the Euclidean algorithm for the greatest common divisor of two integers. As with the Euclidean algorithm, the method is iterative; at each step the larger of the two vectors is reduced by adding or subtracting an integer multiple of the smaller vector.
The pseudocode of the algorithm, often known as Lagrange's algorithm or the Lagrange-Gauss algorithm, is as follows:
Input: [math]\displaystyle{ (u,v) }[/math] a basis for the lattice [math]\displaystyle{ L }[/math]. Assume that [math]\displaystyle{ ||v|| \leq ||u|| }[/math], otherwise swap them. Output: A basis [math]\displaystyle{ (u,v) }[/math] with [math]\displaystyle{ ||u|| = \lambda_1(L), ||v|| = \lambda_2(L) }[/math].
While [math]\displaystyle{ ||v|| \lt ||u|| }[/math]: [math]\displaystyle{ q := \lfloor {\langle u, \frac{ v}{||v||^2} \rangle } \rceil }[/math] # Round to nearest integer [math]\displaystyle{ r := u - qv }[/math] [math]\displaystyle{ u := v }[/math] [math]\displaystyle{ v := r }[/math]
See the section on Lagrange's algorithm in [1] for further details.
Lattice reduction algorithms are used in a number of modern number theoretical applications, including in the discovery of a spigot algorithm for [math]\displaystyle{ \pi }[/math]. Although determining the shortest basis is possibly an NP-complete problem, algorithms such as the LLL algorithm[2] can find a short (not necessarily shortest) basis in polynomial time with guaranteed worst-case performance. LLL is widely used in the cryptanalysis of public key cryptosystems.
When used to find integer relations, a typical input to the algorithm consists of an augmented [math]\displaystyle{ n \times n }[/math] identity matrix with the entries in the last column consisting of the [math]\displaystyle{ n }[/math] elements (multiplied by a large positive constant [math]\displaystyle{ w }[/math] to penalize vectors that do not sum to zero) between which the relation is sought.
The LLL algorithm for computing a nearly-orthogonal basis was used to show that integer programming in any fixed dimension can be done in polynomial time.[3]
The following algorithms reduce lattice bases; several public implementations of these algorithms are also listed.
Year | Algorithm | Implementation |
---|---|---|
1773 | Lagrange/Gauss reduction for 2D lattices | |
1982 | Lenstra–Lenstra–Lovász reduction | NTL, fplll |
1987 | Block Korkine–Zolotarev[4] | NTL, fplll |
1993 | Seysen Reduction[5] |
Original source: https://en.wikipedia.org/wiki/Lattice reduction.
Read more |