Given ($a$ mod $R$) and ($b$ mod $R$), is it possible to compute ($a/b$ mod $R$) even if the gcd($b$, $R$) > 1?
Asked
Active
Viewed 42 times
0
-
As long as $\gcd (b,R)=1$, sure. – Arthur Feb 24 '17 at 12:43
-
If this is not the case, A assume not because I cant compute the module inverse to compute $ab^{-1}$ mod $R$ - right? – Peter W. Feb 24 '17 at 12:51
-
See this answer.. 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. – Bill Dubuque Feb 24 '17 at 13:56
1 Answers
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$.

Arthur
- 199,419