Upload
others
View
5
Download
0
Embed Size (px)
Citation preview
STUDENT MATHEMAT ICAL L IBRARYVolume 70
Primality Testing for Beginners
Lasse Rempe-Gillen
Rebecca Waldecker
Primality Testing for Beginners
http://dx.doi.org/10.1090/stml/070
Primality Testing for Beginners
Lasse Rempe-Gillen Rebecca Waldecker
Student mathemat ical l ibraryVolume 70
American Mathematical SocietyProvidence, Rhode Island
Editorial Board
Satyan L. DevadossGerald B. Folland (Chair)
John StillwellSerge Tabachnikov
The cover illustration is a variant of the Sieve of Eratosthenes (Sec-tion 1.5), showing the integers from 1 to 2704 colored by the number oftheir prime factors, including repeats. The illustration was created us-ing MATLAB. The back cover shows a phase plot of the Riemann zetafunction (see Appendix A), which appears courtesy of Elias Wegert(www.visual.wegert.com).
2010 Mathematics Subject Classification. Primary 11-01, 11-02, 11Axx,11Y11, 11Y16.
For additional information and updates on this book, visitwww.ams.org/bookpages/stml-70
Library of Congress Cataloging-in-Publication Data
Rempe-Gillen, Lasse, 1978– author.[Primzahltests fur Einsteiger. English]Primality testing for beginners / Lasse Rempe-Gillen, Rebecca Waldecker.
pages cm. — (Student mathematical library ; volume 70)Translation of: Primzahltests fur Einsteiger : Zahlentheorie - Algorithmik -
Kryptographie.Includes bibliographical references and index.ISBN 978-0-8218-9883-3 (alk. paper)1. Number theory. I. Waldecker, Rebecca, 1979– author. II. Title.
QA241.R45813 2014512.7′2—dc23
2013032423
Copying and reprinting. Individual readers of this publication, and nonprofitlibraries acting for them, are permitted to make fair use of the material, such as tocopy a chapter for use in teaching or research. Permission is granted to quote briefpassages from this publication in reviews, provided the customary acknowledgment ofthe source is given.
Republication, systematic copying, or multiple reproduction of any material in thispublication is permitted only under license from the American Mathematical Society.Requests for such permission should be addressed to the Acquisitions Department,American Mathematical Society, 201 Charles Street, Providence, Rhode Island 02904-2294 USA. Requests can also be made by e-mail to [email protected].
c© 2014 by the authors.Printed in the United States of America.
©∞ The paper used in this book is acid-free and falls within the guidelinesestablished to ensure permanence and durability.
Visit the AMS home page at http://www.ams.org/
10 9 8 7 6 5 4 3 2 1 18 17 16 15 14
For our spouses,
Emma and Lars
Contents
Preface xi
Introduction 1
Part 1. Foundations
Chapter 1. Natural numbers and primes 13
§1.1. The natural numbers 13
§1.2. Divisibility and primes 26
§1.3. Prime factor decomposition 31
§1.4. The Euclidean algorithm 35
§1.5. The Sieve of Eratosthenes 39
§1.6. There are infinitely many primes 41
Further reading 42
Chapter 2. Algorithms and complexity 43
§2.1. Algorithms 43
§2.2. Decidable and undecidable problems 52
§2.3. Complexity of algorithms and the class P 57
§2.4. The class NP 68
vii
viii Contents
§2.5. Randomized algorithms 73
Further reading 81
Chapter 3. Foundations of number theory 83
§3.1. Modular arithmetic 84
§3.2. Fermat’s Little Theorem 94
§3.3. A first primality test 104
§3.4. Polynomials 107
§3.5. Polynomials and modular arithmetic 120
Further reading 127
Chapter 4. Prime numbers and cryptography 129
§4.1. Cryptography 129
§4.2. RSA 132
§4.3. Distribution of primes 136
§4.4. Proof of the weak prime number theorem 139
§4.5. Randomized primality tests 143
Further reading 150
Part 2. The AKS Algorithm
Chapter 5. The starting point: Fermat for polynomials 153
§5.1. A generalization of Fermat’s Theorem 153
§5.2. The idea of the AKS algorithm 159
§5.3. The Agrawal-Biswas test 163
Chapter 6. The theorem of Agrawal, Kayal, and Saxena 169
§6.1. Statement of the theorem 170
§6.2. The idea of the proof 171
§6.3. The number of polynomials in P 173
§6.4. Cyclotomic polynomials 178
Contents ix
Chapter 7. The algorithm 183
§7.1. How quickly does the order of n modulo r grow? 183
§7.2. The algorithm of Agrawal, Kayal, and Saxena 186
§7.3. Further comments 189
Further reading 192
Appendix A. Open questions 193
Further reading 205
Appendix B. Solutions and comments to important exercises 207
Bibliography 233
List of symbols 237
Index 239
Preface
“How on earth can you do research in mathematics?”, we are of-
ten asked. The idea of ongoing research in other sciences is deeply
embedded in the public consciousness, not only in those fields that
may lead to self-driving cars or new life-saving drugs, but also in
the most theoretical areas such as particle physics, where scientists
try to puzzle out the likely nature of matter on the smallest possible
scales. In contrast, even among members of the public who profess
their enjoyment of mathematics there is little awareness that many
mathematical questions remain open and that these are the subject
of intensive investigation.
One of the difficulties in challenging this perception lies in the
highly specialized nature of modern mathematics itself. Even profes-
sional mathematicians are usually unable to fully appreciate research
advances outside their own branches of mathematics. Of course there
are exceptions to this rule, such as Fermat’s Last Theorem, which
was proved by Andrew Wiles in the 1990s and could hardly be sim-
pler to state: “If n > 2, then there are no non-zero integers a, b, and
c such that an + bn = cn.” Yet in this case the proof is particularly
long and difficult, and only a small number of experts worldwide are
able to fully comprehend it.
xi
xii Preface
In the summer of 2002, the computer scientist Manindra Agrawal
and his students Neeraj Kayal and Nitin Saxena achieved a remark-
able feat: they discovered an efficient and deterministic test for the
primality of a natural number. (To learn about the meaning of these
notions, keep reading!) We were fascinated by this result not only be-
cause it answers a long-standing open question, but because the math-
ematics behind it is beautiful and, compared to other modern research
advances, extremely accessible. We decided to use this opportunity
to get young people in touch with actual mathematical research by
offering a course on the subject at a German summer academy for
secondary-school students in 2005. Inspired by the participants and
their enthusiasm, we started to transform the course material into
a book manuscript, the German version of which appeared in 2009.
The book you hold in your hands is an English-language edition of
this text. During the translation process, we have also corrected a
few errors, changed some of the presentation for pedagogical reasons,
and updated the content with new results, where appropriate.
We thank the students from our original summer course for their
motivation and dedication and all those who have since helped us
for their comments and suggestions regarding both the German and
English editions. We also thank you – our reader – for your interest in
this little volume, and we hope that you will enjoy reading the book
as much as we did writing it.
Lasse Rempe-Gillen and Rebecca Waldecker
August 2013
Bibliography
[AB] Agrawal, M. and Biswas, S.: Primality and identity testing viaChinese remaindering. Journal of the ACM 50 (2003), no. 4, 429–443.
[AKS] Agrawal, M., Kayal, N., and Saxena, K.: PRIMES is in P. Annalsof Math. 160 (2004), no. 2, 781–793.
[AO] Agargun, A. Goksel and Ozkan, E. Mehmet: A historical survey ofthe fundamental theorem of arithmetic. Historia Math. 28 (2001),no. 3, 207–214.
[Be] Beutelspacher, A.: Cryptology. Mathematical Association ofAmerica, 1994.
[Bo] Bornemann, F.: Primes is in P: A breakthrough for “Everyman”.Notices of the AMS 50 (2003), no. 5, 545–552.
[Br] Bryant, V.: Yet Another Introduction to Analysis, Cambridge Uni-versity Press, 1990.
[Ch] Chen, J. R.: On the representation of a larger even integer as thesum of a prime and the product of at most two primes. Sci. Sinica16 (1973), 157–176.
[Co] Conrey, J. B.: The Riemann Hypothesis. Notices of the AMS 50(2003), no. 3, 341–353.
[CLR] Cormen, T. H., Leiserson, C. E., and Rivest, R. L.: Introductionto Algorithms. Third Edition, MIT Press, 2009.
[CM] Coron, J.-S. and May, A.: Deterministic polynomial-time equiva-lence of computing the RSA secret key and factoring. J. Cryptology20 (2007), 39–50.
233
234 Bibliography
[CP] Crandall, R. and Pomerance, C.: Prime Numbers: A Computa-tional Perspective. Springer, 2005.
[De] Derbyshire, J.: Prime Obsession: Bernhard Riemann and theGreatest Unsolved Problem in Mathematics. Penguin, 2004.
[Dst] Diestel, R.: Graph Theory. Fourth edition, Springer, 2010.
[Dtz] Dietzfelbinger, M.: Primality Testing in Polynomial Time: FromRandomized Algorithms to “PRIMES Is in P”. Springer, 2004.
[Do] Doxiadis, A.K.: Uncle Petros and Goldbach’s Conjecture: A Novelof Mathematical Obsession. Bloomsbury, 2001.
[EFT] Ebbinghaus, H.-D., Flum, J., and Thomas, W.: MathematicalLogic. Second edition, Springer, 1994.
[Eb] Ebbinghaus et al.: Numbers. Third printing, Springer, 1996.
[Ec] Eccles, P.: An Introduction to Mathematical Reasoning: Numbers,Sets and Functions. Cambridge University Press, 1997.
[Frl] Fraleigh, J. B.: A First Course in Abstract Algebra. Seventh edi-tion, Pearson, 2003.
[Frz] Franzen, T.: Godel’s Theorem: An Incomplete Guide to Its Useand Abuse. Peters, 2005.
[Fu] Furer, M.: Faster Integer Multiplication. Proceedings of the 39thAnnual ACM Symposium on Theory of Computing (2007), 57–66.
[G] Granville, A.: It is easy to determine whether a given integer isprime. Bull. Amer. Math. Soc. 42 (2005), no. 1, 3–38.
[GT] Green, B. and Tao, T.: The primes contain arbitrarily long arith-metic progressions.Annals of Math. (2) 167 (2008), no. 2, 481–547.
[Hal] Halmos, P. R.: Naive Set Theory. Van Nostrand, 1960.
[Har] Hardy, G. H.: A Mathematician’s Apology. Cambridge UniversityPress, 1940.
[HW] Hardy, G. H. and Wright, E. M.: An Introduction to the Theoryof Numbers. Oxford University Press, 2008.
[He] Helfgott, H. A.: Major arcs for Goldbach’s problem, preprint,arXiv:1305.2897, 2013.
[Ho] Hofstadter, D.: Godel, Escher, Bach: An Eternal Golden Braid.Penguin Books Ltd., 1980.
[HMU] Hopcroft, J. E., Motwani, R., and Ullman, J. D.: Intro-duction to Automata Theory, Languages, and Computation.Pearson/Addison-Wesley, 2007.
[HP] Humphreys, J. F. and Prest, M. Y.: Numbers, Groups and Codes.Second edition, Cambridge University Press, 2004.
Bibliography 235
[J] Jameson, G. J. O.: The Prime Number Theorem. Cambridge Uni-versity Press, 2008.
[Ke] Kelly, T.: The myth of the Skytale. CRYPTOLOGICA, Vol. XXII,no. 3 (1998).
[KS] Kurzweil, H. and Stellmacher, B.: The Theory of Finite Groups.Springer, 2004.
[LaPe] Laubenbacher, R. and Pengelley, D.: “Voici ce que j’ai trouve”:Sophie Germain’s grand plan to solve Fermat’s Last Theorem. His-toria Mathematica 37, Issue 4, (2010), 641–692.
[LP] Lenstra, H. W. Jr. and Pomerance, C.: Primality testing withGaussian periods. Preprint, 2005, revised April 2011.http://www.math.dartmouth.edu/∼carlp/aks041411.pdf.
[LPa] Lewis, H. R. and Papadimitriou, C. H.: Elements of the Theory ofComputation. Prentice Hall International, 1998.
[LiN] Lidl, R. and Niederreiter, H.: Finite Fields. Addison-Wesley, 1983.
[Lo] Lorenz, F.: Algebra. Volume I: Fields and Galois Theory. Springer,2006.
[ME] Murty, M. R. and Esmonde, J.: Problems in Algebraic NumberTheory. Springer, 2004.
[N] Nair, M.: On Chebyshev-type inequalities for primes. Amer. Math.Monthly 89, no. 2 (1982), 126–129.
[NZM] Niven, I., Zuckerman, H. S., and Montgomery, H. L.: An Intro-duction to the Theory of Numbers. John Wiley & Sons, 1991.
[P] Papadimitriou, C. H.: Computational Complexity. Addison-Wesley, 1995.
[RSA] Rivest, R., Shamir, A., and Adleman, L.: A method for obtain-ing digital signatures and public-key cryptosystems. Comm. of theACM 21 (1978), no. 2, 120–126.
[Rob] Robinson, S.: Still guarding secrets after years of attacks, RSAearns accolades for its founders. SIAM News 36, no. 5 (2003).
[Ro] Ross, S.: A First Course in Probability. Eighth edition, Pearson,2008.
[Ros] Ross, P. M.: On Chen’s theorem that each large even number hasthe form p1 + p2 or p1 + p2p3. J. London Math. Soc. 10 (1975),500–506.
[S] Singh, S.: The Code Book: Science of Secrecy from Ancient Egyptto Quantum Cryptography. Anchor Books, 2000.
[TZ] Tao, T. and Ziegler, T.: The primes contain arbitrarily long poly-nomial progressions. Acta Math. 201, no. 2 (2008), 213–305.
236 Bibliography
[vK] von Koch, H.: Ueber die Riemann’sche Primzahlfunction. Math.Annalen 55, no. 3 (1901), 441–464.
[Za] Zagier, D.: Newman’s short proof of the prime number theorem.American Math. Monthly 104 (1997), 705-708.
[Zh] Zhang, Y.: Bounded gaps between primes. Annals of Math., toappear.
List of symbols
∅ (the empty set), page 8
C (the complex numbers), page 203
N (the natural numbers, not including zero), page 7
N0 (the natural numbers, including zero), page 7
Q (the rational numbers), page 7
R (the real numbers), page 7
Z (the integers), page 7
∞ (infinity), page 8
e (Euler’s constant, e = 2,71828 . . . ), page 9
π (the area of a circle of radius 1, π = 3.14159 . . . ), page 48
#M (number of elements of M), page 8
N ⊆ M (N is a subset of M), page 8
N � M (N is a proper subset of M), page 8
x ∈ M (x is an element of M), page 8
y /∈ M (y is not an element of M), page 8
NP (efficiently verifiable problems), page 69
P (efficiently computable problems), page 60
RP (problems with efficient Monte Carlo solutions), page 75
ZPP (problems with efficient Las Vegas solutions), page 78
f : N → M (f is a function from N to M), page 9
f(n) = O(g(n)) (f grows asymptotically at most as quickly as g), page 59
:= (is defined as), page 8
a ≤ b (a is less than or equal to b), page 7
a < b (a is strictly less than b), page 7
lnx (the natural logarithm of x), page 9
log x (the logarithm of x to base 2), page 9∏n
i=1 xi (the product x1 · x2 · · · xn), page 8
237
238 List of symbols
∑ni=1 xi (the sum x1 + x2 + · · · + xn), page 8
�x� (the largest integer n ≤ x), page 9
�x (the smallest integer n ≥ x), page 9
|x| (absolute value of x), page 9
n! (n factorial), page 9
k |n (k divides n), page 26
gcd(a, b) (the greatest common divisor of a and b), page 27
lcm(a, b) (the least common multiple of a and b), page 27
cp(n) (the set of integers from 1 to n−1 that are coprime to n), page 98
ϕ(n) (the number of integers from 1 to n − 1 that are coprime to n),page 98
π(n) (the number of primes ≤ n), page 137
M mod n (the remainder of M after division by n), page 86
a ≡ b (mod n) (a is congruent to b modulo n), page 84
ordn(a) (the order of a modulo n), page 94
degP (the degree of the polynomial P ), page 108
degn(P ) (the degree of P modulo n), page 121
P ≡ Q (mod H) (P and Q are congruent modulo H), page 113
P ≡ Q (mod n) (P and Q are congruent modulo n), page 120
P ≡ Q (mod n,H) (P and Q are congruent modulo n and H), page 122
P (the set of all integer polynomials P satisfying (6.1.2)), page 171
r(n, k) (the smallest prime r with r |n or ordr(n) > k), page 184
Index
3n+ 1 problem, 51
Aaronson, Scott, 73
absolute value, 9
Ackermann, Wilhelm
Ackermann function, 68
Adleman, Leonard, 1, 132, 135,192
age of the universe, 40
Agrawal, Manindra, 163
AKS algorithm, 4, 186
al-Khwarizmi, Abu AbdallahMuhammad ibn Musa, 50
Alberti, Leon Battista, 131
algorithm, 43, 45
ADDITION, 46, 61
AKS, 4, 186
COLLATZ, 51
CRIME-BESTSELLER, 44
deterministic, 73
efficient, 60
Euclidean, 29, 35, 36, 43, 50, 66
inefficient, 40
Karatsuba, 67
Las Vegas, 77
MILLER-RABIN, 145
Monte Carlo, 75
N*(PI+E), 48
of Agrawal, Kayal, and Saxena,4, 186
PANCAKE, 44
QUICKSORT, 76
randomized, 73
Schonhage-Strassen, 68
analysis
mathematical, 143
Annals of Mathematics, 4, 25, 199
Arenstorf, Richard F., 204
arithmetic
modular, 84
arithmetic progression, 199
asymptotic growth, 59
asymptotic running time, 60
average running time, 78
axiom, 14
Peano axioms, 25
Bachmann, Paul, 66
base, 104
basis of the induction, 17
best-selling crime novel, 44
Bezout, Etienne
Bezout’s Lemma, 37, 39, 87
binary number system, 46, 51
binomial coefficients, 19
explicit formula, 23
recursive formula, 19
binomial theorem, 19
Biswas, Somenath, 163
bounded from above/below, 22
239
240 Index
Caesar, Julius, 66
Caesar cipher, 130
calculus
integral/differential, 143
Carmichael, Robert D.Carmichael number, 106, 107,
146Chebyshev, Pafnuty Lvovich, 139
Chen, Jingrun, 195, 198
Chinese Remainder Theorem, 89
Church, Alonzo, 50, 54
Church-Turing thesis, 50
cipher
digraphic substitution, 131
mono-alphabetic, 130
playfair, 131
poly-alphabetic, 131
RSA, 132
ciphertext, 130
Clement’s Theorem, 199
Clement, Paul A.
Clement’s Theorem, 199
coefficient, 108
leading, 108
Collatz Conjecture, 51Collatz, Lothar, 51
colorability, 70
combinatorics, 19
common divisor, 27
greatest, 27
common factor, 27
highest, 27
common multiple, 27
least, 27
complete set of residues, 92
complex numbers, 181, 193, 203
complex analysis, 139
complexity theory, 58
composite number, 26
COMPOSITES, 53
conclusion, 6
congruence, 84
modulo a polynomial, 113
of polynomials modulo n, 120congruence class, 93
congruent, 84
constant polynomial, 108
contradiction
proof by, 15
converse, 7
coprime, 27
corollary, 7
coset, 100
counterexample
smallest, 15
cryptography, 129
public-key, 132
CSR, 92
cyclotomic polynomial, 178
de la Vallee Poussin,Charles-Jean, 139
de Vigenere, Blaise, 131
decidable problem, 52
decimal number system, 51
decision problem, 52
decomposition
into irreducible factors, 125
into prime factors, 31
defined as, 8
definition, 6
recursive, 18
degree of a polynomial, 108
modulo n, 121
descent
infinite, 15
determinism, 45
deterministic algorithm, 73
diagonalization, 57
differential calculus, 143
Diffie, Whitfield, 135
digraphic substitution ciphers, 131
Diophantine equation, 92
direct proof, 18
Dirichlet, Gustav Lejeune
Dirichlet’s Prime NumberTheorem, 200
Disquisitiones Arithmetica, 34
divide and conquer, 62
division
long, 29
polynomial long division, 110
with remainder, 28
division algorithm, 28
division theorem, 28
division with remainder, 28
Index 241
for polynomials, 111
divisor, 26
common, 27
greatest common, 27
non-trivial, 26
of a polynomial, 110, 112
of a polynomial modulo n, 122
trivial, 26
zero, 119
zero divisor, 91, 93
dual problem, 53
efficiency, 60
efficiently verifiable problem, 69
Eisenstein, Ferdinand, 203
irreducibility criterion, 126
elements of a set, 8
empty set, 8
encryption
RSA, 2
Entscheidungsproblem, 50, 54
Eratosthenes of Cyrene, 40
Sieve of, 39, 43, 61
Euclid, 34, 38, 41, 200
Euclid number, 200
Euclidean algorithm, 29, 35, 36, 43,50, 66
Euler, Leonhard, 194, 195
Euler’s constant, 9
Fermat-Euler Theorem, 99
phi function, 104
totient function, 98, 104
even integers, 7
even number, 22, 84
factorial, 9
Factoring Challenge, 2
Fermat number, 203
Fermat prime, 203
Fermat test, 105
Fermat, Pierre de, 2, 25
Fermat’s Last Theorem, xi, 25,189, 191
Fermat’s Little Theorem, 25, 96
Fermat-Euler Theorem, 99
Last Theorem of, 197
theorem of Fermat-Miller, 145
Fibonacci numbers, 19, 66
field, 93finite arithmetic progression, 199
Fouvry, Etienne, 190, 191
fraction, 7frequency analysis, 130function, 9
one-way, 132
Fundamental Theorem ofArithmetic, 31
Furer, Martin, 68
Gauss, Carl Friedrich, 104, 139Disquisitiones Arithmetica, 34
Gauss summation, 22gcd, 27Generalized Riemann Hypothesis,
149, 192, 195
Germain, Sophie, 189, 191, 202Godel, Kurt, 57
incompleteness theorem, 57Goldbach, Christian, 195
Goldbach Conjecture, 195Weak Goldbach Conjecture, 196
Goldberg’s Conjecture, 197graph, 56
Great Internet Mersenne PrimeSearch, 201
greatest common divisor, 27Green, Ben
Green-Tao Theorem, 199
group, 104
Hadamard, Jacques, 139halting problem, 54Hardy, Godfrey Harold, 1, 190,
205
Heath-Brown, David Rodney, 192Helfgott, Harald, 197Hellman, Martin, 135highest common factor, 27
Hilbert’s decision problem, 54Hilbert, David, 49, 194
Entscheidungsproblem, 50, 54Tenth Problem, 56
hypothesis, 6
inductionbasis of, 17mathematical, 16
242 Index
variants, 18, 25induction hypothesis, 17induction step, 17
inefficient algorithm, 40infinite descent, 15input, 52instance, 52
positive/negative, 53integer, 7
even, 7odd, 7
integral, 143integral calculus, 143integral domain, 119integral logarithm, 139
intractable problem, 60inverse modulo n, 87irreducible polynomial, 114
Eisenstein criterion, 126
modulo p, 123
Jacobi symbol, 149
Karatsuba, Anatoly AlexeevitchKaratsuba algorithm, 67
Kasiski, Friedrich W., 131
keyprivate, 132public, 132
Lagrange, Joseph-LouisLagrange’s Theorem, 101, 104
Landau, EdmundLandau symbols, 66
Las Vegas algorithm, 77Las Vegas method, 73lcm, 27leading coefficient, 108
least common multiple, 27Legendre symbol, 149Legendre, Adrien-Marie, 139lemma, 7
Bezout’s Lemma, 39, 87Lenstra, Hendrik W., 190Library of Alexandria, 40
linear factor, 112, 117, 124Littlewood, John E., 190, 205logarithm
base 2, 9
integral, 139
natural, 9
Logarithmic Integral Function, 193
long division, 29
polynomial, 110
Lucas, Edouard
Lucas test, 201
Markov, Andrei Andreyevich
Markov inequality, 78, 81
mathematical analysis, 143
mathematical induction, 16
variants, 18, 25
Mersenne prime
Great Internet Mersenne PrimeSearch, 201
Mersenne, Marin
Mersenne number, 200
Mersenne prime, 201
Millennium Prize Problems, 72, 194
Miller, Gary Lee, 3, 149
theorem of Fermat-Miller, 145
Miller-Rabin primality test, 145
modular arithmetic, 84
modulo a polynomial, 113
monic, 108
mono-alphabetic cipher, 130
Monte Carlo algorithm, 75
Monte Carlo method, 73
multiple, 17, 26
common, 27
least common, 27
multiplicative inverse, 87
National Lottery, 19
natural logarithm, 9
natural numbers, 7, 13
negative instance, 53
non-trivial divisor, 26
of a polynomial, 112
NP, 68, 69
NP-complete problem, 72
number
Carmichael, 106, 107
complex, 181, 193, 203
composite, 26
Euclid, 200
even/odd, 22, 84
Index 243
integer, 7
natural, 7, 13
perfect, 200
prime, 1, 26
rational, 7
real, 7
number of atoms in the universe,40, 68, 197
O-notation, 59, 66
odd integers, 7
odd number, 22, 84
one-way function, 132
order modulo n, 94
output, 52
P, 60
pairwise, 23
pancake, 44
particle physics, xi
Pascal’s triangle, 19, 96
Pausanias, 130
Peano axioms, 25
Peano, Giuseppe, 25
Peano axioms, 25
perfect number, 200
perfect power, 9
plaintext, 130
playfair cipher, 131
poly-alphabetic cipher, 131
Polybius square, 130
polynomial, 108
constant, 108
cyclotomic, 178
in X/Y /Z, 109
in several variables, 56, 73
integer/rational, 108
irreducible, 114
irreducible (modulo p), 123
monic, 108
over a field, 119
reducible, 118
zero, 108
polynomial running time, 60
polynomial zero, 116, 123
Pomerance, Carl, 190
positive instance, 53
Post, Emil
Correspondence Problem, 56
power
perfect, 9
Pratt, Vaughan, 72
prime, 1, 26
Fermat, 203
Mersenne, 201
root of unity modulo a prime,144
Sophie Germain prime, 190
twin, 42
prime factor, 30
prime factor decomposition, 31
prime gap, 41
prime number theorem, 137
PRIMES, 53
primitive root, 103
primitive root of unity, 181
private key, 132
problem, 52
3n+ 1, 51
class NP, 68, 69
class P, 60
class RP, 75class ZPP, 78
COMPOSITES, 53
decision, 52
dual, 53
efficiently computable, 60
efficiently verifiable, 69
halting problem, 54
Hilbert’s Entscheidungsproblem,50, 54
Hilbert’s Tenth Problem, 56
intractable, 60
NP-complete, 72
Post Correspondence Problem,56
PRIMES, 53
search, 52
SUM, 52
(un)decidable, 52
product notation, 8
proof, 6
by contradiction, 15
direct, 18
pseudo-prime, 105
strong, 146
244 Index
public key, 132public-key cryptography, 132
Quicksort, 76
Rabin, Michael Oser, 3, 149Ramare, Olivier, 196
randomized algorithm, 73rational numbers, 7real numbers, 7recursive definition, 18
reduced set of residues, 92reducible polynomial, 118Riemann ζ-function, 193Riemann Hypothesis, 139, 193
Generalized, 149, 192, 195, 197Riemann, Bernhard, 193Rivest, Ronald, 1, 132, 135root of unity, 181
modulo a prime, 144primitive, 181
RP, 75
RSA, 2, 132RSA number, 2RSR, 92running time
asymptotic, 60average, 78exponential, 60function, 58
polynomial, 60
Schonhage, Arnold, 68Schonhage-Strassen algorithm, 68
search problem, 52set, 8
uncountable, 57Shamir, Adi, 1, 132, 135
Sieve of Eratosthenes, 39, 43, 61Skytale, 130smallest counterexample, 15Solovay, Robert Martin, 149
Sophie Germain prime, 190, 202Strassen, Volker, 68, 149string, 52, 58
strong pseudo-prime, 146subset, 8successor, 24sufficiently large, 59
sum notation, 8Sylvester, James Joseph, 104
Tao, Terence, 199Green-Tao Theorem, 199
Tenenbaum, Gerald, 204theorem, 7theorem of Agrawal, Kayal, and
Saxena, 169theorem of Fermat-Miller, 145totient function, 98triples of prime numbers, 198trivial divisor, 26Turing, Alan, 50, 54, 131
twin primes, 42, 197
uncountable set, 57undecidable problem, 52unique modulo n, 88universe
age, 40number of atoms, 40, 68, 197
Vigenere square, 131Vinogradov, Ivan Matveyevich
Vinogradov’s Theorem, 196von Koch, Helge, 139, 194
Weak Goldbach Conjecture, 196well-ordering principle, 14What’s my line?, 62Wheatstone, Charles, 131Wiles, Andrew, xi, 25, 192Wilson’s Theorem, 149, 204Wilson, John, 149, 204witness, 69
zeropolynomial, 116, 123
zero divisor, 91, 93, 115, 119zero of a polynomial, 109zero polynomial, 108
Zhang, Yitang, 198ZPP, 78
For additional informationand updates on this book, visit
www.ams.org/bookpages/stml-70
AMS on the Webwww.ams.orgSTML/70
How can you tell whether a number is prime? What if the number has hundreds or thousands of digits? This question may seem abstract or irrelevant, but in fact, primality tests are performed every time we make a secure online transaction. In 2002, Agrawal, Kayal, and Saxena answered a long-standing open question in this context by presenting a deterministic test (the AKS algorithm) with polynomial running time that checks whether a number is prime or not. What is more, their methods are essentially elementary, providing us with a unique opportunity to give a complete explanation of a current mathematical breakthrough to a wide audience.
Rempe-Gillen and Waldecker introduce the aspects of number theory, algorithm theory, and cryptography that are relevant for the AKS algo-rithm and explain in detail why and how this test works. This book is specifi cally designed to make the reader familiar with the background that is necessary to appreciate the AKS algorithm and begins at a level that is suitable for secondary school students, teachers, and interested amateurs. Throughout the book, the reader becomes involved in the topic by means of numerous exercises.