Euclid's Division Lemma Extended to Negative Integers Conflict

409 Views Asked by At

My textbook states that Euclid's Division Lemma can be extended to all integers with the following information:

Let a and b be any two integers with b ≠ 0. Then, there exist unique integers q and r such that

a = bq + r, where 0 ≤ r < |b|

Suppose I take a = -16 and b = 3. In this case, q = -5 and r = -1. Won't this contradict the fact that r must be greater than or equal to 0?

Thanks in advance.

1

There are 1 best solutions below

0
On BEST ANSWER

Suppose I take a = -16 and b = 3. In this case...

$q=-6$ and $r=2$.

And if $16=3q_1+r_1=3q_2+r_2$ for some $r_1,r_2\in\{0,1,2\}$, then $r_1-r_2=3(q_2-q_1)$ and $-3<r_1-r_2<3$. Since $r_1-r_2$ must be a multiple of $3$, $r_1=r_2$ and, therefore, $q_1=q_2$.