1 / 81

Inverses and GCDs

Inverses and GCDs. Supplementary Notes. Prepared by Raymond Wong. Presented by Raymond Wong. 7 | 30. e.g.1 (Page 4). E.g., 30 can be expressed as 1 x 2 x 3 x 5. composite. 1 | 30. 1 divides 30. 6 | 30. 7 does not divide 30. 6 divides 30. 10 | 30. 10 divides 30.

tiger
Télécharger la présentation

Inverses and GCDs

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Inverses and GCDs Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong

  2. 7 | 30 e.g.1 (Page 4) • E.g., 30 can be expressed as 1 x 2 x 3 x 5 composite 1 | 30 1 divides 30 6 | 30 7 does not divide 30 6 divides 30 10 | 30 10 divides 30 2 | 30 2 divides 30 15 | 30 15 divides 30 3 | 30 3 divides 30 30 | 30 30 divides 30 5 | 30 5 divides 30

  3. 7 | 24 e.g.2 (Page 4) • E.g., 24 can be expressed as 1 x 2 x 2 x 2 x 3 composite 1 | 24 1 divides 24 4 | 24 7 does not divide 24 4 divides 24 6 | 24 6 divides 24 2 | 24 2 divides 24 3 | 24 3 divides 24 8 | 24 8 divides 24 12 | 24 12 divides 24 24 | 24 24 divides 24

  4. 7 | 11 e.g.3 (Page 4) • E.g., 11 can be expressed as 1 x 11 prime 1 | 11 1 divides 11 7 does not divide 11 11 | 11 11 divides 11

  5. e.g.4 (Page 4) • E.g., Is the following correct? 7 | 0 0 can be expressed as 0 x 7

  6. e.g.5 (Page 5) • E.g., What is gcd(7, 0)? 7 | 7 and 7 | 0 • E.g., Let n be a non-negative integer. What is gcd(n, 0)? n | n and n | 0

  7. e.g.6 (Page 7) • Illustration of Theorem 2.15 • E.g., j = 27 k = 58 if 27 and 58 are relatively prime (i.e., gcd(27, 58) = 1) then there exists two integers x and y such that 27x + 58y = 1 x = -15 y = 7 there exists two integers x and y such that 27x + 58y = 1 if then 27 and 58 are relatively prime (i.e., gcd(27, 58) = 1)

  8. e.g.6 (Page 7) • Illustration of Corollary 2.16 • E.g. a = 27 n = 58 if 27 has a multiplicative inverse (with respect to 58) then gcd(27, 58) = 1 if gcd(27, 58) = 1 then 27 has a multiplicative inverse (with respect to 58)

  9. e.g.7 (Page 10) • E.g., m = 21 n = 9 21 can be expressed as 9 x 2 + 3 (i.e., nq + r) r is defined to be 21 mod 9 q = 2 r = 3 21 mod 9 is equal to 3 0  r < n

  10. e.g.8 (Page 11) • Illustration of “Proof by Contradiction” We are going to prove that a claim C is correct Proof by Contradiction: Suppose “NOT C” …. Derive some results, which may contradict to 1. “NOT C”, OR 2. some facts e.g., we derived that C is true finally e.g., we derived that “1 = 4”

  11. e.g.9 (Page 11) Suppose that I want to prove that the above claim is correct by “Proof by Contradiction”. • Illustration of “Proof by smallest counter example” We are going to prove the following claim C: statement P(m) is true for each non-negative integer m, namely 0, 1, 2, … P(0) true If we can prove that statement P(m) is true for each non-negative integer separately, then we can prove the above claim C is correct. P(1) true P(2) true P(3) true P(4) true … true

  12. e.g.9 Suppose that I want to prove that the above claim is correct by “Proof by Contradiction”. • Illustration of “Proof by smallest counter example” We are going to prove the following claim C: statement P(m) is true for each non-negative integer m, namely 0, 1, 2, … P(0) true Suppose “NOT C”. We can assume that there exists a non-negative integer k’ such that P(k’) is false P(1) true P(2) true false P(3) true There may exist another non-negative integer k such that P(k) is false P(4) true false … true

  13. e.g.9 Suppose that I want to prove that the above claim is correct by “Proof by Contradiction”. • Illustration of “Proof by smallest counter example” We are going to prove the following claim C: statement P(m) is true for each non-negative integer m, namely 0, 1, 2, … P(0) true Suppose “NOT C”. P(1) true We can assume that there exists a smallest non-negative integer k such that P(k) is false P(2) true false P(3) true Why? P(4) true false This is called by “Proof by smallest counter example”. … true

  14. e.g.10 (Page 11) • We want to prove the following theorem. Theorem 2.12 (Euclid’s Division Theorem): Let n be a positive integer. For every nonnegative integer m, there exist unique integers q, r such that m = nq + r and 0  r < n

  15. e.g.10 • We want to prove the following theorem. Theorem 2.12 (Euclid’s Division Theorem): Let n be a positive integer. For every nonnegative integer m, there exist unique integers q, r such that m = nq + r and 0  r < n Claim 1: For every nonnegative integer m, there exist integers q, r such that m = nq + r and 0  r < n Claim 2: This pair q, r is unique.

  16. e.g.10 Claim 1: For every nonnegative integer m, there exist integers q, r such that m = nq + r and 0  r < n

  17. Claim 1: For every nonnegative integer m, there exist integers q, r such that m = nq + r and 0  r < n e.g.10 P(m) Proof by contradiction. Claim C Suppose that there exists an integer m that P(m) is false Proof by smallest counter example. Suppose that there exists a “smallest” integer m that P(m) is false There do not exist integers q, r such that m = nq + r and 0  r < n Consider two cases. Case 1: m < n Case 2: m  n We can write m = 0 + m = n.0 + m = nq + r where q = 0 and r = m We conclude that there exist integers q, r such that m = nq + r and 0  r < n Contradiction

  18. Claim 1: For every nonnegative integer m, there exist integers q, r such that m = nq + r and 0  r < n e.g.10 P(m) Proof by contradiction. Claim C Suppose that there exists an integer m that P(m) is false Proof by smallest counter example. Suppose that there exists a “smallest” integer m that P(m) is false There do not exist integers q, r such that m = nq + r and 0  r < n Consider two cases. Case 2: m  n

  19. Claim 1: For every nonnegative integer m, there exist integers q, r such that m = nq + r and 0  r < n e.g.10 P(m) Proof by contradiction. Claim C Suppose that there exists an integer m that P(m) is false Proof by smallest counter example. Suppose that there exists a “smallest” integer m that P(m) is false There do not exist integers q, r such that m = nq + r and 0  r < n Consider m-n = nq’ + r’ Consider two cases. Case 2: m  n m = nq’ + n + r’ We know that m-n  0 = n(q’ + 1) + r’ = nq + r Thus, m-n is a non-negative integer. where q = q’+1 and r = r’ Since m-n is smaller than m, We conclude that there exist integers q, r such that m = nq + r and 0  r < n there exist integers q’, r’ such that m-n = nq’ + r’ and 0  r’ < n Contradiction

  20. Claim 1: For every nonnegative integer m, there exist integers q, r such that m = nq + r and 0  r < n e.g.10 P(m) Proof by contradiction. Claim C Suppose that there exists an integer m that P(m) is false Proof by smallest counter example. Suppose that there exists a “smallest” integer m that P(m) is false There do not exist integers q, r such that m = nq + r and 0  r < n Consider two cases. In both cases, there are contradictions. This implies that Claim 1 is correct.

  21. e.g.10 • We want to prove the following theorem. Theorem 2.12 (Euclid’s Division Theorem): Let n be a positive integer. For every nonnegative integer m, there exist unique integers q, r such that m = nq + r and 0  r < n Claim 1: For every nonnegative integer m, there exist integers q, r such that m = nq + r and 0  r < n Claim 2: This pair q, r is unique.

  22. e.g.10 Claim 1: For every nonnegative integer m, there exist integers q, r such that m = nq + r and 0  r < n Claim 2: This pair q, r is unique.

  23. Claim 1: For every nonnegative integer m, there exist integers q, r such that m = nq + r and 0  r < n e.g.10 Claim 2: This pair q, r is unique. Proof by contradiction. Suppose that this pair q, r is not unique. There exists a pair (q, r) and another pair (q’, r’) (where (q, r)  (q’, r’)) such that m = nq + r …(*) and 0  r < n and m = nq’ + r’ …(**) and 0  r’ < n What is the greatest possible value? Consider (*) – (**) Consider r’ - r < n - r m - m = (nq+r) – (nq’ + r’) r’ – r < n n - 0 0 = nq+r – nq’ - r’ = n 0 = n(q-q’)+(r - r’) What is the smallest possible value? r’ - r = n(q-q’) r’ – r > -n Consider r’ - r > r’ - n n(q-q’)= r’ - r 0 - n -(r’ – r) < n We conclude that |r’ – r| < n = -n

  24. Claim 1: For every nonnegative integer m, there exist integers q, r such that m = nq + r and 0  r < n e.g.10 Claim 2: This pair q, r is unique. Proof by contradiction. Suppose that this pair q, r is not unique. There exists a pair (q, r) and another pair (q’, r’) (where (q, r)  (q’, r’)) such that m = nq + r …(*) and 0  r < n and m = nq’ + r’ …(**) and 0  r’ < n We conclude that |r’ – r| < n Consider (*) – (**) integer |n(q-q’)| < n m - m = (nq+r) – (nq’ + r’) We conclude that q – q’ = 0 0 = nq+r – nq’ - r’ q = q’ 0 = n(q-q’)+(r - r’) Note that n(q-q’)= r’ - r r’ - r = n(q-q’) 0 = r’ – r n(q-q’)= r’ - r r = r’ Contradiction We conclude that q = q’ and r = r’ (i.e., (q, r) = (q’, r’)) We conclude that |r’ – r| < n

  25. e.g.11 (Page 17) • Illustration of Lemma 2.13 k = 102 j = 70 Consider two integers 102 and 70. Suppose that we can write 102 as 102 = 70.1 + 32 q = 1 r = 32 According to the lemma, we have gcd(102, 70) = gcd(70, 32)

  26. e.g.12 (Page 17) • Prove the following lemma is correct. If j, k, q and r are non-negative integers such that k = jq + r then gcd(j, k) = gcd(r, j)

  27. If j, k, q and r are non-negative integers such that k = jq + r then gcd(j, k) = gcd(r, j) e.g.12 Consider two cases. Case 2: r > 0 Case 1: r = 0 e.g., if 10 = 2q then gcd(2, 10) = 2 Since k = jq + r, we have k = jq Consider gcd(j, k) = j e.g., gcd(0, 7) = 7 Consider gcd(r, j) = gcd(0, j) = j Thus, gcd(j, k) = gcd(r, j)

  28. If j, k, q and r are non-negative integers such that k = jq + r then gcd(j, k) = gcd(r, j) e.g.12 Consider two cases. Case 2: r > 0

  29. If j, k, q and r are non-negative integers such that k = jq + r then gcd(j, k) = gcd(r, j) e.g.12 Consider two cases. Case 2: r > 0 We want to prove the following. Claim 1: If d is a common divisor of j and k, then d is a common divisor of r and j. Claim 2: If d is a common divisor of r and j, then d is a common divisor of j and k.

  30. If j, k, q and r are non-negative integers such that k = jq + r then gcd(j, k) = gcd(r, j) e.g.12 Claim 1: If d is a common divisor of j and k, then d is a common divisor of r and j. Consider two cases. Case 2: r > 0 Let d be a common divisor of j and k d is a divisor of j j can be written as j = i1d where i1 is a non-negative integer d is a divisor of k k can be written as k = i2d where i2 is a non-negative integer Consider k = jq + r r = k – jq =i2d – i1d.q =(i2 – i1q)d We conclude that d is a divisor of r Since d is a divisor of j d is a common divisor of r and j

  31. If j, k, q and r are non-negative integers such that k = jq + r then gcd(j, k) = gcd(r, j) e.g.12 Claim 1: If d is a common divisor of j and k, then d is a common divisor of r and j. Consider two cases. Claim 2: If d is a common divisor of r and j, then d is a common divisor of j and k. Case 2: r > 0 Let d be a common divisor of r and j d is a divisor of r r can be written as r = i3d where i3 is a non-negative integer d is a divisor of j j can be written as j = i1d where i1 is a non-negative integer Consider k = jq + r = i1d.q + i3d = (i1q + i3)d We conclude that d is a divisor of k Since d is a divisor of j d is a common divisor of j and k

  32. 2 2 5 5 3 11 11 3 7 … … 7 If j, k, q and r are non-negative integers such that k = jq + r then gcd(j, k) = gcd(r, j) e.g.12 Claim 1: If d is a common divisor of j and k, then d is a common divisor of r and j. Consider two cases. Claim 2: If d is a common divisor of r and j, then d is a common divisor of j and k. Case 2: r > 0 From Claim 1 and Claim 2, we conclude that d is a common divisor of j and k if and only if d is a common divisor of r and j. d is not a common divisor of j and k if and only if d is not a common divisor of r and j. A set of common divisors of j and k A set of common divisors of r and j A set of non-common divisors of r and j A set of non-common divisors of j and k We conclude that gcd(j, k) = gcd(r, j)

  33. e.g.13 (Page 17) • How to use Lemma 2.13 for Euclid’s GCD algorithm Suppose that we want to find gcd(102, 70) k = 102 J = 70 We can use Lemma 2.13 to compute gcd(102, 70) Consider two integers 102 and 70. Suppose that we can write 102 as 102 = 70.1 + 32 q = 1 r = 32 This corresponds to r. r decreases and finally its value becomes 0. According to the lemma, we have gcd(102, 70) = gcd(70, 32) Note that 70 = 32.2 + 6 gcd(70, 32) = gcd(32, 6) Note that 32 = 6.5 + 2 gcd(32, 6) = gcd(6, 2) Note that 6 = 2.3 + 0 gcd(6, 2) = gcd(2, 0) Thus, gcd(102, 70) = gcd(2, 0) = 2

  34. e.g.13 Suppose that we want to find gcd(102, 70) k = j.q + r k j q r 102 70 1 32 102 = 70.1 + 32 70 32 2 6 70 = 32.2 + 6 32 = 6.5 + 2 32 6 5 2 6 2 3 0 6 = 2.3 + 0 gcd(102, 70) = gcd(2, 0) = 2

  35. e.g.14 (Page 24) • Definition of Multiplicative Inverse • Given a positive integer n, • we define Zn = {0, 1, 2, …, n-1} • Given a value a  Zn, • a is said to have a multiplicative inverse a’ in Zn if a’ .n a = 1

  36. e.g.14 • E.g., n = 9 Z9 = {0, 1, 2, …, 8} Does 2 have a multiplicative inverse in Z9? We may try all possible values in Z9 0 .9 2 = 0 0 is not a multiplicative inverse of 2 in Z9 1 .9 2 = 2 1 is not a multiplicative inverse of 2 in Z9 2 .9 2 = 4 2 is not a multiplicative inverse of 2 in Z9 3 .9 2 = 6 3 is not a multiplicative inverse of 2 in Z9 4 .9 2 = 8 4 is not a multiplicative inverse of 2 in Z9 5 .9 2 = 1 5 is a multiplicative inverse of 2 in Z9 6 .9 2 = 3 6 is not a multiplicative inverse of 2 in Z9 7 .9 2 = 5 7 is not a multiplicative inverse of 2 in Z9 8 .9 2 = 7 8 is not a multiplicative inverse of 2 in Z9 Yes 2 has a multiplicative inverse 5 in Z9.

  37. e.g.14 • E.g., n = 9 Z9 = {0, 1, 2, …, 8} Does 3 have a multiplicative inverse in Z9? We may try all possible values in Z9 0 .9 3 = 0 0 is not a multiplicative inverse of 3 in Z9 1 .9 3 = 3 1 is not a multiplicative inverse of 3 in Z9 2 .9 3 = 6 2 is not a multiplicative inverse of 3 in Z9 3 .9 3 = 0 3 is not a multiplicative inverse of 3 in Z9 4 .9 3 = 3 4 is not a multiplicative inverse of 3 in Z9 5 .9 3 = 6 5 is not a multiplicative inverse of 3 in Z9 6 .9 3 = 0 6 is not a multiplicative inverse of 3 in Z9 7 .9 3 = 3 7 is not a multiplicative inverse of 3 in Z9 8 .9 3 = 6 8 is not a multiplicative inverse of 3 in Z9 No 3 does not have a multiplicative inverse in Z9.

  38. e.g.15 (Page 25) • Illustration of Lemma 2.5 • Suppose that we want to find a value x in Z9 such that 2 .9x = 3 ……………(*) If 2 has a multiplicative inverse 5 in Z9 Why is it correct? then x = 5 .9 3 and this solution is unique. 2 .9x = 3 Why is this solution unique? 5 .9 (2 .9x) = 5 .9 3 The computation/derivation in the right-hand-side box is valid for anyx that satisfies equation (*). (5 .9 2) .9x = 5 .9 3 1 .9x = 5 .9 3 Thus, we conclude that onlyx that satisfies the equation (*) is 5 .9 3 x = 5 .9 3

  39. e.g.16 (Page 26) • Illustration of Theorem 2.7 If 2 has a multiplicative inverse 5 in Z9 then the inverse 5 is unique. Why is it correct? According to Lemma 2.5 Consider 2 .9x = b ……(*) If 2 has a multiplicative inverse 5 in Z9 then x = 5 .9 b and this solution is unique. If we set b = 1, the equation (*) becomes 2 .9x = 1 According to the inverse definition,x is an inverse of 2 According to Lemma 2.5, we have x = 5 .9 1 and this solution is unique.

  40. e.g.17 (Page 27) • Please find each non-zero value a  Z5 such that a has a multiplicative inverse a’ in Z5. (i.e., a .5 a’ = 1) For each non-zero a  Z5 and each non-zero b  Z5, we compute a .5 b if the above answer = 1 then we know that a has a multiplicative inverse b in Z5 or b has a multiplicative inverse a in Z5

  41. a = 3 and b = 1 a = 3 and b = 2 a = 3 and b = 3 a = 3 and b = 4 3 .5 1 = 3 3 .5 2 = 1 3 .5 3 = 4 3 .5 4 = 2 a = 4 and b = 1 a = 4 and b = 2 a = 4 and b = 3 a = 4 and b = 4 4 .5 1 = 4 4 .5 2 = 3 4 .5 3 = 2 4 .5 4 = 1 For each non-zero a  Z5 and each non-zero b  Z5, we compute a .5 b e.g.17 if the above answer = 1 then we know that a has a multiplicative inverse b in Z5 or b has a multiplicative inverse a in Z5 Z5 = {0, 1, 2, 3, 4} a = 1 and b = 1 a = 1 and b = 2 a = 1 and b = 3 a = 1 and b = 4 1 .5 1 = 1 1 .5 2 = 2 1 .5 3 = 3 1 .5 4 = 4 a = 2 and b = 1 a = 2 and b = 2 a = 2 and b = 3 a = 2 and b = 4 2 .5 1 = 2 2 .5 2 = 4 2 .5 3 = 1 2 .5 4 = 3

  42. a = 3 and b = 1 a = 3 and b = 2 a = 3 and b = 3 a = 3 and b = 4 3 .5 1 = 3 3 .5 2 = 1 3 .5 3 = 4 3 .5 4 = 2 a = 4 and b = 1 a = 4 and b = 2 a = 4 and b = 3 a = 4 and b = 4 4 .5 1 = 4 4 .5 2 = 3 4 .5 3 = 2 4 .5 4 = 1 For each non-zero a  Z5 and each non-zero b  Z5, we compute a .5 b e.g.17 if the above answer = 1 then we know that a has a multiplicative inverse b in Z5 or b has a multiplicative inverse a in Z5 3 2 4 1 Z5 = {0, 1, 2, 3, 4} 1 has a multiplicative inverse 1 in Z5 a = 1 and b = 1 a = 1 and b = 2 a = 1 and b = 3 a = 1 and b = 4 2 has a multiplicative inverse 3 in Z5 3 has a multiplicative inverse 2 in Z5 1 .5 1 = 1 1 .5 2 = 2 1 .5 3 = 3 1 .5 4 = 4 a = 2 and b = 1 a = 2 and b = 2 a = 2 and b = 3 a = 2 and b = 4 2 .5 1 = 2 2 .5 2 = 4 2 .5 3 = 1 2 .5 4 = 3 3 has a multiplicative inverse 2 in Z5 2 has a multiplicative inverse 3 in Z5 4 has a multiplicative inverse 4 in Z5

  43. e.g.18 (Page 27) • Please find each non-zero value a  Z6 such that a has a multiplicative inverse a’ in Z6. (i.e., a .6 a’ = 1) For each non-zero a  Z6 and each non-zero b  Z6, we compute a .6 b if the above answer = 1 then we know that a has a multiplicative inverse b in Z6 or b has a multiplicative inverse a in Z6

  44. a = 1 and b = 1 a = 1 and b = 2 a = 1 and b = 3 a = 1 and b = 4 a = 1 and b = 5 1 .6 1 = 1 1 .6 2 = 2 1 .6 3 = 3 1 .6 4 = 4 1 .6 5 = 5 a = 2 and b = 1 a = 2 and b = 2 a = 2 and b = 3 a = 2 and b = 4 a = 2 and b = 5 2 .6 1 = 2 2 .6 2 = 4 2 .6 3 = 0 2 .6 4 = 2 2 .6 5 = 4 a = 3 and b = 1 a = 3 and b = 2 a = 3 and b = 3 a = 3 and b = 4 a = 3 and b = 5 3 .6 1 = 3 3 .6 2 = 0 3 .6 3 = 3 3 .6 4 = 0 3 .6 5 = 3 a = 4 and b = 1 a = 4 and b = 2 a = 4 and b = 3 a = 4 and b = 4 a = 4 and b = 5 4 .6 1 = 4 4 .6 2 = 2 4 .6 3 = 0 4 .6 4 = 4 4 .6 5 = 2 a = 5 and b = 1 a = 5 and b = 2 a = 5 and b = 3 a = 5 and b = 4 a = 5 and b = 5 5 .6 1 = 5 5 .6 2 = 4 5 .6 3 = 3 5 .6 4 = 2 5 .6 5 = 1 For each non-zero a  Z6 and each non-zero b  Z6, we compute a .6 b e.g.18 if the above answer = 1 then we know that a has a multiplicative inverse b in Z6 or b has a multiplicative inverse a in Z6 Z6 = {0, 1, 2, 3, 4, 5}

  45. a = 1 and b = 1 a = 1 and b = 2 a = 1 and b = 3 a = 1 and b = 4 a = 1 and b = 5 1 .6 1 = 1 1 .6 2 = 2 1 .6 3 = 3 1 .6 4 = 4 1 .6 5 = 5 a = 2 and b = 1 a = 2 and b = 2 a = 2 and b = 3 a = 2 and b = 4 a = 2 and b = 5 2 .6 1 = 2 2 .6 2 = 4 2 .6 3 = 0 2 .6 4 = 2 2 .6 5 = 4 a = 3 and b = 1 a = 3 and b = 2 a = 3 and b = 3 a = 3 and b = 4 a = 3 and b = 5 3 .6 1 = 3 3 .6 2 = 0 3 .6 3 = 3 3 .6 4 = 0 3 .6 5 = 3 a = 4 and b = 1 a = 4 and b = 2 a = 4 and b = 3 a = 4 and b = 4 a = 4 and b = 5 4 .6 1 = 4 4 .6 2 = 2 4 .6 3 = 0 4 .6 4 = 4 4 .6 5 = 2 a = 5 and b = 1 a = 5 and b = 2 a = 5 and b = 3 a = 5 and b = 4 a = 5 and b = 5 5 .6 1 = 5 5 .6 2 = 4 5 .6 3 = 3 5 .6 4 = 2 5 .6 5 = 1 For each non-zero a  Z6 and each non-zero b  Z6, we compute a .6 b e.g.18 if the above answer = 1 then we know that a has a multiplicative inverse b in Z6 or b has a multiplicative inverse a in Z6 X 5 X X 1 Z6 = {0, 1, 2, 3, 4, 5} 1 has a multiplicative inverse 1 in Z6 5 has a multiplicative inverse 5 in Z6

  46. e.g.18 Z5: Z6: Z7: Z8: Z9:

  47. Lemma 2.5Consider equation 2 .6x = b If 2 has a multiplicative inverse x’ in Z6 equation “2 .6x = b” has a solution x = x’ .6 b e.g.19 (Page 30) The equation “2x mod 6 = 3” does not have a solution • Illustration of Corollary 2.6 • If there is a b  Z6 (e.g., 3) such that 2 .6x = b ………… (*)does not have a solution, then 2 does not have a multiplicative inverse in Z6 2x is equal to an even number. 2x mod 6 is also equal to an even number. Why is it correct? Proof by contradiction Suppose that 2 has a multiplicative inverse x’ in Z6 By Lemma 2.5, we know that equation “2 .6x = b” has a solution x = x’ .6 b This leads to a contradiction that equation “2 .6x = b” does not have a solution.

  48. X 5 X X 1 In some of our previous slides, we derive that 2 does not have a multiplicative inverse in Z6by checking the table. Z6 e.g.19 The equation “2x mod 6 = 3” does not have a solution • Illustration of Corollary 2.6 • If there is a b  Z6 (e.g., 3) such that 2 .6x = b ………… (*)does not have a solution, then 2 does not have a multiplicative inverse in Z6 2x is equal to an even number. 2x mod 6 is also equal to an even number. How will we use this corollary? Consider that the exam question asks you whether 2 has a multiplicative inverse in Z6. Suppose that we find that the equation “2x mod 6 = 3” does not have a solution (i.e., 2 .6 x = 3 does not have a solution) According to this corollary, we conclude that 2 does not have a multiplicativeinverse in Z6.

  49. e.g.20 (Page 36) • Illustration of Lemma 2.8 The modular equation 2 .7 x = 1 has a solution in Z7 if and only if there exist integers x, y such that 2x + 7y = 1 Only if Suppose that we know the modular equation 2 .7 x = 1 has a solution x = 4 We know that there exist integers x, y such that 2x + 7y = 1(In this case, x = -3 and y = 1) If Suppose that we know that there exist integers x, y such that 2x + 7y = 1(In this case, x = -3 and y = 1) We know the modular equation 2 .7 x = 1 has a solution x = 4

  50. e.g.20 • Illustration of Lemma 2.8 The modular equation 2 .7 x = 1 has a solution in Z7 if and only if there exist integers x, y such that 2x + 7y = 1 Why is it correct? Only if The modular equation 2 .7 x = 1 has a solution x in Z7 We can write as 2x mod 7 = 1 We can re-write as 2x = 7q + 1 where q is an integer 2x – 7q = 1 2x + 7(-q) = 1 Thus, there exist integers x, y such that 2x + 7y = 1 where y = -q

More Related