1

I have to find a value for $r$ such that it is within the bounds of a modular equation. For example:

$$2381\equiv r\mod{87}$$

So I need to find $0\leq r<87$.

How can I do this? The notes I took in class are absolutely horrible so I can't find the instructions that were given to do so.

I'm looking of course to do so without repeated subtraction of $87$ from $2381$

Mirrana
  • 9,009
  • 1
    Isn't this just division? – Ishan Banerjee Mar 28 '13 at 14:59
  • It might very well be... but I'm not thinking straight right now due to panic over upcoming exams. Or maybe I'm overthinking things. Thanks :P – Mirrana Mar 28 '13 at 15:02
  • It is (more or less) ordinary division with integer quotient and remainder $r$. Some calculators will do it directly. Many computer languages have it as a basic operation. You can do it quickly also with a very basic calculator. Need to be careful if same question with $-2381$. – André Nicolas Mar 28 '13 at 15:17

2 Answers2

3

Do long division. Divide $2381$ by $87$. The number $r$ that you seek will be the remainder.

0

The remainder can often be computed more simply than rote division by using modular arithmetic, e.g. with practice, one can calculate it $ $ mentally $ $ in $< 10$ seconds as below

$$\begin{eqnarray}\rm\ mod\ 87\!:\ \ 2381 &\equiv\:& 23(100)+81\\ &\equiv& 23(13)\ -\ 6 &&\rm\ by\ \ 100\equiv 13,\ \ 81\equiv -6\\ &\equiv& 23(4(3)\!+\!1)\!-\!6 \\ &\equiv& 92(3)\,+ 23 - 6 \\ &\equiv& \ \ 5(3) + 17\equiv 32 &&\rm\ by\ \ 92\equiv 5\end{eqnarray}$$

Math Gems
  • 19,574