This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Faculty of Mathematics
University of Waterloo MATH 135 MIDTERM EXAM #2
Fall 2004
Monday 15 November 2004 19:00 — 20:15
Solutions [8) 1. Solve the system of congruence equations 4 (mod 11)
50 (mod 109) (E :13 Solution: By the Chinese Remainder Theorem, we know that there will be a unique solution modulo
11 X 109 = 1199 since gcd(11,109) : 1. From the second congruence, a: = 50 + 109:]; for some 3/ E Z. Substituting into the ﬁrst congruence, we obtain 50 + 1093/ E 4 (mod 11)
1093; E —~46 (mod 11)
—y E —2 (mod 11)
y E 2 (mod 11) Therfore, y z 2 + 112 for some 2 E Z.
Substituting back into :17, we get a: = 50 + 109(2 + 112) = 268 + 11992.
Therefore, an E 268 (mod 1199) is the unique solution mod 1199. [7] 2. Find the complete solution to 29933 E 117 (mod 949). Solution:
We convert this congruence to the Linear Diophantine Equation 299117 + 9491/ = 117.
Next7 we solve this Linear Diophantine Equation using the Extended Euclidean Algorithm: 299:1: +9491: ; r ODD40103 Therefore, gcd(299, 949) = 13. Since 13I117 (with quotient 9), then the Linear Diophantine
Equation has solutions, so the linear congruence has solutions.
From the EEA, we see that 299(«19) + 949(6) : 13. MATH 135, Midterm #2 Solutions Page 2 of 5 Multiplying through by 9, we obtain 299(17 1) + 949(54) : 117. Therefore, at = —171 is a partigcliiglar solution to the linear congruence.
Since gcd(299, 949) = 13 and 1—3 : 73, then we can write the complete solution as m E ——171 (mod 73) which can be rewritten as
a: E 48 (mod 73) or we can write the complete solution as ICE—171+73’n (mod 949) forn:0,1,2,...,12
which can be rewritten as x2778+73n (mod949) forn:0,1,2,...,12 or
x E 48,121, 194, 267, 340, 413,486, 559,632, 705, 778, 851, 924 (mod 949) 3. Deﬁne f : Z51 —> Z51 by f([a:]) : [28][:I:] + [17].
[3] (a) Find the (multiplicative) inverse of [28] in Z51. Solution: To ﬁnd the inverse of [28] in Z51, we solve the equation [28] [11:] = [1] in Z51, which is
equivalent to solving the linear congruence 28m .=—_ 1 (mod 51). Since gcd(28, 51) = 1, this equation has a solution, and the solution is unique mod 51.
By the Extended Euclidean Algorithm (or otherwise), the solution to this equation is
an E 31 (mod 51). Therefore, in Z51, [28]_1 2 [31]. [4] (b) Let [y] : [28][x] + [17] for some [11:] E Zsl.
Find positive integers a and b so that [x] : [a][y] + [b]. Solution:
In (a), we determined that [28]”1 = [31] in Z51.
So, we multiply both sides of the equation [3/] : [28][:c] + [17] by [31] to obtain [31llyl I [31] [281196] + [31lll7]
[311M = [$144527] (Sincel31ll281 =[1D
BUM[527] = [37]
l3lllyl+[—527] I [37]
[31][y]+[34] : [:13] (since —527E34 (mod 51)) Therefore, a = 31 and b = 34 are two positive integers that satisfy the required. MATH 135, Midterm #2 Solutions Page 3 of 5 [2] (c) Prove that the function f is bijective. Solution:
In (b), we showed that f is invertible by ﬁnding that f“1([y]) : [31] [y] + [34].
Therefore, since f is invertible, it is bijective. 4. In Sarah’s RSA scheme, 19 2 11, q = 7 and e 2 13.
[5] (a) Calculate Sarah’s private key (d, n). Solution. From the set—up of RSA, n : pq : 77 and ¢(n) = (p — 1)(q —— 1) : 60. Also, d satisﬁes the congruence ed E 1 (mod ¢(n)). So to ﬁnd d, we must solve 13d .=_ 1 (mod 60). Since gcd(13, 60) = 1, this has a unique solution mod 60. By the Extended Euclidean Algorithm (or otherwise), we can determine that the solution
is d E 37 (mod 60). Since d is an integer satisfying 1 S d < ¢(n), then d : 37. Therefore, Sarah’s private key is (37,77). [4] (b) Using Sarah’s public key (6, n), encrypt the message M 2 61. Solution: To encrypt M, we ﬁnd an integer C with 1 S C < n and C E M6 (mod n)
Thus, here we ﬁnd an integer C with 1 S C’ < 77 and C E 6113 (mod 77).
We use square and multiply to calculate C’. First, we write 13 = (1101)2 = 8 + 4 + 1, so 6113 : 618  614  611. Calculating,
612: (611)25 6125 3721; 25 (mod 77)
614: (612)22 2525 6252 9 (mod 77)
613: (614)25 925 815 4 (mod77)
So
6113 ; 618614611 4 9  61 (mod 77)
2196 (mod 77)
E 40 (mod 77) Therefore, the encrypted message is C = 40. MATH 135, Midterm #2 Solutions Page 4 of 5 [10] 5. A sequence {mu} is deﬁned by $1 2 —3, x2 2 23, m3 2 «45 and
xn 2 7xn—2 "‘ 6xn—3 for all n 2 4. Prove that as" 2 2(—3)" + 2” + 1 for all n E 1?. Solution:
We prove this result by strong induction on n. Base Cases For n 2 1, m1 —3 and 2(—3)1 + 21 + 1 2 —6 + 2 + 1 2 —3, so the result is true.
For n 2 2, x2 23 and 2(—3)2 + 22 + 1 2 18 + 4 + 1 2 23, so the result is true. For n 2 3, £63 2 —45 and 2(——3)3 + 23 + 1 2 —54 + 8 + 1 2 ~45, so the result is true. H H! Induction Hypothesis
Assume that the result is true for n 2 1, 2, 3, . . . , k, for some k E P, k 2 3.
(That is, assume that :5” 2 2(—3)” + 2n + 1 for n 2 1, 2,3, . . . , k, for some 19 E If”, k 2 3. ) Induction Conclusion
Consider n 2 k + 1. Then xk+1 2 7xk_1 —= 6xk12 (since 16 + 1 Z 4)
2 7(2(—3)k‘1 + 2"“1 + 1)  6(2(——3)k_2 + 2"—2 + 1) (by Induction Hypothesis)
2 14(4))“1 — 12(——3)k—2 + 7 2k—1 — 6 2H + 7 — 6
= i4(—3)k—1 + 4(—3)"~1 + 7 2k—1 — 3 . 2’61 +1
= 18(—3)k"1 + 4  2"—1 + 1
: 2(_3)k+1 + 2k+1 + 1 Therefore, the result holds for n 2 k + 1. Therefore, 20,, 2 2(—3)" + 2" + 1 for all n E P by the Principle of Strong Induction. [5] 6. (a) Let p be a prime number.
Prove that the congruence equation x2 E p (mod p3) has no solutions. Solution: Assume that there is an integer a: for which :32 E p (mod 193). By the deﬁnition of congruence, 2:2 2 p + kp?’ for some ’9 E Z. Since 10 divides into the right side, then p divides into the left side, ie. p  3:2.
Since p19? 2 m  :12, then 1)  :1: or p  a; (since 19 is a prime number) so 1)  3:.
Thus, 53 2 Qp for some Q E Z. Substituting back into our equation, we get Q2 2 2 p + 19193. Dividing by p, we get Q21) 2 1 + 19122 or Q21) —— kpz 2 1 or 19(6)2 — lop) 2 1.
Since 19 divides the left side, then 1) divides the right side, ie. p l 1. But since p is a prime number, this is a contradiction. Therefore, the congruence equation x2 E p (mod p3) has no solutions. MATH 135, Midterm #2 Solutions Page 5 of 5 [2] (b) Find a. positive integer a > 1 and an integer a: so that 9:2 E a (mod a3). Solution:
Ifx=2 anda=4, then 22 E4 (mod 64) ie. x2 Ea (moda3). ...
View
Full Document
 Fall '08
 ANDREWCHILDS

Click to edit the document details