How to compute gcd in real quadratic ring using the Euclidean algorithm

413 Views Asked by At

This may be correct or incorrect:

$$\gcd(2, 1 + \sqrt{7}) = 3 + \sqrt{7}.$$

I got this by looking at prime factorizations:

$$(3 - \sqrt{7})(3 + \sqrt{7}) = 2$$

$$(-3 - \sqrt{7})(2 - \sqrt{7}) = 1 + \sqrt{7}$$

It's my understanding that $\Bbb{Z}[\sqrt{7}]$ is a Euclidean domain, and that the default Euclidean function for this kind of domain is the absolute value of the norm. Then for the first step, I need to solve $1 + \sqrt{7} = 2q + r$ so that $-4 < N(r) < 4$. It seems obvious to me that $r \neq 0$ nor $1$. This leaves a very narrow range, I feel like I'm trying to find a vein on a junkie's arm. I also wondered if maybe I needed to be looking for $2 = q(1 + \sqrt{7}) + r$. I admit I'm getting confused here.

1

There are 1 best solutions below

0
On

Divide $1 + \sqrt{7}$ by $2$ (put the element with the larger norm in the numerator); you get $$ \frac{1 + \sqrt{7}}{2} = \frac12 + \frac12\sqrt{7} .$$ Now try the possible "nearest integers $q = a + b\sqrt{7}$, in the present case $a, b \in \{-1, 0, 1, 2\}$. Any constructive proof that the ring of integers ${\mathbb Z}[\sqrt{7}]$ is norm-Euclidean will tell you more exactly where to look for suitable values of $q$. It is usually a good idea to pick $b$ first and then choose $a$ in such a way that it minimizes the norm.

In the present case, $q = -1$ ($b = 0$, $a = -1$) gives $$ 1 + \sqrt{7} = (-1) \cdot 2 + 3 + \sqrt{7} $$ and here the remainder has a smaller norm than $4 = N(2)$.