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 Finite and discrete probability distributions
- 7 Probabilistic algorithms
- 8 Abelian groups
- 9 Rings
- 10 Probabilistic primality testing
- 11 Finding generators and discrete logarithms in
- 12 Quadratic residues and quadratic reciprocity
- 13 Computational problems related to quadratic residues
- 14 Modules and vector spaces
- 15 Matrices
- 16 Subexponential-time discrete logarithms and factoring
- 17 More rings
- 18 Polynomial arithmetic and applications
- 19 Linearly generated sequences and applications
- 20 Finite fields
- 21 Algorithms for finite fields
- 22 Deterministic primality testing
- Appendix: Some useful facts
- Bibliography
- Index of notation
- Index
7 - Probabilistic algorithms
Published online by Cambridge University Press: 05 June 2012
- 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 Finite and discrete probability distributions
- 7 Probabilistic algorithms
- 8 Abelian groups
- 9 Rings
- 10 Probabilistic primality testing
- 11 Finding generators and discrete logarithms in
- 12 Quadratic residues and quadratic reciprocity
- 13 Computational problems related to quadratic residues
- 14 Modules and vector spaces
- 15 Matrices
- 16 Subexponential-time discrete logarithms and factoring
- 17 More rings
- 18 Polynomial arithmetic and applications
- 19 Linearly generated sequences and applications
- 20 Finite fields
- 21 Algorithms for finite fields
- 22 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. 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 welldeveloped theory of pseudo-random bit generation (some of which builds on the ideas in §6.9), we will not delve into this here. Moreover, the pseudorandom bit generators used in practice are not based on this general theory, and are much more ad hoc in design. So, although we will present a rigorous formal theory of probabilistic algorithms, the application of this theory to practice is ultimately a bit heuristic.
Basic definitions
Formally speaking, we will add a new type of instruction to our random access machine (described in §3.2):
random bit
This type of instruction is of the form α ← RANDOM, where α takes the same form as in arithmetic instructions. Execution of this type of instruction assigns to α a value sampled from the uniform distribution on {0, 1}, independently from the execution of all other random-bit instructions.
In describing algorithms at a high level, we shall write “b ←R {0, 1}” to denote the assignment of a random bit to the variable b, and “s ←R {0, 1}×ℓ” to denote the assignment of a random bit string of length ℓ to the variable s.
- Type
- Chapter
- Information
- A Computational Introduction to Number Theory and Algebra , pp. 148 - 179Publisher: Cambridge University PressPrint publication year: 2005