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.

508 Chapter 9 FAST ALGORITHMS FOR LARGE-INTEGER ARITHMETIC<br />

Algorithm optimal B complexity<br />

Basic FFT, fixed-base ... Oop(D ln D)<br />

Basic FFT, variable-base O(ln n) O(n(C ln n)(C ln ln n) ...)<br />

Schönhage O(n 1/2 ) O(n ln n ln ln n)<br />

Nussbaumer O(n/ ln n) O(n ln n ln ln n)<br />

Table 9.1 Complexities for fast multiplication algorithms. Operands to be<br />

multiplied have n bits each, which during top recursion level are split into D = n/b<br />

digits of b bits each, so the digit size (the base) is B =2 b . All bounds are for bit<br />

complexity, except that Oop means operation complexity.<br />

9.5.9 Application to the Chinese remainder theorem<br />

We described the Chinese remainder theorem in Section 2.1.3, and there<br />

gave a method, Algorithm 2.1.7, for reassembling CRT data given some<br />

precomputation. We now describe a method that not only takes advantage<br />

of preconditioning, but also fast multiplication methods.<br />

Algorithm 9.5.26 (Fast CRT reconstruction with preconditioning).<br />

Using the nomenclature of Theorem 2.1.6, we assume fixed moduli m0,...,mr−1<br />

whose product is M, but with r =2 k for computational convenience. The goal<br />

of the algorithm is to reconstruct n from its given residues (ni). Along the way,<br />

tableaux (qij) of partial products and (nij) of partial residues are calculated. The<br />

algorithm may be reentered with a new n if the mi remain fixed.<br />

1. [Precomputation]<br />

for(0 ≤ i

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

Saved successfully!

Ooh no, something went wrong!