For $m,n>0$, $\exists u,v$ with $-n/2\leq v\leq n/2, m=un+v$

20 Views Asked by At

By Euclids's Algorithm, $\exists q,r, m=qn+r, 0\leq r<n$.

If $0\leq r<n, u=q, v=r$.

If $n/2<r<n, u=q+1, v=r-n$.

Is this correct?

1

There are 1 best solutions below

0
On BEST ANSWER

It should be $r \leqslant \frac{n}{2}$ in the first case. Otherwise, it works. In fact, you can choose any interval for $v$ and expect unique representation as long as the interval has the same length as $[0,n-1]$. You must also change the bound for $v$ to $$-\frac{n}{2}<v\leqslant\frac{n}{2}$$ As $v \neq -\frac{n}{2}$ in any case.