Jump to content

Congruence of squares: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
m correctly formatted minus signs, added wikilinks
Add some general references. WP:INLINECITE TBD.
Line 59: Line 59:
== See also ==
== See also ==
*[[Congruence relation]]
*[[Congruence relation]]

== References ==
<!--{{reflist}}-->
{{refbegin}}
* {{cite book |first=David M. |last=Bressoud |authorlink=David Bressoud |title=Factorization and Primality Testing |chapter=8. The Quadratic Sieve |year=1989 |isbn=0-387-97040-1 |series=Undergraduate Texts in Mathematics |publisher=Springer-Verlag |url=https://ndl.ethernet.edu.et/bitstream/123456789/23097/1/David%20M.%20Bressoud.pdf#page=115}}
* {{cite book |first=Hans |last=Reisel |title=Prime Numbers and Computer Methods for Factorization |edition=2nd |series=Progress in Mathematics |volume=126 |year=1994 |isbn=0-8176-3743-5 |publisher=Birkhaüser}}
* {{cite book |first=Samuel S. Jr. |last=Wagstaff |authorlink=Samuel S. Wagstaff Jr. |title=The Joy of Factoring |publisher=[[American Mathematical Society]] |series=Student mathematical library |volume=68 |location=Providence, RI |year=2013 |isbn=1-4704-1048-6 |pages=195–202}}
{{refend}}


<!--== External links ==-->
<!--== External links ==-->

Revision as of 12:35, 9 January 2024

In number theory, a congruence of squares is a congruence commonly used in integer factorization algorithms.

Derivation

Given a positive integer n, Fermat's factorization method relies on finding numbers x and y satisfying the equality

We can then factor n = x2y2 = (x + y)(xy). This algorithm is slow in practice because we need to search many such numbers, and only a few satisfy the equation. However, n may also be factored if we can satisfy the weaker congruence of squares condition:

From here we easily deduce

This means that n divides the product (x + y)(xy). Thus (x + y) and (xy) each contain factors of n, but those factors can be trivial. In this case we need to find another x and y. Computing the greatest common divisors of (x + y, n) and of (x − y, n) will give us these factors; this can be done quickly using the Euclidean algorithm.

Congruences of squares are extremely useful in integer factorization algorithms and are extensively used in, for example, the quadratic sieve, general number field sieve, continued fraction factorization, and Dixon's factorization. Conversely, because finding square roots modulo a composite number turns out to be probabilistic polynomial-time equivalent to factoring that number, any integer factorization algorithm can be used efficiently to identify a congruence of squares.

Further generalizations

It is also possible to use factor bases to help find congruences of squares more quickly. Instead of looking for from the outset, we find many where the y have small prime factors, and try to multiply a few of these together to get a square on the right-hand side.

Examples

Factorize 35

We take n = 35 and find that

.

We thus factor as

Factorize 1649

Using n = 1649, as an example of finding a congruence of squares built up from the products of non-squares (see Dixon's factorization method), first we obtain several congruences

of these, two have only small primes as factors

and a combination of these has an even power of each small prime, and is therefore a square

yielding the congruence of squares

So using the values of 80 and 114 as our x and y gives factors

See also

References

  • Bressoud, David M. (1989). "8. The Quadratic Sieve". Factorization and Primality Testing (PDF). Undergraduate Texts in Mathematics. Springer-Verlag. ISBN 0-387-97040-1.
  • Reisel, Hans (1994). Prime Numbers and Computer Methods for Factorization. Progress in Mathematics. Vol. 126 (2nd ed.). Birkhaüser. ISBN 0-8176-3743-5.
  • Wagstaff, Samuel S. Jr. (2013). The Joy of Factoring. Student mathematical library. Vol. 68. Providence, RI: American Mathematical Society. pp. 195–202. ISBN 1-4704-1048-6.