Primality Testing for Beginners has seven chapters, divided into two parts: four chapters on background material in number theory and computational complexity theory, and three on the AKS primality test.[1][5]
Chapter 1 includes basic material on number theory, including the fundamental theorem of arithmetic on unique factorization into primes, the binomial theorem, the Euclidean algorithm for greatest common divisors, and the sieve of Eratosthenes for generating the sequence of prime numbers. Chapter 2 begins the study of algorithms and their complexity, including algorithms for basic computations in arithmetic, the notion of computability, polynomial-time algorithms, randomization, and nondeterministic polynomial time. In randomized algorithms, it introduces the distinction between Las Vegas algorithms that always return the correct answer after a random amount of time (such as quicksort) and Monte Carlo algorithms for which there is a small probability of getting a wrong answer (exemplified by algorithms based on the Schwartz–Zippel lemma for polynomial identity testing). Chapter 3 provides additional material in number theory, including the Chinese remainder theorem, Fermat's little theorem, and the Fermat primality test based on it. It also introduces calculation with polynomials and with modular arithmetic. The first part of the book concludes with chapter 4, on the history of prime numbers and primality testing, including the prime number theorem (in a weakened form), applications of prime numbers in cryptography, and the widely used Miller–Rabin primality test, which runs in randomized polynomial time.[5]
Chapter 5 generalizes Fermat's little theorem from numbers to polynomials, and introduces a randomized primality test based in this generalization. Chapter 6 provides the key mathematical results behind the correctness of the AKS primality test, and chapter 7 describes the test itself.[5] Both the correctness and the polynomial running time of the algorithm are proven rigorously.[3] Exercises are included in each chapter, and a section at the end of the book provides answers to some of them.[1][2] Another appendix lists some unsolved problems from number theory.[3]