Book contents
- Frontmatter
- Contents
- Preface
- I Study skills for mathematicians
- II How to think logically
- III Definitions, theorems and proofs
- IV Techniques of proof
- V Mathematics that all good mathematicians need
- 27 Divisors
- 28 The Euclidean Algorithm
- 29 Modular arithmetic
- 30 Injective, surjective, bijective – and a bit about infinity
- 31 Equivalence relations
- VI Closing remarks
- Appendices
- Index
28 - The Euclidean Algorithm
from V - Mathematics that all good mathematicians need
- Frontmatter
- Contents
- Preface
- I Study skills for mathematicians
- II How to think logically
- III Definitions, theorems and proofs
- IV Techniques of proof
- V Mathematics that all good mathematicians need
- 27 Divisors
- 28 The Euclidean Algorithm
- 29 Modular arithmetic
- 30 Injective, surjective, bijective – and a bit about infinity
- 31 Equivalence relations
- VI Closing remarks
- Appendices
- Index
Summary
An algorithm must be seen to be believed.
Donald Knuth, The Art of Computer Programming, Vol. 1, 1999The Euclidean Algorithm is a very powerful device. We will apply it to three problems:
Finding the gcd of two numbers.
Finding integer solutions to equations like 32x + 17y = 45, i.e. those of the form ax + by = c.
Finding additional hypotheses so that when n|ab we can say something about whether or not n divides a or b.
We will show how the proofs are created and how they are polished for the final version. Hopefully, it will show that there is a huge difference between the way a proof is created and how it is presented.
The Division Lemma
The obvious way to find the gcd of two integers is to factorize them – we know we can do this by the Fundamental Theorem of Arithmetic (Theorem 25.5) – and find what common prime factors they have. Multiplying these together gives the gcd. For example, 440 = 23 × 5 × 11 and 1300 = 22 × 52 × 13. The common factors are 22 and 5 so the gcd is 22 × 5 = 20.
The problem is that factorization is hard for large numbers. Instead of this brute force method we shall give a more useful method. We start with a lemma.
- Type
- Chapter
- Information
- How to Think Like a MathematicianA Companion to Undergraduate Mathematics, pp. 196 - 207Publisher: Cambridge University PressPrint publication year: 2009