Prime Numbers
Prime Numbers Prime Numbers
9.7 Exercises 529 9.49. In the FFT literature there exists an especially efficient real-signal transform called the Sorenson FFT. This is a split-radix transform that uses √ 2 and a special decimation scheme to achieve essentially the lowestcomplexity FFT known for real signals; although in modern times the issues of memory, machine cache, and processor features are so overwhelming that sheer complexity counts have fallen to a lesser status. Now, for the ring Zn with n =2 m + 1 and m a multiple of 4, show that a square root of 2 is given by √ 2=2 3m/4 − 2 m/4 . Then, determine whether a Sorenson transform modulo n canbedonesimply by using what is now the standard Sorenson routine but with √ 2 interpreted as above. (Detailed coding for a Sorenson real-signal FFT is found in [Crandall 1994b].) 9.50. Study the transform that has the usual DFT form Xk = N−1 j=0 xjh −jk , except that the signal elements xj and the root h of order N exist in the field Q √ 5 . This has been called a number-theoretical transform (NTT) over the “golden section quadratic field,” because the golden mean φ = √ 5 − 1 /2 is in the field. Assume that we restrict further to the ring Z[φ] so that the signal elements and the root are of the form a + bφ with a, b integers. Argue first that a multiplication √ in the domain takes three integer multiplies. Then consider the field Fp 5 and work out a theory for the possible length of such transforms over that field, when the root is taken to be a power of the golden mean φ. Then, consider the transform (N is even) Xk = N/2−1 j=0 H −jk xj where the new signal vector is xj =(aj,bj) and where the original signal component was xj = aj + bjφ in the field. Here, the matrix H is 1 H = 1 1 . 0 Describe in what sense this matrix transform is equivalent to the DFT definition preceding, that the powers of H are given conveniently in terms of Fibonacci numbers H n Fn+1 Fn = , Fn Fn−1 and that this n-th power can be computed in divide-and-conquer fashion in O(ln n) matrix multiplications. In conclusion, derive the complexity of this matrix-based number-theoretical transform.
530 Chapter 9 FAST ALGORITHMS FOR LARGE-INTEGER ARITHMETIC This example of exotic transforms, being reminiscent of the discrete Galois transform (DGT) of the text, appears in [Dimitrov et al. 1995], [Dimitrov et al. 1998], and has actually been proposed as an idea for obtaining meaningful spectra—in a discrete field, no less—of real-valued, real-world data. 9.51. Pursuant to Algorithm 9.5.22 for cyclic convolution, work out a similar algorithm for negacyclic integer convolution via a combined DGT/DWT method, with halved run length, meaning you want to convolve two real integer sequences each of length D, via a complex DGT of length D/2. You would need to establish, for a relevant weighted convolution of length D/2, a (D/2)-th root of i in a field F p 2 with p a Mersenne prime. Details that may help in such an implementation can be found in [Crandall 1997b]. 9.52. Study the so-called Fermat number transform (FNT) defined by Xk = D−1 j=0 xjg −jk (mod fn), where fn =2 n + 1 and g has multiplicative order D in Zn. A useful choice is g a power of two, in which case, what are the allowed signal lengths D? The FNT has the advantage that the internal butterflies of a fast implementation involve multiply-free arithmetic, but the distinct disadvantage of restricted signal lengths. A particular question is: Are there useful applications of the FNT in computational number theory, other than the appearance in the Schönhage Algorithm 9.5.23? 9.53. In such as Algorithm 9.5.7 one may wish to invoke an efficient transpose. This is not hard to do if the matrix is square, but otherwise, the problem is nontrivial. Note that the problem is again trivial, for any matrix, if one is allowed to copy the original matrix, then write it back in transpose order. However this can involve long memory jumps, which are not necessary, as well as all the memory for the copy. So, work out an algorithm for a general in-place transpose, that is, no matrix copy allowed, trying to keep everything as “local” as possible, meaning you want in some sense minimal memory jumps. Some references are [Van Loan 1992], [Bailey 1990]. 9.54. By analyzing the respective complexities of the steps of Algorithm 9.5.8, (1) show that the complexity claim of the text holds for calculating X ′ k ; (2) give more precise information about the implied big-O constant in the bound 9.24; and (3) prove the inequality (9.25); and 4) explain how the inequality leads to the claimed complexity estimate for the algorithm. The interested reader might investigate/improve on the clever aspect of the original Dutt–Rokhlin method, which was to expand an oscillation eicz in a Gaussian series [Dutt and Rokhlin 1993]. There have 9.55. Rewrite Algorithm 9.5.12 to employ balanced-digit representation (Definition 9.1.2). Note that the important changes center on the carry
- Page 488 and 489: 9.5 Large-integer multiplication 47
- Page 490 and 491: 9.5 Large-integer multiplication 48
- Page 492 and 493: 9.5 Large-integer multiplication 48
- Page 494 and 495: 9.5 Large-integer multiplication 48
- Page 496 and 497: 9.5 Large-integer multiplication 48
- Page 498 and 499: 9.5 Large-integer multiplication 48
- Page 500 and 501: 9.5 Large-integer multiplication 49
- Page 502 and 503: 9.5 Large-integer multiplication 49
- Page 504 and 505: 9.5 Large-integer multiplication 49
- Page 506 and 507: 9.5 Large-integer multiplication 49
- Page 508 and 509: 9.5 Large-integer multiplication 49
- Page 510 and 511: 9.5 Large-integer multiplication 50
- Page 512 and 513: 9.5 Large-integer multiplication 50
- Page 514 and 515: 9.5 Large-integer multiplication 50
- Page 516 and 517: 9.5 Large-integer multiplication 50
- Page 518 and 519: 9.6 Polynomial arithmetic 509 can i
- Page 520 and 521: 9.6 Polynomial arithmetic 511 Incid
- Page 522 and 523: 9.6 Polynomial arithmetic 513 where
- Page 524 and 525: 9.6 Polynomial arithmetic 515 such
- Page 526 and 527: 9.6 Polynomial arithmetic 517 Note
- Page 528 and 529: 9.7 Exercises 519 (3) Write out com
- Page 530 and 531: 9.7 Exercises 521 where “do” si
- Page 532 and 533: 9.7 Exercises 523 9.23. How general
- Page 534 and 535: 9.7 Exercises 525 two (and thus, me
- Page 536 and 537: 9.7 Exercises 527 0 2 +3 2 +0 2 is
- Page 540 and 541: 9.7 Exercises 531 adjustment step.
- Page 542 and 543: 9.7 Exercises 533 9.69. Implement A
- Page 544 and 545: 9.8 Research problems 535 less than
- Page 546 and 547: 9.8 Research problems 537 1.66), na
- Page 548 and 549: 9.8 Research problems 539 9.82. A c
- Page 550 and 551: 542 Appendix BOOK PSEUDOCODE Becaus
- Page 552 and 553: 544 Appendix BOOK PSEUDOCODE } ...;
- Page 554 and 555: 546 Appendix BOOK PSEUDOCODE Functi
- Page 556 and 557: 548 REFERENCES [Apostol 1986] T. Ap
- Page 558 and 559: 550 REFERENCES [Bernstein 2004b] D.
- Page 560 and 561: 552 REFERENCES [Buchmann et al. 199
- Page 562 and 563: 554 REFERENCES [Crandall 1997b] R.
- Page 564 and 565: 556 REFERENCES [Dudon 1987] J. Dudo
- Page 566 and 567: 558 REFERENCES [Goldwasser and Kili
- Page 568 and 569: 560 REFERENCES [Joe 1999] S. Joe. A
- Page 570 and 571: 562 REFERENCES [Lenstra 1981] H. Le
- Page 572 and 573: 564 REFERENCES [Montgomery 1987] P.
- Page 574 and 575: 566 REFERENCES [Oesterlé 1985] J.
- Page 576 and 577: 568 REFERENCES [Pomerance et al. 19
- Page 578 and 579: 570 REFERENCES [Schönhage and Stra
- Page 580 and 581: 572 REFERENCES [Sun and Sun 1992] Z
- Page 582 and 583: 574 REFERENCES [Weisstein 2005] E.
- Page 584 and 585: Index ABC conjecture, 417, 434 abel
- Page 586 and 587: INDEX 579 Catalan problem, ix, 415,
9.7 Exercises 529<br />
9.49. In the FFT literature there exists an especially efficient real-signal<br />
transform called the Sorenson FFT. This is a split-radix transform that<br />
uses √ 2 and a special decimation scheme to achieve essentially the lowestcomplexity<br />
FFT known for real signals; although in modern times the issues<br />
of memory, machine cache, and processor features are so overwhelming that<br />
sheer complexity counts have fallen to a lesser status. Now, for the ring Zn<br />
with n =2 m + 1 and m a multiple of 4, show that a square root of 2 is given<br />
by √ 2=2 3m/4 − 2 m/4 .<br />
Then, determine whether a Sorenson transform modulo n canbedonesimply<br />
by using what is now the standard Sorenson routine but with √ 2 interpreted<br />
as above. (Detailed coding for a Sorenson real-signal FFT is found in [Crandall<br />
1994b].)<br />
9.50. Study the transform that has the usual DFT form<br />
Xk =<br />
N−1 <br />
j=0<br />
xjh −jk ,<br />
except that the signal elements xj and the root h of order N exist in the field<br />
Q √ 5 . This has been called a number-theoretical transform (NTT) over the<br />
“golden section quadratic field,” because the golden mean φ = √ 5 − 1 /2<br />
is in the field. Assume that we restrict further to the ring Z[φ] so that the<br />
signal elements and the root are of the form a + bφ with a, b integers. Argue<br />
first that a multiplication √ in the domain takes three integer multiplies. Then<br />
consider the field Fp 5 and work out a theory for the possible length of<br />
such transforms over that field, when the root is taken to be a power of the<br />
golden mean φ. Then, consider the transform (N is even)<br />
Xk =<br />
N/2−1 <br />
j=0<br />
H −jk xj<br />
where the new signal vector is xj =(aj,bj) and where the original signal<br />
component was xj = aj + bjφ in the field. Here, the matrix H is<br />
<br />
1<br />
H =<br />
1<br />
<br />
1<br />
.<br />
0<br />
Describe in what sense this matrix transform is equivalent to the DFT<br />
definition preceding, that the powers of H are given conveniently in terms<br />
of Fibonacci numbers<br />
H n <br />
Fn+1 Fn<br />
=<br />
,<br />
Fn<br />
Fn−1<br />
and that this n-th power can be computed in divide-and-conquer fashion in<br />
O(ln n) matrix multiplications. In conclusion, derive the complexity of this<br />
matrix-based number-theoretical transform.