Prime Numbers
Prime Numbers Prime Numbers
9.8 Research problems 539 9.82. A certain prime suggested in [Craig-Wood 1998], namely p =2 64 − 2 32 +1, has advantageous properties in regard to CRT-based convolution. Investigate some of these advantages, for example by stating the possible signal lengths for number-theoretical transforms modulo p, exhibiting a small-magnitude element of order 64 (such elements might figure well into certain FFT structures), and so on. 9.83. Here is a surprising result: Length-8 cyclic convolution modulo a Mersenne prime can be done via only eleven multiplies. It is surprising because the Winograd bound would be 2 · 8 − 4 = 12 multiplies, as in Exercise 9.39. Of course, the resolution of this paradox is that the Mersenne mod changes the problem slightly. To reveal the phenomenon, first establish the existence of an 8-th root of unity in F p 2,withp being a Mersenne prime and the root being symbolically simple enough that DGTs can be performed without explicit integer multiplications. Then consider the length-8 DGT, used to cyclically convolve two integer signals x, y. Next, argue that the transforms X, Y have sufficient symmetry that the dyadic product X ∗Y requires two real multiplies and three complex multiplies. This is the requisite count of 11 muls. An open question is: Are there similar “violations” of the Winograd bound for lengths greater than eight? 9.84. Study the interesting observations of [Yagle 1995], who notes that matrix multiplication involving n×n matrices can be effected via a convolution of length n 3 . This is not especially surprising, since we cannot do an arbitrary length-n convolution faster than O(n ln n) operations. However, Yagle saw that the indicated convolution is sparse, and this leads to interesting developments, touching, even, on number-theoretical transforms.
Appendix BOOK PSEUDOCODE All algorithms in this book are written in a particular pseudocode form describable, perhaps, as a “fusion of English and C languages.” The motivations for our particular pseudocode design have been summarized in the Preface, where we have indicated our hope that this “mix” will enable all readers to understand, and programmers to code, the algorithms. Also in the Preface we indicated a network source for Mathematica implementations of the book algorithms. That having been said, the purpose of this Appendix is to provide not a rigorous compendium of instruction definitions, for that would require something like an entire treatise on syntactical rules as would be expected to appear in an off-the-shelf C reference. Instead, we give below some explicit examples of how certain pseudocode statements are to be interpreted. English, and comments For the more complicated mathematical manipulations within pseudocode, we elect for English description. Our basic technical motivation for allowing “English” pseudocode at certain junctures is evident in the following example. A statement in the C language if((n== floor(n)) && (j == floor(sqrt(j))*floor(sqrt(j)))) ..., which really means “if n is an integer and j is a square,” we might have cast in this book as if(n, √ j ∈ Z) ... That is, we have endeavored to put “chalkboard mathematics” within conditionals. We have also adopted a particular indentation paradigm. If we had allowed (which we have not) such English as: For all pseudoprimes in S, apply equation (X); Apply equation (Y); then, to the aspiring programmer, it might be ambiguous whether equation (Y) were to be applied for all pseudoprimes, or just once, after the loop on equation (X). So the way we wish such English to appear, assuming the case that equation (Y) is indeed applied only once after looping, is like so: For all pseudoprimes in S, apply equation (X); Apply equation (Y);
- 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 538 and 539: 9.7 Exercises 529 9.49. In the FFT
- 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 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,
- Page 588 and 589: INDEX 581 discrete arithmetic-geome
- Page 590 and 591: INDEX 583 complex-field, 477 Cooley
- Page 592 and 593: INDEX 585 Hajratwala, N., 23 Halber
- Page 594 and 595: INDEX 587 Lehmer, D., 149, 152, 155
- Page 596 and 597: INDEX 589 432, 447-450, 453, 458, 5
Appendix<br />
BOOK PSEUDOCODE<br />
All algorithms in this book are written in a particular pseudocode form<br />
describable, perhaps, as a “fusion of English and C languages.” The<br />
motivations for our particular pseudocode design have been summarized in<br />
the Preface, where we have indicated our hope that this “mix” will enable all<br />
readers to understand, and programmers to code, the algorithms. Also in the<br />
Preface we indicated a network source for Mathematica implementations of<br />
the book algorithms.<br />
That having been said, the purpose of this Appendix is to provide not<br />
a rigorous compendium of instruction definitions, for that would require<br />
something like an entire treatise on syntactical rules as would be expected<br />
to appear in an off-the-shelf C reference. Instead, we give below some explicit<br />
examples of how certain pseudocode statements are to be interpreted.<br />
English, and comments<br />
For the more complicated mathematical manipulations within pseudocode,<br />
we elect for English description. Our basic technical motivation for allowing<br />
“English” pseudocode at certain junctures is evident in the following example.<br />
A statement in the C language<br />
if((n== floor(n)) && (j == floor(sqrt(j))*floor(sqrt(j)))) ...,<br />
which really means “if n is an integer and j is a square,” we might have cast<br />
in this book as<br />
if(n, √ j ∈ Z) ...<br />
That is, we have endeavored to put “chalkboard mathematics” within<br />
conditionals. We have also adopted a particular indentation paradigm. If we<br />
had allowed (which we have not) such English as:<br />
For all pseudoprimes in S, apply equation (X); Apply equation (Y);<br />
then, to the aspiring programmer, it might be ambiguous whether equation<br />
(Y) were to be applied for all pseudoprimes, or just once, after the loop on<br />
equation (X). So the way we wish such English to appear, assuming the case<br />
that equation (Y) is indeed applied only once after looping, is like so:<br />
For all pseudoprimes in S, apply equation (X);<br />
Apply equation (Y);