Multiplicative Inverse
()
sjLin
February 28, 2022
a Z, n Z
+
ax 1 (mod n)xa mod nmultiplicative inversex
xa mod n(least multiplicative inverse)a
1
(mod n)
a Z, n Z
+
gcd(a, n) = 1, a mod n
gcd(a, n) = 1a, n使s, t Zas + nt = 1 as + nt 1 (mod n)nt 0 (mod n)
as 1 (mod n)
sa (mod n)
-92
Find the inverse of 4 modulo 7.
Ans.
s, t Z使4s + 7t = 1
Eulidean Algorithm
7 = 1 · 4 + 3
4 = 1 · 3 + 1
1 = 4 1 · 3
1 = 4 1(7 1 · 4)
1 = (1) · 7 + 2 · 4
1 = (1 4k) · 7 + (2 + 7k) · 4, k Z
2 + 7k, k Z4 (mod 7)
1
-98
Find the least positive integer x satisfying he congruence:
531x 1 (mod 1769)
Ans.
Eulidean Algorithm
1769 = 3 · 531 + 176
531 = 3 · 176 + 3
176 = 58 · 3 + 2
3 = 1 · 2 + 1
1 = 3 2
= 3 (176 58 · 3)
= 3 176 + 58 · 3
= (1) · 176 + 59 · 3
= (1) · 176 + 59 · 531 177 · 176
= (178) · 176 + 59 · 53
= (178) · (1769 3 · 531) + 59 · 531
= (178) · 1769 + 593 · 531
531
1
(mod 1769)593
ax b (mod n)
-98
Solve the linear congruence 7x 13 (mod 19) to find all the integer solutions x.
Ans.
gcd(7, 19) = 1整數(s, t)使7s + 19t = 1Eulidean Algorithm
19 = 2 · 7 + 5
7 = 1 · 5 + 2
5 = 2 · 2 + 1
1 = 5 2 · 2
= 5 2(7 5)
= 3 · 5 + (2) · 7
= 3(19 2 · 7) + (2) · 7
= 3 · 19 + (8) · 7
137x 13 (mod 19)
13 = 39 · 19 + (104) · 7
13 = (39 7k) · 19 + (104 + 19k) · 7, k Z
104 10 (mod 19)
10 + 19k, k Zx
2
a Zpaa (mod p) a ±1 (mod p)
()
aa (mod p)
a
2
1 (mod p)
p|(a
2
1)
p|(a 1)(a + 1)
p|(a 1)p|(a + 1)
mod
a 1 (mod p)a 1 (mod p)
()
a ±1 (mod p)a
2
1 (mod p)
aa (mod p)
3