|
|
Line 1: |
Line 1: |
| {{Unreferenced|date=December 2009}}
| | I am Oscar and I completely dig that name. Doing ceramics is what adore doing. Minnesota is exactly where he's been living for years. Hiring is her working day job now and she will not alter it whenever quickly.<br><br>Here is my blog post :: healthy food delivery ([http://Ftagn.fr/dietmeals23439 click through the following article]) |
| In [[number theory]], a '''congruence of squares''' is a [[congruence relation|congruence]] commonly used in [[integer factorization]] algorithms.
| |
| | |
| ==Derivation==
| |
| Given a positive [[integer]] ''n'', [[Fermat's factorization method]] relies on finding numbers ''x'', ''y'' satisfying the [[equation|equality]]
| |
| | |
| :<math>x^2 - y^2 = n\,\!</math>
| |
| | |
| We can then factor ''n'' = ''x''<sup>2</sup> - ''y''<sup>2</sup> = (''x'' + ''y'')(''x'' - ''y''). This algorithm is slow in practice because we need to search many such numbers, and only a few satisfy the strict equation. However, ''n'' may also be factored if we can satisfy the weaker '''congruence of squares''' condition:
| |
| | |
| :<math>x^2 \equiv y^2 \pmod{n} \hbox{ , } x \not\equiv \pm y \pmod{n}</math>.
| |
| | |
| From here we easily deduce
| |
| :<math>x^2 - y^2 \equiv 0 \pmod{n} \hbox{ , } (x + y)(x - y) \equiv 0 \pmod{n}</math>
| |
| | |
| This means that ''n'' divides the product (''x'' + ''y'') (''x'' - ''y''), but since we also require ''x'' ≠ ±''y'' (mod ''n''), ''n'' divides neither (x+y) nor (x−y) alone. Thus (''x'' + ''y'') and (''x'' − ''y'') each contain proper factors of ''n''. Computing the [[greatest common divisor]]s 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 method|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 base]]s to help find congruences of squares more quickly. Instead of looking for <math>\textstyle x^2 \equiv y^2 \pmod{n}</math> from the outset, we find many <math>\textstyle x^2 \equiv y \pmod{n}</math> 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
| |
| | |
| :<math>\textstyle 6^2 = 36 \equiv 1 \equiv 1^2 \pmod{n}</math>. | |
| | |
| We thus factor as
| |
| | |
| :<math>(\gcd[6-1,35])\cdot(\gcd[6+1,35]) = (5)\cdot(7) = 35.</math> | |
| | |
| ===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
| |
| | |
| :<math> 41^2 \equiv 32 : 42^2 \equiv 115 : 43^2 \equiv 200 \pmod{1649},</math>
| |
| | |
| of these, two have only small primes as factors
| |
| | |
| :<math> 32 = 2^5 : 200 = (2^3)\cdot(5^2),</math>
| |
| | |
| and a combination of these has an even power of each small prime, and is therefore a square
| |
| | |
| :<math> (32)\cdot(200) = (2^{5+3})\cdot(5^2) = ((2^4)\cdot(5))^2 = 80^2</math>
| |
| | |
| yielding the congruence of squares
| |
| | |
| :<math>(32)\cdot(200) = 80^2 \equiv (41^2)\cdot(43^2) \equiv 114^2 \pmod{1649}</math>
| |
| | |
| So using the values of 80 and 114 as our ''x'' and ''y'' gives factors
| |
| | |
| :<math>(\gcd[114-80,1649])\cdot(\gcd[114+80,1649]) = (17)\cdot(97) = 1649.</math>
| |
| | |
| == See also ==
| |
| *[[Congruence relation]]
| |
| | |
| <!--== External links ==-->
| |
| | |
| {{DEFAULTSORT:Congruence Of Squares}}
| |
| [[Category:Modular arithmetic]]
| |
| [[Category:Integer factorization algorithms]]
| |
I am Oscar and I completely dig that name. Doing ceramics is what adore doing. Minnesota is exactly where he's been living for years. Hiring is her working day job now and she will not alter it whenever quickly.
Here is my blog post :: healthy food delivery (click through the following article)