, Volume 5, Issue 1–4, pp 1–10 | Cite as

An improved parallel algorithm for integer GCD

  • Benny Chor
  • Oded Goldreich


We present a simple parallel algorithm for computing the greatest common divisor (gcd) of twon-bit integers in the Common version of the CRCW model of computation. The run-time of the algorithm in terms of bit operations isO(n/logn), usingn 1+ɛ processors, where ɛ is any positive constant. This improves on the algorithm of Kannan, Miller, and Rudolph, the only sublinear algorithm known previously, both in run time and in number of processors; they requireO(n log logn/logn),n 2 log2 n, respectively, in the same CRCW model.

We give an alternative implementation of our algorithm in the CREW model. Its run-time isO(n log logn/logn), usingn 1+ɛ processors. Both implementations can be modified to yield the extended gcd, within the same complexity bounds.

Key words

Greatest common divisor Parallel algorithms 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [1]
    Brent, R. P., and H. T. Kung, Systolic VLSI arrays for linear time gcd computation, inVLSI 83, IFIP, F. Anceau and E. J. Aas (eds.), pp. 145–154, Elsevier, Amsterdam, 1983.Google Scholar
  2. [2]
    Chandra, A. K., S. Fortune, and R. Lipton, Unbounded fan-in circuits and associative functions,Proceedings of the Fifteenth Annual Symposium on Theory of Computing, ACM, pp. 52–60, 1983.Google Scholar
  3. [3]
    Cole, S. N., Real-time computation byn-dimensional iterative arrays of finite-state machines,IEEE Transactions on Computers, Vol. 18 (1969), pp. 349–365.MATHCrossRefMathSciNetGoogle Scholar
  4. [4]
    Goldschlager, L., A unified approach to models of synchronous parallel machines,Journal of the Association for Computing Machinery, Vol. 29, No. 4 (1982), pp. 1073–1086.MATHMathSciNetGoogle Scholar
  5. [5]
    Kannan, R., G. Miller, and L. Rudolph, Sublinear parallel algorithm for computing the greatest common divisor of two integers,SIAM Journal on Computing, Vol. 16, No. 1 (1987), pp. 7–16.MATHCrossRefMathSciNetGoogle Scholar
  6. [6]
    Knuth, D.,The Art of Computer Programming, Vol. 2, second edition, Addison-Wesley, Reading, MA, 1981.MATHGoogle Scholar
  7. [7]
    Kucera, L., Parallel computation and conflicts in memory access,Information Processing Letters, Vol. 14, No. 2 (1982), pp. 93–96.MATHCrossRefMathSciNetGoogle Scholar
  8. [8]
    Ofman, Y., On the algorithmic complexity of discrete functions,Soviet Physics. Doklady, Vol. 7, No. 7 (1963), pp. 589–591.MathSciNetGoogle Scholar
  9. [9]
    Smith III, A. R., Cellular automata complexity trade-offs,Information and Control, Vol. 18 (1971), pp. 466–482.MATHCrossRefMathSciNetGoogle Scholar
  10. [10]
    Vishkin, U., Implementation of simultaneous memory access in models that forbid it, Technical Report No. 210, Department of Computer Science, Technion, Haifa, 1981.Google Scholar
  11. [11]
    Wallace, C. S., A suggestion for a fast multiplier,IEEE Transactions on Electronic Computers, (1964), pp. 14–17.Google Scholar

Copyright information

© Springer-Verlag New York Inc. 1990

Authors and Affiliations

  • Benny Chor
    • 1
  • Oded Goldreich
    • 1
  1. 1.Laboratory for Computer ScienceMassachusetts Institute of TechnologyCambridgeUSA

Personalised recommendations