请输入您要查询的字词:

 

单词 QuadraticSieve
释义

quadratic sieve


Algorithm

To factor a number n using the quadratic sieveMathworldPlanetmath, one seekstwo numbers x and y which are not congruent modulo nwith x not congruentMathworldPlanetmath to -y modulo n buthave x2y2(modn). If two such numbers are found,one can then say that (x+y)(x-y)0(modn). Then,x+y and x-y must have non-trivial factors in common with n.

The quadratic sieve method of factoring depends upon being ableto create a set of numbers whose factorization can be expressedas a productPlanetmathPlanetmath of pre-chosen primes. These factorizations arerecorded as vectors of the exponents. Once enough vectors arecollected to form a set which contains a linear dependence,this linear dependence is exploited to find two squares whichare equivalentMathworldPlanetmathPlanetmathPlanetmathPlanetmath modulo n.

To accomplish this, the quadratic sieve method uses a set ofprime numbersMathworldPlanetmath called a factor base. Then, it searches fornumbers which can be factored entirely within that factor base.If there are k prime numbers in the factor base, then eachnumber which can be factored within the factor base is storedas a k-dimensional vector where the i-th componentMathworldPlanetmathPlanetmathPlanetmath of thevector for y gives the exponent of the i-th prime from thefactor base in the factorization of y. For example, if thefactor base were {2,3,5,7,11,13}, thenthe number y=2332115 would be stored as thevector 3,2,0,0,5,0.

Once k+1 of these vectors have been collected, there must bea linear dependence among them. The k+1 vectors are takenmodulo 2 to form vectors in 2k. The linear dependenceamong them is used to find a combinationMathworldPlanetmathPlanetmath of the vectors whichsum up to the zero vectorMathworldPlanetmath in 2k. Summing these vectorsis equivalent to multiplying the y’s to which they correspond.And, the zero vector in 2k signals a perfect squareMathworldPlanetmath.

To factor n, chose a factor base 𝐁={p1,p2,,pk} such that 2𝐁 and for each oddprime pj in 𝐁, n is a quadratic residueMathworldPlanetmath of pj. Now,start picking xi near n and calculate yi=xi2-n. Clearly yixi2(modn). If yi can becompletely factored by numbers in 𝐁, then it is called𝐁-smooth. If it is not 𝐁-smooth, then discard xi andyi and move on to a new choice of xi. If it is 𝐁-smooth,then store xi, yi, and the vector of its exponents forthe primes in 𝐁. Also, record a copy of the exponent vectorwith each component taken modulo 2.

Once k+1 vectors have been recorded, there must be a lineardependence among them. Using the copies of the exponent vectorsthat were taken modulo 2, determine which ones can be addedtogether to form the zero vector. Multiply together the xithat correspond to those chosen vectors—call this x. Also,add together the original vectors that correspond to the chosenvectors to form a new vector v. Every component ofthis vector will be even. Divide each element of v by2. Form y=i=1kpivi.

Because each yixi2(modn), x2y2(modn). If xy(modn), then find some more 𝐁-smoothnumbers and try again. If x is not congruent to y modulon, then (x+y) and (x-y) are factors of n.

Example

Consider the number n=16843009 The integer nearest itssquare root is 4104. Given the factor base

𝐁={2,3,5,7,13}

, the first few 𝐁-smooth valuesof yi=f(xi)=xi2-n are:

Using x0=4241 and x1=4497, one obtains:

y0=1143072=25365072130
y1=3380000=25305470132

Which results in:

x=42414497=19071777
y=25335271131=1965600

From there:

gcd(x-y,n)=257
gcd(x+y,n)=65537

It may not be completely obvious why we required thatn be a quadratic residue of each pi in thefactor base 𝐁. One mightintuitively think that we actually want the pi tobe quadratic residues of n instead. But, that isnot the case.

We are trying to express n as:

(x+y)(x-y)=x2-y2=n

where

y=i=1kpivi

Because we end up squaring y, there is no reasonthat the pi would need to be quadratic residuesof n.

So, why do we require that n be a quadratic residueof each pi? We can rewrite the x2-y2=n as:

x2-i=1kpi2vi=n

If we take that expression modulo pi for any pifor which the corresponding vi is non-zero, we areleft with:

x2n(modpi)

Thus, in order for pi to show up in a usefulsolution, n must be a quadratic residue of pi.We would be wasting time and space to employ otherprimes in our factoring and linear combinationsMathworldPlanetmath.

随便看

 

数学辞典收录了18232条数学词条,基本涵盖了常用数学知识及数学英语单词词组的翻译及用法,是数学学习的有利工具。

 

Copyright © 2000-2023 Newdu.com.com All Rights Reserved
更新时间:2025/5/25 1:04:17