I have this question on a test
1) find d=gcd(77,50) using euclidean alg.
2)find s and t such that 77s+50t=d
3) use these results to find x such that 50x=4(mod77) Note:the qual sign should have 3 lines
For the first part i found d=1 no problem there, for 2nd part at took me some twinking but i found s=13 and t=-20. my question is first is there a shortcut to doing 2nd part fast without trying to plug in random numbers and two for the third part how do i find x using my previous results.
The general answer to your second part is that you use the Extended Euclidian Algorithm instead of the simple EA. From your result $s=13$ and $t=-20$ you know that the multipication modular inverse of 50 exist $$50\times (-20) + 77\times 13 = 1 \quad \Longrightarrow 50\times (-20) \equiv 50\times 57 \equiv 1 \pmod {77}$$ and is $57 \pmod {77}$. To solve the the third part you simply multiply with this inverse $$50x \equiv 4 \pmod {77}$$ $$\Longrightarrow 50^{-1}\times50 x\equiv 50^{-1}\times 4 \pmod {77}$$ $$\Longrightarrow x \equiv 50^{-1}\times 4 \equiv 57\times 4 \equiv 228 \equiv 74 \pmod {77}.$$ And as a check you verify that $$74\times 50 \equiv 3700 \equiv 4 \pmod {77}.$$