Jump to content

Jacobi symbol: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Line 101: Line 101:
</math>
</math>


This is because for ''a'' to be a residue (mod ''n'') it has to be a residue modulo ''every'' prime that divides ''n'' (by the [[Chinese remainder theorem]]), but the Jacobi symbol will equal one if ''a'' is a non-residue for zero, two or any even number of primes dividing ''n''.
This is because for ''a'' to be a residue (mod ''n'') it has to be a residue modulo ''every'' prime that divides ''n'' (by the [[Chinese remainder theorem]]), but the Jacobi symbol will equal one for example if ''a'' is a non-residue for exactly two of the primes which divide ''n''.


==Calculating the Jacobi symbol==
==Calculating the Jacobi symbol==

Revision as of 13:54, 9 December 2009

The Jacobi symbol is a generalization of the Legendre symbol. Introduced by Jacobi in 1837,[1] it is of theoretical interest in modular arithmetic and other branches of number theory, but its main use is in computational number theory, especially primality testing and integer factorization; these in turn are important in cryptography.

Definition

For any integer a and any positive odd integer n the Jacobi symbol is defined as the product of the Legendre symbols corresponding to the prime factors of n:


represents the Legendre symbol, defined for all integers a and all odd primes p by

Following the normal convention for the empty product,

Properties

These facts, even the reciprocity laws, are straightforward deductions from the definition of the Jacobi symbol and the corresponding properties of the Legendre symbol.[2]

Keep in mind that Jacobi symbols are only defined when the upper argument ("numerator") is an integer and the lower argument ("denominator") is a positive odd integer.

1)
2)
3)
4)
5)


The law of quadratic reciprocity: if m and n are odd positive integers, then

6)

and its supplements

7)
8)

Like the Legendre symbol,

But, unlike the Legendre symbol

This is because for a to be a residue (mod n) it has to be a residue modulo every prime that divides n (by the Chinese remainder theorem), but the Jacobi symbol will equal one for example if a is a non-residue for exactly two of the primes which divide n.

Calculating the Jacobi symbol

The above formulas lead to an efficient[3] algorithm for calculating the Jacobi symbol, analogous to the Euclidean algorithm for finding the GCD of two numbers. (This should not be surprising in light of rule 3)).

The "numerator" is reduced modulo the "denominator" using rule 2). Any multiples of 2 are pulled out using rule 4) and calculated using rule 8). The symbol is flipped using rule 6), and the algorithm recurses until the "numerator" is 1 (covered by rule 4)) or 2 (covered by rule 8)), or the "numerator" equals the "denominator" (rule 3)).

Example of calculations

The Legendre symbol is only defined for odd primes p. It obeys the same rules as the Jacobi symbol (i.e., reciprocity and the supplementary formulas for and and multiplicativity of the "numerator".)

Using the Legendre symbol

Using the Jacobi symbol

The difference between the two calculations is that when the Legendre symbol is used the "numerator" has to be factored into prime powers before the symbol is flipped. This makes the calculation using the Legendre symbol significantly slower than the one using the Jacobi symbol, as there is no known polynomial-time algorithm for factoring integers.[4] In fact, this is why Jacobi introduced the symbol.

Primality testing

There is another way the Jacobi and Legendre symbols differ. If the Euler criterion formula is used modulo a composite number, the result may or may not be the value of the Jacobi symbol.

So if it's not known whether a number n is prime or composite, we can pick a random number a, calculate the Jacobi symbol and compare it with Euler's formula; if they differ, n is composite; if they're the same for many different values of a, n is "probably prime".

This is the basis for the probabilistic Solovay–Strassen primality test and its refinement the Miller–Rabin primality test.

See also

Notes

  1. ^ C.G.J.Jacobi "Uber die Kreisteilung und ihre Anwendung auf die Zahlentheorie", Bericht Ak. Wiss. Berlin (1837) pp 127-136.
  2. ^ Almost any textbook on elementary or algebraic number theory, e.g. Ireland & Rosen pp. 56–57 or Lemmermeyer p. 10
  3. ^ Calculating requires operations. See Cohen, pp. 29–31
  4. ^ The number field sieve, the fastest known algorithm, requires operations to factor N. See Cohen, p. 495

References

  • Cohen, Henri (1993), A Course in Computational Algebraic Number Theory, Berlin: Springer, ISBN 3-540-55640-0
  • Ireland, Kenneth; Rosen, Michael (1990), A Classical Introduction to Modern Number Theory (Second edition), New York: Springer, ISBN 0-387-97329-X