ebooksgratis.com

See also ebooksgratis.com: no banners, no cookies, totally FREE.

CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
Privacy Policy Cookie Policy Terms and Conditions
Rational sieve - Wikipedia, the free encyclopedia

Rational sieve

From Wikipedia, the free encyclopedia

In mathematics, the rational sieve is a general algorithm for factoring integers into prime factors. It is essentially a special case of the general number field sieve, and while it is far less efficient than the general algorithm, it is conceptually far simpler. So while it is rather useless as a practical factoring algorithm, it is a helpful first step for those trying to understand how the general number field sieve works.

Contents

[edit] Method

Suppose we are trying to factor the composite number n. We choose a bound B, and identify the factor base (which we will call P) consisting of all primes smaller than B. Next, we search for positive integers z such that both z and z+n are B-smooth -- i.e. all of their prime factors are less than or equal to B. We can therefore write, for suitable ak,

z=\prod_{p_i\in P} p_i^{a_i}

and likewise, for suitable bk, we have

z+n=\prod_{p_i\in P} p_i^{b_i}.

But z and z + n are congruent modulo n, and so each such integer z that we find yields a multiplicative relation (mod n) among the elements of P, i.e.

\prod_{p_i\in P} p_i^{a_i} \equiv \prod_{p_i\in P} p_i^{b_i} \; \operatorname{(mod} \; n \operatorname{)}

(where the ai and bi are nonnegative integers.)


When we have generated enough of these relations (it's generally sufficient that the number of relations be a few more than the size of P), we can use the methods of linear algebra to multiply together these various relations in such a way that the exponents of the primes are all even. This will give us a congruence of squares of the form a2≡b2 (mod n), which can be turned into a factorization of n, n=gcd(a-b,n)×gcd(a+b,n). This factorization might turn out to be trivial (i.e. n=n×1), in which case we have to try again with a different combination of relations; but with luck we will get a nontrivial factorization of n, and the algorithm will terminate.

[edit] Example

We will factor the integer n = 35 using the rational sieve. We'll arbitrarily try the value B=19, giving the factor base P={2,3,11,13,17,19}. (We cannot include 5 and 7 since they are actually factors of 35, which renders the algorithm unusable. Of course, if we already know the factors, we do not need to do the algorithm, but we will anyway to show that the algorithm works, i.e. for demonstration purposes.) Next, we search for values of z -- the first few are 1, 3, 4, 9, 13, 19, and 22, and we can stop there. The seven values of z give seven multiplicative relations (mod 35):

  • 2030110130190 = 1 ≡ 36 = 2232110130190.............(1)
  • 2031110130190 = 3 ≡ 38 = 2130110130191.............(2)
  • 2230110130190 = 4 ≡ 39 = 2031110131190.............(3)
  • 2032110130190 = 9 ≡ 44 = 2230111130190.............(4)
  • 2030110131190 = 13 ≡ 48 = 2431110130190.............(5)
  • 2030110130191 = 19 ≡ 54 = 2133110130190.............(6)
  • 2130111130190 = 22 ≡ 57 = 2031110130191.............(7)


There are now several essentially different ways to combine these and end up with even exponents:

  • (2)×(4)×(7): After multiplying these and canceling out common factors (which we can do since they are coprime with n),[1] this reduces to 32 ≡ 22192, or 32 ≡ 382. The resulting factorization is 35 = gcd(38-3,35) × gcd(38+3,35) = 35×1. The trivial factorization; try again.
  • (1): This says 62 ≡ 12, which gives the factorization 35 = gcd(6-1,35) × gcd(6+1,35) = 5×7. Success!


Note that there were still other combinations we did not need to use, such as (3)×(5) and (2)×(6).

[edit] Limitations of the algorithm

The rational sieve, like the general number field sieve, cannot factor numbers of the form pm, where p is a prime and m is an integer. This is not a huge problem, though -- such numbers are statistically rare, and moreover there is a simple and fast process to check whether a given number is of this form.

The bigger problem is finding a sufficient number of z such that both z and z+n are B-smooth. For any given B, the proportion of numbers that are B-smooth decreases rapidly with the size of the number. So if n is large (say, a hundred digits), it will be difficult or impossible to find enough z for the algorithm to work. The advantage of the general number field sieve is that one need only search for smooth numbers of order n1/d for some positive integer d (typically 3 or 5), rather than of order n as required here.

[edit] References

  • A. K. Lenstra, H. W. Lenstra, Jr., M. S. Manasse, and J. M. Pollard, The Factorization of the Ninth Fermat Number, Math. Comp. 61 (1993), 319-349. A draft is available at www.std.org/~msm/common/f9paper.ps.
  • A. K. Lenstra, H. W. Lenstra, Jr. (eds.) The Development of the Number Field Sieve, Lecture Notes in Mathematics 1554, Springer-Verlag, New York, 1993.

[edit] Footnotes

  1. ^ Note that common factors cannot in general be canceled in a congruence, but they can in this case, since the primes of the factor base are all required to be coprime to n, as mentioned above. See modular multiplicative inverse.


aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -