We provide sharp estimates for the probabilistic behaviour of the main parameters of the Euclid algorithm, and we study in particular the distribution of the bit-complexity which involves two main parameters : digit–costs and length of continuants. We perform a “dynamical analysis” which heavily uses the dynamical system underlying the Euclidean algorithm. Baladi and Vallee [2] have recently designed a general framework for “distributional dynamical analysis”, where they have exhibited asymptotic gaussian laws for a large class of digit–costs. However, this family contains neither the bit–complexity cost nor the length of continuants. We first show here that an asymptotic gaussian law also holds for the length of continuants at a fraction of the execution. There exist two gcd algorithms, the standard one which only computes the gcd, and the extended one which also computes the Bezout pair, and is widely used for computing modular inverses. The extended algorithm is more regular than the standard one, and this explains that our results are more precise for the extended algorithm. We prove that the bit–complexity of the extended Euclid algorithm asymptotically follows a gaussian law, and we exhibit the speed of convergence towards the normal law. We describe also conjectures [quite plausible], under which we can obtain an asymptotic gaussian law for the plain bit-complexity, or a sharper estimate of the speed of convergence towards the gaussian law.
[1]
D. H. Lehmer.
Euclid's Algorithm for Large Numbers
,
1938
.
[2]
W. Philipp.
Some metrical theorems in number theory II.
,
1970
.
[3]
D. Hensley.
The Number of Steps in the Euclidean Algorithm
,
1994
.
[4]
B. Vallée.
Opérateurs de Ruelle-Mayer généralisés et analyse en moyenne des algorithmes d'Euclide et de Gauss
,
1997
.
[5]
D. Dolgopyat.
On decay of correlations in Anosov flows
,
1998
.
[6]
Brigitte Vallée,et al.
Average Bit-Complexity of Euclidean Algorithms
,
2000,
ICALP.
[7]
Brigitte Vallée,et al.
Euclidean algorithms are Gaussian
,
2003,
ArXiv.
[8]
Loïck Lhote,et al.
Computation of a Class of COntinued Fraction Constants
,
2004,
ALENEX/ANALC.
[9]
Brigitte Vallée,et al.
Dynamical Analysis of the Parametrized Lehmer–Euclid Algorithm
,
2004,
Combinatorics, Probability and Computing.
[10]
B. Vallée,et al.
Real Numbers with Bounded Digit Averages
,
2004
.