The Euclidean algorithm is one of the oldest algorithms known to mankind. Given two integral numbers $a_1$ and $a_2$, it computes the greatest common divisor (gcd) of $a_1$ and $a_2$ in a very elegant way. From a lattice perspective, it computes a basis of the sum of two one-dimensional lattices $a_1 \mathbb{Z}$ and $a_2 \mathbb{Z}$ as $\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(a_1, \ldots , a_m)$ given vectors $a_1, \ldots , a_m \in \mathbb{Z}^n$ with $m> \mathrm{rank}(a_1, \ldots ,a_m)$. Similar to the Euclidean algorithm, our algorithm is very easy to describe and implement and can be written within 12 lines of pseudocode. While the Euclidean algorithm halves the largest number in every iteration, our generalized algorithm halves the determinant of a full rank subsystem leading to at most $\log (\det B)$ many iterations, for some initial subsystem $B$. Therefore, we can compute a basis of the lattice using at most $\tilde{O}((m-n)n\log(\det B) + mn^{\omega-1}\log(||A||_\infty))$ arithmetic operations, where $\omega$ is the matrix multiplication exponent and $A = (a_1, \ldots, a_m)$. Even using the worst case Hadamard bound for the determinant, our algorithm improves upon existing algorithm. Another major advantage of our algorithm is that we can bound the entries of the resulting lattice basis by $\tilde{O}(n^2\cdot ||A||_{\infty})$ using a simple pivoting rule. This is in contrast to the typical approach for computing lattice basis, where the Hermite normal form (HNF) is used. In the HNF, entries can be as large as the determinant and hence can only be bounded by an exponential term.
翻译:欧几里得算法是人类已知最古老的算法之一。给定两个整数 $a_1$ 和 $a_2$,它能以非常优雅的方式计算 $a_1$ 与 $a_2$ 的最大公约数(gcd)。从格的角度来看,它计算了两个一维格 $a_1 \mathbb{Z}$ 与 $a_2 \mathbb{Z}$ 之和的基,即 $\gcd(a_1,a_2) \mathbb{Z} = a_1 \mathbb{Z} + a_2 \mathbb{Z}$。在本文中,我们证明经典欧几里得算法可以非常自然地推广,用于计算一般格 $L(a_1, \ldots , a_m)$ 的基,其中给定向量 $a_1, \ldots , a_m \in \mathbb{Z}^n$ 且 $m> \mathrm{rank}(a_1, \ldots ,a_m)$。与欧几里得算法类似,我们的算法非常易于描述和实现,且可用12行以内伪代码编写。欧几里得算法在每次迭代中将最大数减半,而我们的广义算法则将满秩子系统的行列式减半,从而对于某个初始子系统 $B$,迭代次数至多为 $\log (\det B)$。因此,我们可以在至多 $\tilde{O}((m-n)n\log(\det B) + mn^{\omega-1}\log(||A||_\infty))$ 次算术运算内计算该格的基,其中 $\omega$ 是矩阵乘法指数,$A = (a_1, \ldots, a_m)$。即使采用最坏情况下的Hadamard行列式界,我们的算法也比现有算法有所改进。该算法的另一主要优势是:通过使用简单的枢轴规则,我们可以将所得格基的条目界为 $\tilde{O}(n^2\cdot ||A||_{\infty})$。这与通常使用Hermite标准型(HNF)计算格基的方法形成鲜明对比。在HNF中,条目可能达到行列式的大小,因此只能以指数项为界。