Abstract
We present two new algorithms for computing the Jacobi Symbol: the right-shift and left-shift κ-ary algorithms. For inputs of at most n bits in length, both algorithms take O(n2/log n) time and O(n) space. This is asymptotically faster than the traditional algorithm, which is based in Euclid's algorithm for computing greatest common divisors. In practice, we found our new algorithms to be about two to three times faster for inputs of 100 to 1000 decimal digits in length.
We also present parallel versions of both algorithms for the CRCW PRAM. One version takes O ɛ (n/log log n) time using O(n 1+ɛ) processors, giving the first sublinear parallel algorithms for this problem, and the other version takes polylog time using a subexponential number of processors.
Keywords
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.
Computing equipment provided through a grant from the Holcomb Research Institute. A preliminary version of this paper was presented on November 3, 1995 at the AMS meeting at Kent State University, Kent, Ohio.
Supported by the Butler Summer Institute.
Supported by a Butler University Faculty Research Fellowship.
This is a preview of subscription content, log in via an institution.
Preview
Unable to display preview. Download preview PDF.
References
L. M. Adleman and K. Kompella. Using smoothness to achieve parallelism. In 20th Annual ACM Symposium on Theory of Computing, pages 528–538, 1988.
N. C. Ankeny. The least quadratic nonresidue. Annals of Mathematics 55 (1952) 65–72.
E. Bach. Explicit bounds for primality testing and related problems. Mathematics of Computation 55 (1990) 355–380.
E. Bach. A note on square roots in finite fields. IEEE Transactions on Information Theory 36 (1990).
E. Bach. Realistic analysis of some randomized algorithms. Journal of Computer and System Sciences 42(1) (1991) 30–53.
P. W. Beame, S. A. Cook, and H. J. Hoover. Log depth circuits for division and related problems. SIAM Journal on Computing 15 (1986) 994–1003.
A. K. Chandra, S. Fortune, and R. Lipton. Unbounded fan-in circuits and associative functions. Journal of Computer and System Sciences 30 (1985) 222–234.
B. Chor and O. Goldreich. An improved parallel algorithm for integer GCD. Algorithmica 5 (1990) 1–10.
R. Cole and U. Vishkin. Faster optimal parallel prefix sums and list ranking. Information and Control 81 (1989) 334–352.
G. E. Collins and R. G. K. Loos. The Jacobi symbol algorithm. SIGSAM Bulletin 16(1) (1982) 12–16.
F. Fich and M. Tompa. The parallel complexity of exponentiating polynomials over finite fields. Journal of the ACM 35(4) (1988) 651–667.
C. F. Gauss. Theorematis fundamentalis in doctrina de residuis quadraticis demonstrationes et ampliationes novae. In Werke, volume 2, pages 49–64. K. Gesellshaft der Wissenshaften, Göttingen, 1870.
R. Greenlaw, H. J. Hoover, and W. L. Ruzzo. Limits to Parallel Computation: P-Completeness Theory, Oxford University Press, 1995.
G. H. Hardy and E. M. Wright. An Introduction to the Theory of Numbers. Oxford University Press, 5th edition, 1979.
K. Ireland and M. Rosen. A Classical Introduction to Modern Number Theory. Springer-Verlag, New York, 1982.
T. Jebelean. A generalization of the binary GCD algorithm. In Proceedings of the ACM International Symposium on Symbolic and Algebraic Computation, pages 111–116, Kiev, 1993.
R. Kannan, G. Miller, and L. Rudolph. Sublinear parallel algorithm for computing the greatest common divisor of two integers. SIAM Journal on Computing 16(1) (1987) 7–16.
R. Karp and V. Ramachandran. Parallel algorithms for shared-memory machines. In J. van Leeuwen, editor, Algorithms and Complexity. Elsevier and MIT Press, 1990. Handbook of Theoretical Computer Science, volume A.
N. Koblitz. A Course in Number Theory and Cryptography. Springer-Verlag, New York, 1987.
K. S. McCurley. Odds and ends from cryptology and computational number theory. In Cryptology and Computational Number Theory [22], pages 145–166. American Mathematical Society, 1990.
R. Peralta. A simple and fast probabilistic algorithm for computing square roots modulo a prime number. IEEE Transactions on Information Theory 32(6) (1986) 846–847.
C. Pomerance, editor. Cryptology and Computational Number Theory, volume 42 of Proceedings of Symposia in Applied Mathematics. American Mathematical Society, Providence, Rhode Island, 1990.
J. H. Reif, editor. Synthesis of Parallel Algorithms. Morgan Kaufman, San Mateo, California, 1993.
J. H. Reif and S. R. Tate. Optimal size integer division circuits. In 21st Annual ACM Symposium on Theory of Computing, pages 264–273, 1989.
R. Scheidler and H. C. Williams. A public-key cryptosystem utilizing cyclotomic fields. Designs, Codes and Cryptography 6 (1995) 117–131.
A. Schönhage. Schnelle Berechnung von Kettenbruchentwicklungen. Acta Informatica 1 (1971) 139–144.
A. Schönhage and V. Strassen. Schnelle Multiplikation großer Zahlen. Computing 7 (1971) 281–292.
J. Shallit. On the worst case of three algorithms for computing the Jacobi symbol. Journal of Symbolic Computation 10 (1990) 593–610.
J. Shallit and J. Sorenson. A binary algorithm for the Jacobi symbol. SIGSAM Bulletin 27(1) (1993) 4–11.
J. Shallit and J. Sorenson. Analysis of a left-shift binary GCD algorithm. Journal of Symbolic Computation 17 (1994) 473–486.
J. O. Shallit and M. O. Rabin. Randomized algorithms in number theory. Commun. Pure Appl. Math. 39 (1986) 239–256.
R. Solovay and V. Strassen. A fast Monte Carlo test for primality. SIAM Journal on Computing 6 (1977) 84–85. Erratum in 7 (1978) 118.
J. Sorenson. Two fast GCD algorithms. Journal of Algorithms 16 (1994) 110–144.
J. Sorenson. An analysis of Lehmer's Euclidean GCD algorithm. In Proceedings of the ACM International Symposium on Symbolic and Algebraic Computation, pages 254–258, Montréal, Canada, 1995.
U. Vishkin. Advanced parallel prefix-sums, list ranking and connectivity. In Synthesis of Parallel Algorithms[23], pages 215–257. Morgan Kaufman, San Mateo, California, 1993.
K. Weber. The accelerated integer GCD algorithm. ACM Transactions on Mathematical Software 21(1) (1995) 111–122.
H. C. Williams. A modification of the RSA public-key encryption procedure. IEEE Transactions on Information Theory 26(6) (1980) 358–368.
H. C. Williams. An m3 public-key encryption scheme. In Advances in Cryptology — CRYPTO'85 Proceedings, Berlin, 1986. Springer-Verlag.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1996 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Meyer, S.M., Sorenson, J.P. (1996). Efficient algorithms for computing the Jacobi symbol. In: Cohen, H. (eds) Algorithmic Number Theory. ANTS 1996. Lecture Notes in Computer Science, vol 1122. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-61581-4_58
Download citation
DOI: https://doi.org/10.1007/3-540-61581-4_58
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-61581-1
Online ISBN: 978-3-540-70632-8
eBook Packages: Springer Book Archive