MAT115A-21 Summer Session 2 2018 Practice Final Solutions Name: Time Limit: 1 Hour 40 Minutes Instructor: Nathaniel Gallup This exam contains 5 pages (including this cover page) and 4 questions. The total number of points is 100. Grade Table Question Points Score 1 25 2 25 3 25 4 25 Total: 100 1
Problem 1 (25 points). Give the definition of a relation on a set X. Give the definition of an equivalence relation on a set X. (3) If is an equivalence relation on a set X and y X, give the definition of the equivalence class E y. (4) Define a relation on the set X = {(a, b) a, b Z and b 0} by letting (a, b) (c, d) if and only if ad = bc. Prove that this is an equivalence relation. (5) Find the equivalence class of (1, 2). Solution 1. Definition 1: Relation Let X be a set. A relation on X is a subset S X X. 2 Definition 2: Equivalence Relation Let X be a set. An equivalence relation on X is a relation S X X which satisfies the following properties. (E1) (Reflexivity). For all x X, (x, x) S. (E2) (Symmetry). If (x, y) S, then (y, x) S. (E3) (Transitivity). If (x, y) S and (y, z) S, then (x, z) S. (3) Definition 3: Equivalence Class Let be an equivalence relation on a set X and let y X. Then define the equivalence class of y to be the set E y = {z X z y}. (4) (E1). Given any (p, q) X, we have that pq = qp in Z, therefore (p, q) (p, q). (E2). Suppose that (p, q) (r, s). By definition this means that ps = qr. But of course this implies that rq = sp, and therefore that (r, s) (p, q). (E3). Suppose that (p, q) (r, s) and that (r, s) (t, u). This means that ps = qr, and that ru = st. Multiplying both sides of the first equation by u, we obtain that psu = qru. Similarly, multiplying both sides of the second equation by q, we obtain that qru = stq. Putting these two equations together, we obtiain that psu = stq. Since s is nonzero, we can cancel it from both sides by it to obtain pu = tq, and therefore, by the definition of the equivalence relation, we obtain that (p, q) (t, u). (5) We have that E (1,2) = {(p, q) p, q Z, q 0, 2p = q}. Examples of elements of this set include (1, 2), (2, 4), (4, 8), ( 1, 2). In fact this set consists of all pairs of integers (p, q) such that p/q = 1/2 in Q.
3 Problem 2 (25 points). Give the definition of a linear diophantine equation (LDE). State the theorem regarding solutions of LDEs. (3) Find all integral solutions to the following LDE. 21x + 14y = 147. (4) Prove that x Z satisfies the LDE ax + my = b for some y Z if and only if ax b mod m. Solution 2. Definition 4: Linear Diophantine Equation Given integers a, b, c, the equation ax + by = c is called a linear diophantine equation in two variables (LDE for short). Theorem 1: Solutions to LDEs (Rosen Theorem 3.23) Let a, b, c be integers and let d = (a, b). Consider the LDE ax + by = c. (a) If d = 0, then the equation has a solution if and only if c = 0, in which case all pairs of integers (x, y) are solutions to the equation. (b) If d 0, then the LDE has a solution if and only if d c, in which case the LDE has infinitely many integer solutions. Moreover if (x 0, y 0 ) is any solution to the equation (we call this a particular solution), then the set of solutions is given by {(x 0 + bd n, y 0 ad n ) } n Z. (3) Note that (14, 21) = 7, and we have that 7 21 = 147, hence (14, 21) 147, so by the theorem above, this LDE has infinitely many solutions. To find a particular solution, we find some Bezout coefficients for 14 and 21: (4) 7 = 1 21 + ( 1) 14 = 147 = 21 21 + ( 21) 14 so a particular solution is (21, 21). Therefore, according to the theorem, those solutions are exactly the elements of the following set. {( 21 + 21 ) } 14 n, 21 7 7 n n Z ( ). Suppose that x satisfies the LDE ax + my = b fro some y Z. Then taking congruence classes modulo m of both sides yields [ax + my] m = [b] m = [ax] m + [m] m [y] m = [b] m = [ax] m = [b] m = ax b mod m,
as desired. Here follows from the definitions of addition and multiplication modulo m, and follows because [m] m = [0] m. ( ). Suppose that x Z satisfies ax b mod m. This implies that m (b ax), i.e. that there exists some y Z such that my = b ax. Hence we have ax + my = b for some y Z, as desired. 4
5 Problem 3 (25 points). Give the definition of the relation: congruence modulo m. Give the definition of an inverse of x modulo m. (3) State the Chinese Remainder Theorem. (4) Find all of the solutions of the following system of linear congruences. Solution 3. Definition 5: Congruence Modulo m x 1 mod 2 x 3 mod 7 x 4 mod 13 x 2 mod 15. Let m be an integer. The relation on Z defined by C m = {(x, y) Z Z m (x y)} Z Z is called congruence modulo m and we say that x is congruent to y modulo m, and write x y mod m, if and only if (x, y) C m. Definition 6: Multiplicative Inverses (3) Either Let m, x Z. A multiplicative inverse of [x] m Z/mZ is an element [y] m Z/mZ such that [x] m [y] m = [y] m [x] m = [1] m. In this case we write [y] m = [x] 1 m. We also say that y is a multiplicative inverse of x modulo m. Theorem 2: Chinese Remainder Theorem (Rosen Theorem 4.13) Let m 1,..., m r be pairwise relatively prime. Then the function defined in??, namely is a bijection. or Φ : Z/MZ Z/m 1 Z... Z/m r Z Φ([x] M ) = ([x] m1, [x] m2,..., [x] mr ), Corollary 1: Solutions to Simultaneous Congruences Suppose that m 1,..., m r Z are pairwise relatively prime and a 1,..., a r Z. Then there exists an integer x such that is good. (4) Let x a 1 mod m 1 x a 2 mod m 2. x a r mod m r. Furthermore if y Z is another solution, then we have x y mod M where M = m 1... m k.
6 and a 1 = 1 a 2 = 3 a 3 = 4 a 4 = 2 Then we have that m 1 = 2 m 2 = 7 m 3 = 13 m 4 = 15 We compute M 1 = 7 13 15 = 1365 M 2 = 2 13 15 = 390 M 3 = 2 7 15 = 210 M 4 = 2 7 13 = 182. We find inverses y i of M i modulo m i : [M 1 ] m1 = [1365] 2 = [1] 2 [M 2 ] m2 = [390] 7 = [5] 7 [M 3 ] m3 = [210] 13 = [2] 13 [M 4 ] m4 = [182] 15 = [2] 15. y 1 = 1 y 2 = 3 y 3 = 7 y 4 = 8. Therefore we have that a solution to the system of congruences is given by x = a 1 M 1 y 1 + a 2 M 2 y 2 + a 3 M 3 y 3 + a 4 M 4 y 4 = 1 1365 1 + 3 390 3 + 4 210 7 + 2 182 8. Then all solutions to the congruence are given by where M = m 1 m 2 m 3 m 4 = 2 7 13 15. {x + km k Z},
Problem 4 (25 points). Give the definition of a prime integer. State the Fundamental Theorem of Arithmetic. (3) Use the Trial Division Algorithm to find the prime factorization of 70. (4) Use the Fundamental Theorem of Arithmetic to prove that if (a, n) = 1 and (b, n) = 1, then (ab, n) = 1. Solution 4. Definition 7: Prime Integer An integer q is called prime if it satisfies the following conditions. (P1) p is not equal to 0, ±1. (P2) Whenever p divides the product ab of two integers a and b, then either p divides a or p divides b. 7 Theorem 3: The Fundamental Theorem of Arithmetic (Rosen Theorem 3.15) Every integer a not equal to 0, ±1 can be written as a = p 1... p n where p i is an irreducible/prime integer for all 1 i n. Furthermore if there exist irreducible/prime integers q j with 1 j m such that a = q 1... q m then n = m and there exists a bijection φ : [n] [n] such that p φ(i) = ±q i for all 1 i n. (3) Let n = 70. We have that 70 = 2 35, so we let p 1 = 2 and n 1 = 35. We note that 35 is not divisible by 2, 3, but that 35 = 5 7, so we let p 2 = 5 and n 2 = 7. We now note that 5 > 7, and therefore 7 is prime. So the prime factorization of 70 is 2 5 7. (4) Suppose, for contradiction, that c is a positive common divisor of ab and n such that c > 1, and recall that the fundamental theorem of arithmetic implies the following lemma: Lemma 1: Existence of Prime Divisors (Rosen Lemma 3.1) Every integer greater than 1 has a positive prime divisor. Therefore c has a prime divisor, call it p. Since c is a common divisor of ab and n, it follows that p is also a common divisor of ab and n. Therefore in particular, p ab, so by definition p a or p b. But then either p is a common divisor of a and n, or of b and n. But either case is a contradiction since (a, n) = 1 and (b, n) = 1. Therefore the only positve common divisor of ab and n is 1, so (ab, n) = 1, as desired.