The Lehmer-Euclid Algorithm is an improvement of the Euclid Algorithm when applied to large integers. The original Lehmer-Euclid Algorithm replaces divisions on multi-precision integers by divisions on single-precision integers. Here we study a slightly different algorithm that replaces computations on n-bit integers by computations on µn-bit integers. This algorithm depends on the truncation degree µ ∈]0, 1[ and is denoted as the LE µ algorithm. The original Lehmer-Euclid Algorithm can be viewed as the limit of the LE µ algorithms for µ → 0. We provide here a precise analysis of the LE µ algorithm. For this purpose, we are led to study what we call the Interrupted Euclid Algorithm. This algorithm depends on some parameter α ∈ [0, 1] and is denoted by E α . When running with an input (a, b), it performs the same steps as the usual Euclid Algorithm, but it stops as soon as the current integer is smaller than a α , so that E 0 is the classical Euclid Algorithm. We obtain a very precise analysis of the algorithm E α , and describe the behaviour of main parameters (number of iterations, bit complexity) as a function of parameter α. Since the Lehmer-Euclid Algorithm LE µ when running on n-bit integers can be viewed as a sequence of executions of the Interrupted Euclid Algorithm E 1/2 on µn-bit integers, we then come back to the analysis of the LE µ algorithm and obtain our results.
B. Daireaux and B. Valléedivision algorithm which is about twice as slow as Karatsuba multiplication -in most of the cases, since there is a small probability of failure.A significant improvement in the speed of the Euclid Algorithm when high-precision numbers are involved can be achieved with the so-called Lehmer-Euclid Algorithm, which uses a method due to Lehmer [18]. Working only with the leading digits of large integers, it is possible to simulate most of the multiple-precision divisions by single-precision divisions, which leads to a significant speed-up of the algorithm. The first version of this algorithm appeared in [18]; then some variants were described in Knuth [16], and finally Collins [7] and Jebelean [14] provided various improvements to the algorithm. Nowadays, most of computer algebra systems and multi-precision libraries use many of these variants. However, there exist very few analyses of the Lehmer-Euclid Algorithm. Sorenson [23] obtained a worst-case analysis of this algorithm, but, to the best of our knowledge, there does not exist any precise average-case analysis of the Lehmer-Euclid Algorithm. It is the purpose of this paper to provide such an analysis.
Main resultsThe original Lehmer-Euclid Algorithm replaces divisions on multi-precision integers by divisions on single-precision integers (sometimes double precision is used). Here, we study a slightly different algorithm that replaces computations on n-bit integers by computations on µn-bit integers. This algorithm depends on the truncation degree µ ∈]0, 1[ and is denoted as the LE µ algorithm. This Lehmer-Euclid Algorithm can be viewed as a sequence of executions o...