3
$\begingroup$

The two possible ways to find the reminder,

$-1 = -1 \times 2+1$

$-1 = - 0 \times 2-1$

From the above calculation, I have found different quotients: $+1$ and $-1$. If I am asked to tell that if the reminder is greater than $0$ then how can I give the answer?

$\endgroup$

5 Answers 5

4
$\begingroup$

Remainders are usually defined to be positive. That is, the division algorithm says that for any integers $p$ and $q$, with $q\neq 0$, there exists integers $b$ and $r$ such that

$$p=bq+r$$

where $0\le r < q$.

The $0\le r<q$ is the key part here. As a matter of convenience, we often conform to this by writing, for example, $-1=(-1)(2)+1$, and the remainder is $1$.

$\endgroup$
0
2
$\begingroup$

This is a modular feature, and is just a matter of how you write the answer.

We can say, for example, $5$ is both $2\mod 3$ and $-1\mod 3$ and they both mean the same thing.

$\endgroup$
1
$\begingroup$

Up to you. Some people define the remainder to be positive, if so then 1 is the answer. Otherwise both are correct.

$\endgroup$
0
$\begingroup$

First of all, -0 doesn't make sense. And I think you mean to say you've found remainder to be +1 and -1 in the two cases. So, in general you should include both the cases in your answer.

$\endgroup$
1
  • $\begingroup$ $-0$ makes perfect sense. It can of course be simplified, but it does parse. $\endgroup$
    – user296602
    Dec 16, 2015 at 21:57
-1
$\begingroup$

You have found something along the lines of modular arithmetic.

Imagine a clock with twelve hours. On this clock, 9 o'clock = 21 o'clock.

In math form this would be $9=21(\mod{12})$

Imagine a different clock with only 2 hours.

We would then have $$a=2n+a(\mod2)$$The $2n$ would disappear and make no difference because it simply represents an addition of $2$ $n$-times, which disappear in modular arithmetic.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .