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.

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

9.44. Implement Algorithm 9.5.19, with a view to proving that p =2 521 − 1<br />

is prime via the Lucas–Lehmer test. The idea is to maintain the peculiar,<br />

variable-base representation for everything, all through the primality test. (In<br />

other words, the output of Algorithm 9.5.19 is ready-made as input for a<br />

subsequent call to the algorithm.) For larger primes, such as the gargantuan<br />

new Mersenne prime discoveries, investigators have used run lengths such<br />

that q/D, the typical bit size of a variable-base digit, is roughly 16 bits or<br />

less. Again, this is to suppress as much as possible the floating-point errors.<br />

9.45. Implement Algorithm 9.5.17 to establish the character of various<br />

Fermat numbers, using the Pepin test, that Fn is prime if and only if<br />

3 (Fn−1)/2 ≡−1(modFn). Alternatively, the same algorithm can be used in<br />

factorization studies [Brent et al. 2000]. (Note: The balanced representation<br />

error reduction scheme mentioned in Exercise 9.55 also applies to this<br />

algorithm for arithmetic with Fermat numbers.) This method has been<br />

employed for the resolution of F22 in 1993 [Crandall et al. 1995] and F24<br />

[Crandall et al. 1999].<br />

9.46. Implement Algorithm 9.5.20 to perform large-integer multiplication<br />

via cyclic convolution of zero-padded signals. Can the DWT methods be<br />

applied to do negacyclic integer convolution via an appropriate CRT prime<br />

set?<br />

9.47. Show that if the arithmetic field is equipped with a cube root of<br />

unity, then for D = 3 · 2 k one can perform a length-D cyclic convolution<br />

by recombining three separate length-2 k convolutions. (See Exercise 9.43 and<br />

consider the symbolic factorization of t D − 1forsuchD.) This technique has<br />

actually been used by G. Woltman in the discovery of new Mersenne primes<br />

(he has employed IBDWTs of length 3 · 2 k ).<br />

9.48. Implement the ideas in [Percival 2003], where Algorithm 9.5.19 is<br />

generalized for arithmetic modulo Proth numbers k ·2n ±1. The essential idea<br />

is that working modulo a number a ± b can be done with good error control,<br />

as long as the prime product <br />

p|ab p is sufficiently small. In the Percival<br />

approach, one generalizes the variable-base representation of Theorem 9.5.18<br />

to involve products over prime powers in the form<br />

x =<br />

D−1 <br />

j=0<br />

xj<br />

<br />

p k a<br />

<br />

⌈kj/D⌉<br />

p<br />

q m b<br />

q ⌈−mj/D⌉+mj/D ,<br />

for fast arithmetic modulo a − b.<br />

Note that the marriage of such ideas with the fast mod operation of<br />

Algorithm 9.2.14 would result in an efficient union for computations that<br />

need to move away from the restricted theme of Mersenne/Fermat numbers.<br />

Indeed, as evidenced in the generalized Fermat number searches described in<br />

[Dubner and Gallot 2002], wedding bells have already sounded.

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

Saved successfully!

Ooh no, something went wrong!