Use the Euclidean algorithm to express 1 as a linear combination of
and
.
a.
because
77 = 1*52 + 25
52 = 2*25 + 2
25 = 12*2 + 1
so we can write
1 = 25 - 12*2 = 25*25 - 12*52 = (77 - 52)(77 - 52) - 12*52 = 77^2 - 2*52*77 + 52^2 - 12*52
Taken modulo 77 leaves us with
![1\equiv52\cdot52-12\cdot52\equiv40\cdot52\pmod{77}\implies52^{-1}\equiv40\pmod{77}](https://tex.z-dn.net/?f=1%5Cequiv52%5Ccdot52-12%5Ccdot52%5Cequiv40%5Ccdot52%5Cpmod%7B77%7D%5Cimplies52%5E%7B-1%7D%5Cequiv40%5Cpmod%7B77%7D)
b. First,
, so really we're looking for the inverse of 25 mod 52. We've basically done the work in part (a) already:
1 = 25*25 - 12*52
Taken modulo 52, we're left with
![1\equiv25\cdot25\pmod{52}\implies25^{-1}\equiv25\pmod{52}](https://tex.z-dn.net/?f=1%5Cequiv25%5Ccdot25%5Cpmod%7B52%7D%5Cimplies25%5E%7B-1%7D%5Cequiv25%5Cpmod%7B52%7D)
c. The EA gives
71 = 1*53 + 18
53 = 2*18 + 17
18 = 1*17 + 1
so we get
1 = 18 - 17 = 3*18 - 53 = 3*71 - 4*53
so that taken module 71, we find
![1\equiv(-4)\cdot53\pmod{71}\implies53^{-1}\equiv-4\equiv67\pmod{71}](https://tex.z-dn.net/?f=1%5Cequiv%28-4%29%5Ccdot53%5Cpmod%7B71%7D%5Cimplies53%5E%7B-1%7D%5Cequiv-4%5Cequiv67%5Cpmod%7B71%7D)
d. Same process as with (b). First we have
, and we've already shown that
1 = 3*18 - 53
which means, taken modulo 53, that
![1\equiv3\cdot18\pmod{53}\implies71^{-1}\equiv18^{-1}\equiv3\pmod{53}](https://tex.z-dn.net/?f=1%5Cequiv3%5Ccdot18%5Cpmod%7B53%7D%5Cimplies71%5E%7B-1%7D%5Cequiv18%5E%7B-1%7D%5Cequiv3%5Cpmod%7B53%7D)