Department of Mathematics University of British Columbia MATH 342 Midterm 2 March 17, 2016, 9:30 AM - 10:50 AM Family Name: Initials: I.D. Number: Problem Signature: Mark Out of 1 20 2 20 3 20 4 20 5 20 Total 100 CALCULATORS, NOTES OR BOOKS ARE NOT PERMITTED. THERE ARE 5 PROBLEMS ON THIS EXAM. JUSTIFY YOUR ANSWERS. MATH 342 Math 342 Midterm 2 Below are the addition and multiplication tables for GF (4). (GF (4), +): + 0 1 a b 0 0 1 a b 1 1 0 b a a a b 0 1 b b a 1 0 · 0 1 a b 0 0 0 0 0 1 0 1 a b a 0 a b 1 b 0 b 1 a (GF (4), ·): 2 3 1. (a) Find the multiplicative inverse of 53 in Z157 . Give your answer as a principal remainder. Note: 157 is prime. You do not need to verify this fact. MATH 342 Math 342 Midterm 2 (b) Find the principal remainder of (739)33 mod 11. Solution: a. EA: 157 53 51 2 = 2 · 53 + 51 = 1 · 51 + 2 = 25 · 2 + 1 = 1·2 Working backwards through the EA: 1 = 51 − 25 · 2 = 51 − 25 · (53 − 1 · 51) = 26 · 51 − 25 · 53 = 26 · (157 − 2 · 53) − 25 · 53 = 26 · 157 − 77 · 53 Thus, 53−1 = −77 = 80 in Z157 . b. 739 = 2 mod 11. Thus (739)33 = 233 mod 11. By Fermat’s little theorem, 211 = 2 mod 11. Thus, (739)33 = (211 )3 = 23 = 8 mod 11. It is also possible to do part b without using Fermat’s little theorem. MATH 342 Math 342 Midterm 2 4 MATH 342 5 Math 342 Midterm 2 2. Let C be the span of {2430, 2443, 4323} in Z5 . Find the following. (a) A generator matrix in standard form for C (or for a code equivalent to C by a permutation of codeword positions). (b) The dimension of C. (c) |C|. (d) The number of cosets of C (as a subgroup under vector addition) in V (4, 5). Solution: a. A generator matrix in standard form is obtained by deleting the zero rows of the RREF and permuting columns if necessary. 2 4 3 0 2 4 4 3 4 3 2 3 2 4 3 0 0 0 1 3 0 0 1 3 2 4 3 0 0 0 1 3 0 0 0 0 1 2 4 0 0 0 1 3 0 0 0 0 1 2 0 3 0 0 1 3 = RREF 0 0 0 0 A generator matrix is: 1 2 0 3 0 0 1 3 1 0 2 3 0 1 0 3 G= A generator matrix in standard form is: G= b. The dimension is 2 since the generator matrix has 2 rows. c. |C| = 52 = 25. d. The number of cosets is 54 /52 = 25. MATH 342 Math 342 Midterm 2 6 MATH 342 Math 342 Midterm 2 7 3. (a) Find all solutions to the equation x3 + x2 + x + 1 = 0 in the rings Z2 , Z3 , Z4 and GF (4). (b) Show that in a field F , the only solutions to x2 = 1 are x = 1 and x = −1. (c) Show that in a field F , the only elements x ∈ F such that x = x−1 are x = 1 and x = −1. (d) Find a counterexample to part c if F is merely a ring. Solution: a. Z2 : 1 Z3 : 2 Z4 : 1, 3 GF (4): 1 b. x2 = 1 iff (x − 1)(x + 1) = 0 iff x = ±1, the latter because in a field the product of two nonzero elements is nonzero. c. x = x−1 iff x2 = 1; so this reduces to part b. d. In Z8 , 3 = 3−1 and 3 6= ±1. MATH 342 Math 342 Midterm 2 8 9 4. Let q be a positive integer and a ∈ Zq such that a 6= 0. Show that a has a multiplicative inverse in Zq iff gcd (a, q) = 1. MATH 342 Math 342 Midterm 2 Solution: If: Suppose that gcd(a, q) = 1. By Bezout, there exist integers m, n s.t. ma + nq = 1. Thus, ma = 1 mod q, and so m = a−1 in Zq . Only If: Let b = a−1 ∈ Zq . Then ba = 1 mod q. So, there exists an integer n s.t. ba = 1 + nq. Then any common divisor of a and q must divide 1. So, gcd(a, q) = 1. MATH 342 Math 342 Midterm 2 10 11 5. Recall that GF (4) = {0, 1, a, b}. Find a bijection g : {1, a, b} → Z3 such that for all x, y ∈ {1, a, b}, g(x · y) = g(x) + g(y). Here, · is multiplication in GF (4) and + is addition in Z3 . MATH 342 Math 342 Midterm 2 Solution: Define g as follows: g(1) = 0, g(a) = 1, g(b) = 2 which is clearly a bijection from {1, a, b} to Z3 . For all x ∈ {1, a, b}, g(x · 1) = g(x) = g(x) + 0 = g(x) + g(1). Since both groups are abelian, it suffices to verify that g(a · a) = g(a) + g(a), g(b · b) = g(b) + g(b), and g(a · b) = g(a) + g(b): g(a · a) = g(a2 ) = g(b) = 2 = 1 + 1 = g(a) + g(a) g(b · b) = g(b2 ) = g(a) = 1 = 2 + 2 = g(b) + g(b) g(a · b) = g(1) = 0 = 1 + 2 = g(a) + g(b) Alternatively, one can observe that the tables {1, a, b} with · · 1 a b 1 1 a b a a b 1 b b 1 a · 0 1 2 0 0 1 2 1 1 2 0 2 2 0 1 and {0, 1, 2} with + are identical via the 1-1 correspondence 1 ↔ 0, a ↔ 1, b ↔ 2. Note: the only other bijection that works is g(1) = 0, g(b) = 1, g(a) = 2 MATH 342 Math 342 Midterm 2 12