Book contents
- Frontmatter
- Contents
- Preface
- Preliminaries
- 1 Basic properties of the integers
- 2 Congruences
- 3 Computing with large integers
- 4 Euclid's algorithm
- 5 The distribution of primes
- 6 Abelian groups
- 7 Rings
- 8 Finite and discrete probability distributions
- 9 Probabilistic algorithms
- 10 Probabilistic primality testing
- 11 Finding generators and discrete logarithms in ℤ*p
- 12 Quadratic reciprocity and computing modular square roots
- 13 Modules and vector spaces
- 14 Matrices
- 15 Subexponential-time discrete logarithms and factoring
- 16 More rings
- 17 Polynomial arithmetic and applications
- 18 Linearly generated sequences and applications
- 19 Finite fields
- 20 Algorithms for finite fields
- 21 Deterministic primality testing
- Appendix: Some useful facts
- Bibliography
- Index of notation
- Index
9 - Probabilistic algorithms
Published online by Cambridge University Press: 05 February 2015
- Frontmatter
- Contents
- Preface
- Preliminaries
- 1 Basic properties of the integers
- 2 Congruences
- 3 Computing with large integers
- 4 Euclid's algorithm
- 5 The distribution of primes
- 6 Abelian groups
- 7 Rings
- 8 Finite and discrete probability distributions
- 9 Probabilistic algorithms
- 10 Probabilistic primality testing
- 11 Finding generators and discrete logarithms in ℤ*p
- 12 Quadratic reciprocity and computing modular square roots
- 13 Modules and vector spaces
- 14 Matrices
- 15 Subexponential-time discrete logarithms and factoring
- 16 More rings
- 17 Polynomial arithmetic and applications
- 18 Linearly generated sequences and applications
- 19 Finite fields
- 20 Algorithms for finite fields
- 21 Deterministic primality testing
- Appendix: Some useful facts
- Bibliography
- Index of notation
- Index
Summary
It is sometimes useful to endow our algorithms with the ability to generate random numbers. In fact, we have already seen two examples of how such probabilistic algorithms may be useful:
at the end of §3.4, we saw how a probabilistic algorithm might be used to build a simple and efficient primality test; however, this test might incorrectly assert that a composite number is prime; in the next chapter, we will see how a small modification to this algorithm will ensure that the probability of making such a mistake is extremely small;
in §4.5, we saw how a probabilistic algorithm could be used to make Fermat's two squares theorem constructive; in this case, the use of randomization never leads to incorrect results, but the running time of the algorithm was only bounded “in expectation.”
We will see a number of other probabilistic algorithms in this text, and it is high time that we place them on a firm theoretical foundation. To simplify matters, we only consider algorithms that generate random bits. Where such random bits actually come from will not be of great concern to us here. In a practical implementation, one would use a pseudo-random bit generator, which should produce bits that “for all practical purposes” are “as good as random.” While there is a well-developed theory of pseudo-random bit generation (some of which builds on the ideas in §8.9), we will not delve into this here.
- Type
- Chapter
- Information
- A Computational Introduction to Number Theory and Algebra , pp. 277 - 305Publisher: Cambridge University PressPrint publication year: 2008