Homepage › Solution manuals › Ivan Niven › An Introduction to the Theory of Numbers › Exercise 1.2.41 ($|x_{j+1}| = c/g$ and $|y_{j+1}| = b/g$)
Exercise 1.2.41 ($|x_{j+1}| = c/g$ and $|y_{j+1}| = b/g$)
In the foregoing notation, if , show that and .
Answers
Proof. The Euclidean algorithm makes sense only for . The fraction has no signification if , so we may assume that and are not both zero, so that .
- (a)
-
Suppose first that
and
, as in the hypothesis of Theorem 1.11.
If we write the relations for and , we obtain
Therefore
By Problem 40, , so
By Problem 39, , , thus
- (b)
-
The extended Euclidean algorithm (or Bézout algorithm) gives (see Problem 39)
Then and , such that , satisfy for all ,
where
-
If , then (and ), and the Euclidean algorithm gives
so that . Then
thus
-
If , then . There are no Euclidean division, the algorithm doesn’t enter in the loop (see the note). Since , we have , and
thus
-
Note: the Bézout’s algorithm for is given by the following program, written in ipython:
In [1]: def bezout(a,b): ...: (r0, r1)=(a, b) ...: (u0, v0) = (1, 0) ...: (u1, v1) = (0, 1) ...: while r1 != 0: ...: q = r0 // r1 ...: (r2, u2, v2) = (r0 - q * r1, u0 - q * u1, v0 - q * v1) ...: (r0, r1) = (r1, r2) ...: (u0, u1) = (u1, u2) ...: (v0, v1) = (v1, v2) ...: return u0, v0, r0 ...: In [2]: bezout(5, 0) Out[2]: (1, 0, 5) In [3]: bezout(0, 5) Out[3]: (0, 1, 5)
Comments
-
Hi Richard, I am a little confused here. In the first line you write g=(a,b)>0. Where did that a come from? Also, in the hint in the book says use Theorem 1.10(Euclid's Lemma: If c divides ab and (b,c)=1 then c divides a. Is this a typo in the text hint? I must be missing an important idea. The rest is correct, but lacking the missing the cases when either b or c is zero.BretSherfinski • 2025-02-22
-
The definition p.7 defines the greater common divisor $d$ of $b$ and $c$ except in the case $b = c= 0$, so $d$ is always a positive integer. This restriction is useless. In more recent courses, if $(b,c) \in \mathbb{Z}^2$, the $d = \mathrm{gcd}(b,c)$ is defined by $$d = b \wedge c \iff (d \geq 0 \text{ and } d \mathbb{Z} = b \mathbb{Z} + c \mathbb{Z}).$$ Then the gcd is characterized (see the solution of Problem 18) by \begin{align*} &d = a \wedge b \iff \left\{ \begin{array}{l} d \geq 0,\\ d \mid b \text{ and } d \mid c,\\ \forall k \in \mathbb{Z},\ (k \mid b \text{ and } k \mid c) \Rightarrow k \mid d. \end{array} \right. \end{align*} (Here $a \mid b$ means $\exists \lambda \in \mathbb{Z},\ b = \lambda a$, so that $a \mid 0$.) Taking this definition or the characterization, we see that $a \wedge b = 0$ if and only if $a = b = 0$, so this definition is not incompatible with the definition p.7, it is only a more general one. When I say that $g = b \wedge c >0$ in the solution, this is equivalent to $g \ne 0$, and this is true except in the case $b = c = 0$. The hypothesis of Theorem 1.11 (and not Th. 1.10 quoted by error) are $b>0, c>0$ so that I retained this hypothesis (the hypothesis of the Problems are not always explicit). Moreover, the "forgoing notations" are those of Theorem 1.11, and the first line $b = cq_1 + r_1, \ 0 < r_1 < c$ has no signification if $c = 0$, and if $b = 0$, the second line has no more signification. Nevertheless, the Bézout's algorithm (see the note) makes sense even if $b = 0$ or $c = 0$. I don't always follow the hints, but you are right: the hint indicates that we must consider the cases $b = 0$ or $c = 0$, so I will add a paragraph to consider this case.richardganaye • 2025-02-23