Binary GCD Like Algorithms for Some Complex Quadratic Rings

  • Saurabh Agarwal
  • Gudmund Skovbjerg Frandsen
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3076)


On the lines of the binary gcd algorithm for rational integers, algorithms for computing the gcd are presented for the ring of integers in \(\mathbb{Q}(\sqrt{d})\) where d ∈ { − 2, − 7, − 11, − 19}. Thus a binary gcd like algorithm is presented for a unique factorization domain which is not Euclidean (case d=-19). Together with the earlier known binary gcd like algorithms for the ring of integers in \(\mathbb{Q}(\sqrt{-1})\) and \(\mathbb{Q}(\sqrt{-3})\), one now has binary gcd like algorithms for all complex quadratic Euclidean domains. The running time of our algorithms is O(n 2) in each ring. While there exists an O(n 2) algorithm for computing the gcd in quadratic number rings by Erich Kaltofen and Heinrich Rolletschek, it has large constants hidden under the big-oh notation and it is not practical for medium sized inputs. On the other hand our algorithms are quite fast and very simple to implement.


Algebraic Integer Coset Representative Number Ring Euclidean Algorithm Rational Integer 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Agarwal, S.: Binary gcd like algorithms in some number rings. Department of Computer Science, University of Aarhus (2004)Google Scholar
  2. 2.
    Bach, E., Shallit, J.: Algorithmic number theory. Foundations of Computing Series, vol. 1. MIT Press, Cambridge (1996)zbMATHGoogle Scholar
  3. 3.
    Cohen, H.: Hermite and Smith normal form algorithms over Dedekind domains. Math. Comp. 65(216), 1681–1699 (1996)zbMATHCrossRefMathSciNetGoogle Scholar
  4. 4.
    Collins, G.E.: A fast Euclidean algorithm for Gaussian integers. J. Symbolic Comput. 33(4), 385–392 (2002)zbMATHCrossRefMathSciNetGoogle Scholar
  5. 5.
    Damgård, I.B., Frandsen, G.S.: Efficient algorithms for gcd and cubic residuosity in the ring of Eisenstein integers. In: Lingas, A., Nilsson, B.J. (eds.) FCT 2003. LNCS, vol. 2751, pp. 109–117. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  6. 6.
    Hungerford, T.W.: Algebra. Graduate Texts in Mathematics, vol. 73. Springer, New York (1980); Reprint of the 1974 originalzbMATHGoogle Scholar
  7. 7.
    Ireland, K., Rosen, M.: A classical introduction to modern number theory, 2nd edn. Graduate Texts in Mathematics, vol. 84. Springer, New York (1990)zbMATHGoogle Scholar
  8. 8.
    Kaltofen, E., Rolletschek, H.: Computing greatest common divisors and factorizations in quadratic number fields. Math. Comp. 53(188), 697–720 (1989)zbMATHMathSciNetGoogle Scholar
  9. 9.
    Knuth, D.E.: The art of computer programming, 2nd edn., vol. 2. Addison-Wesley Publishing Co., Reading (1981)zbMATHGoogle Scholar
  10. 10.
    Lang, S.: Algebra, 3rd edn. Addison-Wesley Publishing Company, Reading (1993)zbMATHGoogle Scholar
  11. 11.
    Lehmer, D.H.: Euclid’s algorithm for large numbers.  45, 227–233 (1938)Google Scholar
  12. 12.
    Lemmermeyer, F.: The Euclidean algorithm in algebraic number fields. Exposition. Math. 13(5), 385–416 (1995); An updated version is available at the webpage, zbMATHMathSciNetGoogle Scholar
  13. 13.
    Lenstra Jr., H.W.: Euclid’s algorithm in cyclotomic fields. J. London Math. Soc (2) 10(4), 457–465 (1975)zbMATHCrossRefMathSciNetGoogle Scholar
  14. 14.
    Rolletschek, H.: On the number of divisions of the Euclidean algorithm applied to Gaussian integers. J. Symbolic Comput. 2(3), 261–291 (1986)zbMATHCrossRefMathSciNetGoogle Scholar
  15. 15.
    Scheidler, R., Williams, H.C.: A public-key cryptosystem utilizing cyclotomic fields. Des. Codes Cryptogr. 6(2), 117–131 (1995)zbMATHCrossRefMathSciNetGoogle Scholar
  16. 16.
    Schönhage, A.: Schnelle Berechnung von Kettenbruchentwilungen. Acta Informatica 1, 139–144 (1971)zbMATHCrossRefGoogle Scholar
  17. 17.
    Sorenson, J.: Two fast GCD algorithms. J. Algorithms 16(1), 110–144 (1994)zbMATHCrossRefMathSciNetGoogle Scholar
  18. 18.
    Stark, H.M.: A complete determination of the complex quadratic fields of classnumber one. Michigan Math. J. 14, 1–27 (1967)zbMATHCrossRefMathSciNetGoogle Scholar
  19. 19.
    Stein, J.: Computational problems associated with Racah algebra. J. Comput. Phys. (1), 397–405 (1967)Google Scholar
  20. 20.
    Weilert, A.: Effiziente Algorithmen zur Berechnung von Idealsummen in Quadratischen Ornungen. Dissertation, Universitaet Bonn (2000)Google Scholar
  21. 21.
    Weilert, A.: (1 + i)-ary GCD computation in Z[i] as an analogue to the binary GCD algorithm. J. Symbolic Comput. 30(5), 605–617 (2000)zbMATHCrossRefMathSciNetGoogle Scholar
  22. 22.
    Weilert, A.: Asymptotically fast GCD computation in Z[i]. In: Algorithmic number theory (Leiden, 2000). LNCS, vol. 1838, pp. 595–613. Springer, Berlin (2000)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2004

Authors and Affiliations

  • Saurabh Agarwal
    • 1
  • Gudmund Skovbjerg Frandsen
    • 1
  1. 1.BRICS, Department of Computer ScienceUniversity of AarhusAarhus NDenmark

Personalised recommendations