1) a) 2^(2^2006) = 4 ^ 2006 = 1 ^ 2006 (mod 3) = 1 b) By Fermat’s little theorem, p = 31 is prime 5^30 = 1 (mod 31) 6^30 = 1 (mod 31) Now, 5^30000 = 5 ^ rem(30000,30) (mod 31) = 1 6^123456 = 6^6*6^123450 = 6^6 *6^rem(123450,30) (mod 31) = 6^6 (mod 31) = 1 Hence 5^30000 – 6^123456 = (1-1) (mod 31) = 0. Hence the difference is a multiple of 31. 2)The necessary and sufficient condition on x and c is gcd(x,c) =1 . 3) Modular inverse of a (mod m) exists iff gcd(a,m) = 1 a) 20 (mod 79) Let us find the gcd(20,79) using Extended Euclids theorem. Iteration # 1 2 3 4 Q 0 3 1 19 a 20 79 20 19 1 From the table, gcd(20,79) = 1 = 4(20) -1(79) Multiplicative inverse = 4 b) 3 (mod 62) GCD(3,62) A (1,0) (0,1) (1,0) (-3,1) (4,-1) b 79 20 19 1 0 B (0,1) (1,0) (-3,1) (4,-1) (-76,20) Iteration # 1 2 3 4 Q 0 0 20 1 2 a 3 62 3 2 1 A (1,0) (0,1) (1,0) (-20,1) (21,-1) b 62 3 2 1 0 B (0,1) (1,0) (-20,1) (21,-1) (-62,3) From the table, GCD(3,62) = 1 = (21)(3) + (-1)(62) Multiplicative inverse = 21 c) 21 (mod 91) As we can see, GCD(21,91) = 7 the multiplicative inverse does not exist because 21 and 91 are not relatively prime. d) 5 (mod 23) GCD(5,23) using Extended Euclid’s Theorem Iteration # 1 2 3 4 5 Q 0 0 4 1 1 2 a 5 23 5 3 2 1 From the table, GCD(5,23) = 1 = (-9)(5) + (2)(23) Multiplicative inverse = -9. 4) GCD(210,588) 210 = 2 * 105 = 2 * 3 * 35 = 2* 3 * 5 * 7 = (2^1) * (3^1) * (5^1) * (7^1) 588 = 2 * 294 = 2 * 2 * 147 A (1,0) (0,1) (1,0) (-4,1) (5,-1) (-9,2) b 23 5 3 2 1 0 B (0,1) (1,0) (-4,1) (5,-1) (-9,2) (23,-5) = 2 * 2 * 3 * 49 =2*2*3*7*7 = (2^2) * (3^1) * (7^2) Hence, GCD(210,588) = (2^min(1,2)) * (3^min(1,1)) * (7^min(1,2)) = 2*3*7 = 42 5) GCD(210,588) using Extended Euclids theorem Iteration # 1 2 3 4 Q 0 0 2 1 4 a 210 588 210 168 42 From the table, GCD(210,588) = 42, x = 3 and y = -1. A (1,0) (0,1) (1,0) (-2,1) (3,-1) B 588 210 168 42 0 B (0,1) (1,0) (-2,1) (3,-1) (-14,5)
© Copyright 2024 Paperzz