Inequalities when proving the division algorithm with induction

37 Views Asked by At

Math enthusiast here. I am working on the proof of the division algorithm using induction.

From this website I found an explanation that resonated with me. Unfortunately I am struggling on a specific part, namely:

Since $0 \leq r < b$ we know $0 \leq r \leq (b-1)$. If $0 \leq r < b-1$, then $0 \leq (r+1) < b$, and the statement still holds with the same choice of $q$ and $r+1$ in place of $r$. On the other hand, if $r = b-1$, then $r+1 = b$ and we have...

How can $r + 1 = b$ and $r + 1 < b$ be $true$ at the same time? What am I missing?

Any hints would be greatly appreciated.

1

There are 1 best solutions below

0
On BEST ANSWER

Since $0\leq r<b$ then $0\leq r\leq b-1$, and we have two cases to consider: $r<b-1$ or $r=b-1$.
We are trying to find non-negative integers r and q such that $k+1=qb+r+1$ for $0\leq r <b$.

  • For the case when $r<b-1$ then $0\leq r+1 <b$ and we can take the $new$ r to be $r+1$, while $q$ remains the same
  • For the case when $r=b-1$ then $r+1=b$ so we have $k+1=qb+b=(q+1)b+0$, so the $new$ $q$ is $(q+1)$ and $r=0$.

So indeed there exists non-negative integers $r$ and $q$ such that $k+1=qb+r+1$ where $0\leq r <b$ are required.