0
$\begingroup$

Given ($a$ mod $R$) and ($b$ mod $R$), is it possible to compute ($a/b$ mod $R$) even if the gcd($b$, $R$) > 1?

  • 0
    As long as $\gcd (b,R)=1$, sure.2017-02-24
  • 0
    If this is not the case, A assume not because I cant compute the module inverse to compute $ab^{-1}$ mod $R$ - right?2017-02-24
  • 0
    See [this answer.](http://math.stackexchange.com/a/2053174/242). You'd probably have received more detailed answers had you not accepted an answer so quickly. That's almost never the best course of action.2017-02-24

1 Answers 1

0

If $\gcd (b, R)= 1$, then $b^{-1} \equiv b^{\phi(R)-1}$, where $\phi$ is the Euler totient function, and $a/b = ab^{-1}$ is relatively straight-forward to calculate. One may also use the Carmichael function in place of the totient function. There are other ways to calculate $b^{-1}$ as well, but they usually depend specifically on $b$ and $R$ specifically, and are not as applicable in general.

If $\gcd(b, R) = n \neq 1$, then there are either $n$ possible values to $a/b$ (if we interpret $x = a/b$ to mean $bx = a$), or there are none. For instance, $2/3$ has no value modulo $6$, but $3/3$ has the three values $1, 3, 5$, since $1\cdot 3 \equiv 3\cdot 3 \equiv 5\cdot 3 \equiv 3$.