Use Euclid’s algorithm to find gcd(66, 45).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 66b = 45
gcd(66, 45) =
2.Easy
Use Euclid’s algorithm to find gcd(80, 46).
a = 80b = 46
gcd(80, 46) =
3.Medium
Find the inverse of 5 modulo 19: the number x with 0 < x < 19 and 5·x ≡ 1 (mod 19).
a = 5n = 19
5−1 mod 19 =
4.Medium
Find the smallest positive integer x with x ≡ 4 (mod 5) and x ≡ 5 (mod 6).
x ≡ 4 (mod 5)x ≡ 5 (mod 6)
x =
5.Hard
Encrypt the message m = 336 with the RSA public key (n, e) = (377, 23). Find the ciphertext c.
n = 377e = 23m = 336
c =
6.Hard
Solve 10x ≡ 4 (mod 18). Give the smallest positive solution x.
10x ≡ 4 (mod 18)
x =
Answer key
- 1. gcd(66, 45) = 3
- 2. gcd(80, 46) = 2
- 3. 5−1 mod 19 = 4
- 4. x = 29
- 5. c = 331
- 6. x = 4
Full step-by-step solutions: practise this topic on examproblems.com.