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.

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

Whatever method used for polynomial gcd, the fast polynomial remaindering<br />

scheme of this section can be applied as desired for the internal polynomial<br />

mod operations.<br />

9.6.3 Polynomial evaluation<br />

We next discuss polynomial evaluation techniques. The essential problem is<br />

to evaluate a polynomial x(t) = D−1 j=0 xjtj at, say, each of n field values<br />

t0,...,tn−1. It turns out that the entire sequence (x(t0),x(t1),...,x(tn−1))<br />

canbeevaluatedin<br />

O n ln 2 min{n, D} <br />

field operations. We shall split the problem into three basic cases:<br />

(1) The arguments t0,...,tn−1 lie in arithmetic progression.<br />

(2) The arguments t0,...,tn−1 lie in geometric progression.<br />

(3) The arguments t0,...,tn−1 are arbitrary.<br />

Of course, case (3) covers the other two, but in (1), (2) it can happen that<br />

special enhancements apply.<br />

Algorithm 9.6.5 (Evaluation of polynomial on arithmetic progression).<br />

Let x(t) = D−1 j=0 xjtj . This algorithm returns the n evaluations x(a),x(a +<br />

d),x(a +2d),...,x(a +(n− 1)d). (The method attains its best efficiency when<br />

n is much greater than D.)<br />

1. [Evaluate at first D points]<br />

for(0 ≤ j

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

Saved successfully!

Ooh no, something went wrong!