Homepage › Solution manuals › Terence Tao › Analysis I › Exercise 2.3.5 (Euclidean algorithm)
Exercise 2.3.5 (Euclidean algorithm)
Prove Proposition 2.3.9. (Hint: fix and induct on .)
Proposition 2.3.9 (Euclidean algorithm) Let be a natural number, and let be a positive number. Then there exist natural numbers such that and .
Answers
How to think about the exercise. Terminological note: Tao calls this result "Euclidean algorithm", but Euclidean algorithm is most commonly used for a different algorithm. The common term used for the topic of this exercise seems to be Euclidean division.
For this exercise, the only slightly tricky part is proving the inductive step. Here, what turns out to work is to split into cases. But which cases? I think the easiest way to see is to look at some examples. Let’s take the following, where we fix and increment by one each time:
10 divided by 5 = 2 with remainder 0
11 divided by 5 = 2 with remainder 1
12 divided by 5 = 2 with remainder 2
13 divided by 5 = 2 with remainder 3
14 divided by 5 = 2 with remainder 4
15 divided by 5 = 3 with remainder 0
I hope you can see the pattern. At each increment of , either the remainder goes up by 1 (in which case stays the same) or the remainder resets to 0 (in which case goes up by 1). What distinguishes the two cases? Well, the reset only happens when the remainder on the previous step is one less than the number we are dividing by, i.e. when . For example, suppose we are at "14 divided by 5 = 2 with remainder 4". Then the remainder, 4, is one less than the number we are dividing by, which is 5.
Model solution. Let us fix and induct on . For the case , we must show that there are natural numbers such that and . We can take and . Indeed, we have (since is positive) and .
Now suppose inductively that there are natural numbers such that and . We must show that there are natural numbers such that and .
We have two cases, and . If , we can take and . Then and we have equal to by definition of , which equals by the distributive law, which equals by using , which equals by the inductive hypothesis . Thus as required.
Now suppose . In this case, from the inductive hypothesis gives , so . So we can take and . Now by what we just showed, and by definition of and the inductive hypothesis .
Source: Issa Rice’s blog.
Comments
Proof. We induct on (keeping fixed).
- 1.
- We first verify the base case
which is
Since the base case follows.
- 2.
- We now suppose inductively that there exist natural numbers and such that and for some natural number
- 3.
- We now prove ,
which is:
Notice that by incrementing by , either becomes so big that a new now fits inside it (i.e, ) or it is still small enough and the rest of the division just gets incremented by one (i.e, ).
We formulate this idea more formally. By Proposition 2.2.12, ; thus, we have two cases:-
() Let and Then, we still have Furthermore, by induction hypothesis,
-
() Let now and Then, we still have Furthermore,
Therefore and are exactly those numbers we were looking for. This closes the induction.
-