Please help me out in performing modulo operation on a fraction. I saw a reference to Gauss algorithm but was not able to find anything there.
example : (1/4) mod 23. What is the answer to this? And detailed step by step explanation is highly appreciated. Thanks
You need to find the multiplicative inverse of 4 modulo 23, that is, an integer $q$ with $4\cdot q \equiv 1 \pmod{23}.$ For this, use the extended Gauss algorithm to find integers $p$ and $q$ such that $23\cdot p+4\cdot q =1,$ which is possible since $\gcd(23,4)=1.$ It follows that $q=1/a \pmod{23}.$