10.12.2012 Views

Prime Numbers

Prime Numbers

Prime Numbers

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6.1 The quadratic sieve factorization method 271<br />

Be that as it may, the large-prime variation does give us something that<br />

we did not have before. By allowing sieve reports of numbers that are close to<br />

the threshold for B-smoothness, but not quite there, we can discover numbers<br />

that have one slightly larger prime. In fact, if a number has all the primes<br />

up to B removed from its prime factorization, and the resulting number is<br />

smaller than B 2 , but larger than 1, then the resulting number must be a<br />

prime. It is this idea that is at work in the large-prime variation. Our sieve<br />

is not perfect, since we are using approximate logarithms and perhaps not<br />

sieving with small primes (see Section 3.2.5), but the added grayness does<br />

not matter much in the mass of numbers being considered. Some numbers<br />

with a large prime factor that might have been reported are possibly passed<br />

over, and some numbers are reported that should not have been, but neither<br />

problem is of great consequence.<br />

So if we can obtain these numbers with a large prime factor for free, how<br />

then can we process them in the linear algebra stage of the algorithm? In<br />

fact, we should not view the numbers with a large prime as having longer<br />

exponent vectors, since this could cause our matrix to be too large. There is<br />

a very cheap way to process these large prime reports. Simply sort them on<br />

the value of the large prime factor. If any large prime appears just once in<br />

the sorted list, then this number cannot possibly be used to make a square<br />

for us, so it is discarded. Say we have k reports with the same large prime:<br />

x 2 i − n = yiP ,fori =1, 2,...,k.Then<br />

(x1xi) 2 ≡ y1yiP 2 (mod n), for i =2,...,k.<br />

So when k ≥ 2 we can use the exponent vectors for the k − 1numbersy1yi,<br />

since the contribution of P 2 to the exponent vector, once it is reduced mod<br />

2, is 0. That is, duplicate large primes lead to exponent vectors on the primes<br />

up to B. Since it is very fast to sort a list, the creation of these new exponent<br />

vectors is like a gift from heaven.<br />

There is one penalty to using these new exponent vectors, though it has<br />

not proved to be a big one. The exponent vector for a y1yi as above is usually<br />

not as sparse as an exponent vector for a fully smooth report. Thus, the<br />

matrix techniques that take advantage of sparseness are somewhat hobbled.<br />

Again, this penalty is not severe, and every important implementation of the<br />

QS method uses the large-prime variation.<br />

One might wonder how likely it is to have a pair of large primes matching.<br />

That is, when we sort our list, could it be that there are very few matches,<br />

and that almost everything is discarded because it appears just once? The<br />

birthday paradox from probability theory suggests that matches will not be<br />

uncommon, once one has plenty of large prime reports. In fact the experience<br />

that factorers have is that the importance of the large prime reports is nil near<br />

the beginning of the run, because there are very few matches, but as the data<br />

set gets larger, the effect of the birthday paradox begins, and the matches for<br />

the large primes blossom and become a significant source of rows for the final<br />

matrix.

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

Saved successfully!

Ooh no, something went wrong!