10.12.2012 Views

Prime Numbers

Prime Numbers

Prime Numbers

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

274 Chapter 6 SUBEXPONENTIAL FACTORING ALGORITHMS<br />

for x to be precisely the interval [−M,M]. Note that the largest value of f(x)<br />

on this interval is at the endpoints, where the value is about (a 2 M 2 − n)/a,<br />

and the least value is at x = 0, being there about −n/a. Let us set the absolute<br />

values of these two expressions approximately equal to each other, giving the<br />

approximate equation a 2 M 2 ≈ 2n, sothata ≈ √ 2n/M.<br />

If a satisfies this approximate equality, then the absolute value of f(x) on<br />

the interval [−M,M] is bounded by (M/ √ 2) √ n. This should be compared<br />

with the original polynomial x 2 − n used in the basic QS method. On the<br />

interval [ √ n − M, √ n + M], the values are bounded by approximately 2M √ n.<br />

So we have saved a factor 2 √ 2 in size. But we have saved much more than that.<br />

In the basic QS method the values continue to grow, we cannot stop at a preset<br />

value M. But when we use a family of polynomials, we can continually change.<br />

Roughly, using the analysis of Section 6.1.1, we can choose M = B = L(n) 1/2<br />

when we use multiple polynomials, but must choose M = B 2 = L(n) when<br />

we use only one polynomial. So the numbers that “would be smooth” using<br />

multiple polynomials are smaller on average by a factor B. A heuristic analysis<br />

shows that using multiple polynomials speeds up the quadratic sieve method<br />

by roughly a factor 1<br />

√<br />

ln n ln ln n. Whennis about 100 digits, this gives a<br />

2<br />

savings of about a factor 17; that is, QS with multiple polynomials runs about<br />

17 times as fast as the basic QS method. (This “thought experiment” has not<br />

been numerically verified, though there can be no doubt that using multiple<br />

polynomials is considerably faster in practice.)<br />

However, there is one last requirement for the leading coefficient a: We<br />

need to find values of b, c to go along with it. If we can solve b2 ≡ n (mod a)<br />

for b, then we can ensure that |b| ≤a/2, and we can let c =(b2− n)/a.<br />

Note that the methods of Section 2.3.2 will allow us to solve the congruence<br />

provided that we choose a such that a is odd, we know the prime factorization<br />

of a, and for each prime p|a, wehave <br />

n<br />

p = 1. One effective way to do this is<br />

to take various primes p ≈ (2n) 1/4 /M 1/2 ,with <br />

n<br />

2<br />

p =1,andchoosea = p .<br />

Then such values of a meet all the criteria we have set for them:<br />

(1) We have a equal to a square times a B-smooth number.<br />

(2) We have a ≈ √ 2n/M.<br />

(3) We can efficiently solve b 2 ≡ n (mod a) forb.<br />

The congruence b 2 ≡ n (mod a) has two solutions, if we take a = p 2 as<br />

above. However, the two solutions lead to equivalent polynomials, so we use<br />

only one of the solutions, say the one with 0

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!