English

Faster Lattice Basis Computation via a Natural Generalization of the Euclidean Algorithm

Data Structures and Algorithms 2024-11-08 v2 Discrete Mathematics Algebraic Geometry

Abstract

The Euclidean algorithm is the oldest algorithms known to mankind. Given two integral numbers a1a_1 and a2a_2, it computes the greatest common divisor (gcd) of a1a_1 and a2a_2 in a very elegant way. From a lattice perspective, it computes a basis of the sum of two one-dimensional lattices a1Za_1 \mathbb{Z} and a2Za_2 \mathbb{Z} as gcd(a1,a2)Z=a1Z+a2Z\gcd(a_1,a_2) \mathbb{Z} = a_1 \mathbb{Z} + a_2 \mathbb{Z}. In this paper, we show that the classical Euclidean algorithm can be adapted in a very natural way to compute a basis of a general lattice L(A1,,An)L(A_1, \ldots , A_n) given vectors A1,,AnZdA_1, \ldots , A_n \in \mathbb{Z}^d with n>rank(a1,,ad)n> \mathrm{rank}(a_1, \ldots ,a_d). Similar to the Euclidean algorithm, our algorithm is very easy to describe and implement and can be written within 12 lines of pseudocode. As our main result, we obtain an algorithm to compute a lattice basis for given vectors A1,,AnZdA_1, \ldots , A_n \in \mathbb{Z}^d in time (counting bit operations) LS+O~((nd)d2log(A)LS + \tilde{O}((n-d)d^2 \cdot \log(||A||), where LSLS is the time required to obtain the exact fractional solution of a certain system of linear equalities. The analysis of the running time of our algorithms relies on fundamental statements on the fractionality of solutions of linear systems of equations. So far, the fastest algorithm for lattice basis computation was due to Storjohann and Labhan [SL96] having a running time of O~(ndωlogA)\tilde{O}(nd^\omega\log ||A||). For current upper bounds of LSLS, our algorithm has a running time improvement of a factor of at least d0.12d^{0.12} over [SL96]. Our algorithm is therefore the first general algorithmic improvement to this classical problem in nearly 30 years. At last, we present a postprocessing procedure which yields an improved size bound of dA\sqrt{d} ||A|| for vectors of the resulting basis matrix.

Keywords

Cite

@article{arxiv.2408.06685,
  title  = {Faster Lattice Basis Computation via a Natural Generalization of the Euclidean Algorithm},
  author = {Kim-Manuel Klein and Janina Reuter},
  journal= {arXiv preprint arXiv:2408.06685},
  year   = {2024}
}

Comments

22 pages. arXiv admin note: text overlap with arXiv:2311.15902

R2 v1 2026-06-28T18:11:23.278Z