Skip to main content
Log in

Gaussian Laws for the Main Parameters of the Euclid Algorithms

  • Published:
Algorithmica Aims and scope Submit manuscript

Abstract

We provide sharp estimates for the probabilistic behaviour of the main parameters of the Euclid Algorithms, both on polynomials and on integer numbers. We study in particular the distribution of the bit-complexity which involves two main parameters: digit-costs and length of remainders. We first show here that an asymptotic Gaussian law holds for the length of remainders at a fraction of the execution, which exhibits a deep regularity phenomenon. Then, we study in each framework—polynomials (P) and integer numbers (I)—two gcd algorithms, the standard one (S) which only computes the gcd, and the extended one (E) 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 exhibit an asymptotic Gaussian law for the bit-complexity of the extended algorithm, in both cases (P) and (I). We also prove that an asymptotic Gaussian law for the bit-complexity of the standard gcd in case (P), but we do not succeed obtaining a similar result in case (I).

The integer study is more involved than the polynomial study, as it is usually the case. In the polynomial case, we deal with the central tools of the distributional analysis of algorithms, namely bivariate generating functions. In the integer case, we are led to dynamical methods, which heavily use the dynamical system underlying the number Euclidean algorithm, and its transfer operator. Baladi and Vallée (J. Number Theory 110(2):331–386, 2005) have recently designed a general framework for “distributional dynamical analysis”, where they have exhibited asymptotic Gaussian laws for a large family of parameters. However, this family does not contain neither the bit-complexity cost nor the size of remainders, and we have to extend their methods for obtaining our results. Even if these dynamical methods are not necessary in case (P), we explain how the polynomial dynamical system can be also used for proving our results. This provides a common framework for both analyses, which well explains the similarities and the differences between the two cases (P) and (I), for the algorithms themselves, and also for their analysis. An extended abstract of this paper can be found in Lhote and Vallée (Proceedings of LATIN’06, Lecture Notes in Computer Science, vol. 3887, pp. 689–702, 2006).

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Akhavi, A., Vallée, B.: Average bit-complexity of Euclidean algorithms. In: Proceedings of ICALP’2000. Lecture Notes in Computer Science, vol. 1853, pp. 373–387. Springer, Berlin (2000)

    Google Scholar 

  2. Baladi, V., Vallée, B.: Euclidean algorithms are Gaussian. J. Number Theory 110(2), 331–386 (2005)

    Article  MATH  MathSciNet  Google Scholar 

  3. Berthé, V., Nakada, H.: On continued fraction expansions in positive characteristic: equivalence relations and some metric properties. Expo. Math. 18, 257–284 (2000)

    MATH  MathSciNet  Google Scholar 

  4. Cesaratto, E.: Remarks on the paper “Euclidean algorithms are gaussian” by V. Baladi and B. Vallée, personal communication (submitted)

  5. Cesaratto, E., Clément, J., Daireaux, B., Lhote, L., Maume-Deschamps, V., Vallée, B.: Analysis of fast versions of the Euclid algorithm, see web page: www.info.unicaen.fr/~brigitte. Proceedings of ANALCO’07 (to appear)

  6. Daireaux, B., Vallée, B.: Dynamical analysis of the parameterized Lehmer-Euclid algorithm. Comb. Probab. Comput. 499–536 (2004)

  7. Delange, H.: Généralisation du théorème d’ikehara. Ann. Sc. ENS 71, 213–242 (1954)

    MATH  MathSciNet  Google Scholar 

  8. Dixon, J.D.: The number of steps in the Euclidean algorithm. J. Number Theory 2, 414–422 (1970)

    Article  MATH  MathSciNet  Google Scholar 

  9. Dolgopyat, D.: On decay of correlations in Anosov flows. Ann. Math. 147, 357–390 (1998)

    Article  MATH  MathSciNet  Google Scholar 

  10. Ellison, W., Ellison, F.: Prime Numbers. Hermann, Paris (1985)

    MATH  Google Scholar 

  11. Flajolet, P.: Notes de DEA, personal communication

  12. Flajolet, P., Sedgewick, R.: Analytic Combinatorics. Book in preparation (1999). See also INRIA Research Reports 1888, 2026, 2376, 2956

  13. Finch, S.R.: Mathematical Constants. Cambridge University Press, Cambridge (2003)

    MATH  Google Scholar 

  14. Friesen, C., Hensley, D.: The statistics of continued fractions for polynomials over a finite field. Proc. Am. Math. Soc. 124(9), 2661–2673 (1996)

    Article  MATH  MathSciNet  Google Scholar 

  15. Heilbronn, H.: On the average length of a class of continued fractions. In: Turan, P. (ed.) Number Theory and Analysis, pp. 87–96. Plenum, New York (1969)

    Google Scholar 

  16. Hensley, D.: The number of steps in the Euclidean algorithm. J. Number Theory 49(2), 142–182 (1994)

    Article  MATH  MathSciNet  Google Scholar 

  17. Hwang, H.-K.: Théorèmes limite pour les structures combinatoires et les fonctions arithmétiques. PhD thesis, Ecole Polytechnique (Dec. 1994)

  18. Knopfmacher, J., Knopfmacher, A.: The exact length of the Euclidean algorithm in F q [X]. Mathematika 35, 297–304 (1988)

    Article  MATH  MathSciNet  Google Scholar 

  19. Lehmer, D.H.: Euclid’s algorithm for large numbers. Am. Math. Mon. 45, 227–233 (1938)

    Article  MATH  MathSciNet  Google Scholar 

  20. Lhote, L.: Computation of a Class of Continued Fraction Constants Proceedings of Alenex–ANALCO04, pp. 199–210

  21. Lhote, L., Vallée, B.: Sharp estimates for the main parameters of the Euclid algorithm. In: Proceedings of LATIN’06. Lecture Notes in Computer Science, vol. 3887, pp. 689–702. Springer, Berlin (2006)

    Google Scholar 

  22. Philipp, W.: Some metrical theorems in number theory II. Duke Math. J. 37, 447–488 (1970). Errata: Duke Math. J. 37, 788 (1970)

    Article  MathSciNet  Google Scholar 

  23. Ruelle, D.: Thermodynamic Formalism. Addison–Wesley, Reading (1978)

    MATH  Google Scholar 

  24. Schonhage, A.: Schnelle Berechnung von Kettenbruchentwicklungen. Acta Inform. pp. 139–144 (1971)

  25. Tenenbaum, G.: Introduction à la Théorie Analytique des Nombres, vol. 13. Institut Élie Cartan, Nancy (1990)

    MATH  Google Scholar 

  26. Vallée, B.: Opérateurs de Ruelle-Mayer généralisés et analyse en moyenne des algorithmes de Gauss et d’Euclide. Acta Arith. 81(2), 101–144 (1997)

    MATH  MathSciNet  Google Scholar 

  27. Vallée, B.: Digits and continuants in Euclidean algorithms. Ergodic versus Tauberian theorems. J. Théor. Nr. Bordx 12, 531–570 (2000)

    MATH  Google Scholar 

  28. Vallée, B.: Dynamical analysis of a class of Euclidean algorithms. Theor. Comput. Sci. 297(1-3), 447–486 (2003)

    Article  MATH  Google Scholar 

  29. Vallée, B.: Euclidean dynamics. Discrete Contin. Dyn. Syst. 15(1), 281–352 (2006)

    Article  MATH  MathSciNet  Google Scholar 

  30. Von Zur Gathen, J., Gerhard, J.: Modern Computer Algebra. Cambridge University Press, Cambridge (1999)

    MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Brigitte Vallée.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Lhote, L., Vallée, B. Gaussian Laws for the Main Parameters of the Euclid Algorithms. Algorithmica 50, 497–554 (2008). https://doi.org/10.1007/s00453-007-9009-6

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00453-007-9009-6

Keywords

Navigation