Problem Set 7 Solutions

Similar documents
Homework 5 Solutions

Intermediate Math Circles February 29, 2012 Linear Diophantine Equations I

Divisibility. Def: a divides b (denoted a b) if there exists an integer x such that b = ax. If a divides b we say that a is a divisor of b.

Homework 4 Solutions

Homework 3: Solutions

Homework 5 Solutions

Chapter 2. Divisibility. 2.1 Common Divisors

8. Given a rational number r, prove that there exist coprime integers p and q, with q 0, so that r = p q. . For all n N, f n = an b n 2

Direct Proof MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Direct Proof Fall / 24

MATH 145 Algebra, Solutions to Assignment 4

Number Theory Proof Portfolio

Proof 1: Using only ch. 6 results. Since gcd(a, b) = 1, we have

4 Powers of an Element; Cyclic Groups

1. Given the public RSA encryption key (e, n) = (5, 35), find the corresponding decryption key (d, n).

2k n. k=0. 3x 2 7 (mod 11) 5 4x 1 (mod 9) 2 r r +1 = r (2 r )

Chapter 1 A Survey of Divisibility 14

Deepening Mathematics Instruction for Secondary Teachers: Algebraic Structures

Senior Math Circles Cryptography and Number Theory Week 2

COMP239: Mathematics for Computer Science II. Prof. Chadi Assi EV7.635

Chapter 1. Greatest common divisor. 1.1 The division theorem. In the beginning, there are the natural numbers 0, 1, 2, 3, 4,...,

4. Number Theory (Part 2)

Exercises Exercises. 2. Determine whether each of these integers is prime. a) 21. b) 29. c) 71. d) 97. e) 111. f) 143. a) 19. b) 27. c) 93.

MATH 145 Algebra, Solutions to Assignment 4

MATH FINAL EXAM REVIEW HINTS

Mathematics for Computer Science Exercises for Week 10

5: The Integers (An introduction to Number Theory)

PRACTICE PROBLEMS: SET 1

An Introduction to Mathematical Thinking: Algebra and Number Systems. William J. Gilbert and Scott A. Vanstone, Prentice Hall, 2005

12x + 18y = 50. 2x + v = 12. (x, v) = (6 + k, 2k), k Z.

Introduction Integers. Discrete Mathematics Andrei Bulatov

Intermediate Math Circles February 26, 2014 Diophantine Equations I

Proofs. Methods of Proof Divisibility Floor and Ceiling Contradiction & Contrapositive Euclidean Algorithm. Reading (Epp s textbook)

MATH 433 Applied Algebra Lecture 4: Modular arithmetic (continued). Linear congruences.

(e) Commutativity: a b = b a. (f) Distributivity of times over plus: a (b + c) = a b + a c and (b + c) a = b a + c a.

The following is an informal description of Euclid s algorithm for finding the greatest common divisor of a pair of numbers:

1. multiplication is commutative and associative;

Ch 4.2 Divisibility Properties

a the relation arb is defined if and only if = 2 k, k

4 Number Theory and Cryptography

Lecture 4: Number theory

Math.3336: Discrete Mathematics. Primes and Greatest Common Divisors

Homework 3, solutions

EUCLID S ALGORITHM AND THE FUNDAMENTAL THEOREM OF ARITHMETIC after N. Vasiliev and V. Gutenmacher (Kvant, 1972)

The Chinese Remainder Theorem

Prof. Ila Varma HW 8 Solutions MATH 109. A B, h(i) := g(i n) if i > n. h : Z + f((i + 1)/2) if i is odd, g(i/2) if i is even.

Homework 7 solutions M328K by Mark Lindberg/Marie-Amelie Lawn

2 Arithmetic. 2.1 Greatest common divisors. This chapter is about properties of the integers Z = {..., 2, 1, 0, 1, 2,...}.

cse547, math547 DISCRETE MATHEMATICS Professor Anita Wasilewska

The Chinese Remainder Theorem

3 The fundamentals: Algorithms, the integers, and matrices

Basic elements of number theory

Basic elements of number theory

Number Theory Solutions Packet

INTEGERS. In this section we aim to show the following: Goal. Every natural number can be written uniquely as a product of primes.

Homework 2: Solutions

Chapter 3: The Euclidean Algorithm and Diophantine. Math 138 Burger California State University, Fresno

MATH 215 Final. M4. For all a, b in Z, a b = b a.

1 Overview and revision

Chapter 5. Number Theory. 5.1 Base b representations

Introduction to Abstract Mathematics

D i v i s i b i l i t y

PROBLEM SET 1 SOLUTIONS 1287 = , 403 = , 78 = 13 6.

Simultaneous Linear, and Non-linear Congruences

1. Factorization Divisibility in Z.

Chapter 5.1: Induction

The Euclidean Algorithm and Multiplicative Inverses

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers

Warm-Up. Use long division to divide 5 into

Mat Week 8. Week 8. gcd() Mat Bases. Integers & Computers. Linear Combos. Week 8. Induction Proofs. Fall 2013

Homework #2 solutions Due: June 15, 2012

Greatest Common Divisor MATH Greatest Common Divisor. Benjamin V.C. Collins, James A. Swenson MATH 2730

A SURVEY OF PRIMALITY TESTS

Number Theory Marathon. Mario Ynocente Castro, National University of Engineering, Peru

Student Responsibilities Week 8. Mat Section 3.6 Integers and Algorithms. Algorithm to Find gcd()

Introduction to Number Theory. The study of the integers

2 Elementary number theory

M381 Number Theory 2004 Page 1

NOTES ON INTEGERS. 1. Integers

Math Circles - Lesson 2 Linear Diophantine Equations cont.

Problem Set 5 Solutions

MATH10040 Chapter 1: Integers and divisibility

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer?

MATH 420 FINAL EXAM J. Beachy, 5/7/97

DIVISIBILITY AND GREATEST COMMON DIVISORS

Our Number Theory Textbook

CHAPTER 3. Congruences. Congruence: definitions and properties

MATH 361: NUMBER THEORY FOURTH LECTURE

I Foundations Of Divisibility And Congruence 1

Chapter 5. Factorization of Integers

CSE 215: Foundations of Computer Science Recitation Exercises Set #5 Stony Brook University. Name: ID#: Section #: Score: / 4

MATH 501 Discrete Mathematics. Lecture 6: Number theory. German University Cairo, Department of Media Engineering and Technology.

A Readable Introduction to Real Mathematics

18 Divisibility. and 0 r < d. Lemma Let n,d Z with d 0. If n = qd+r = q d+r with 0 r,r < d, then q = q and r = r.

Course: CS1050c (Fall '03) Homework2 Solutions Instructor: Prasad Tetali TAs: Kim, Woo Young: Deeparnab Chakrabarty:

LINEAR CONGRUENCES AND LINEAR DIOPHANTINE EQUATIONS

Solutions to Assignment 1

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer?

USA Mathematical Talent Search Round 3 Solutions Year 20 Academic Year

Part V. Chapter 19. Congruence of integers

CS 4424 GCD, XGCD

Transcription:

Problem Set 7 Solutions ECS 20 (Fall 2016) Patrice Koehl koehl@cs.ucdavis.edu November 15, 2017 Exercise 1 a) Let a be a natural number strictly greater than 1. Show that gcd(a, a 1) = 1. b) Use the result of part a) to solve the Diophantine equation a + 2b = ab where a and b are two positive integers. a) We do a proof by contradiction. Let a be a natural number strictly greater than 1 and let us suppose that gcd(a, a 1) = k with k > 1. Then there exist two positive integers m and n, such that a = mk and a 1 = nk. Then and at the same time a (a 1) = mk nk = (m n)k a (a 1) = 1 Therefore (m n)k = 1, i.e. k is a divisor of 1, but k > 1 (our hypothesis): we have reached a contradiction. Therefore, gcd(a, a 1) = 1 b) We want to solve the equation a + 2b = ab, were a and b are positive integers. We look at three cases: i) b = 0. The equation becomes a = 0. ii) b = 1. The equation becomes a + 2 = a, which does not have a solution ii) b > 1. From a + 2b = ab, we get 2b = ab b = a(b 1). Therefore b 1 divides 2b. From part a), we know that gcd(b, b 1) = 1. According to Gauss s theorem, we have (b 1)/2, meaning that b = 2 or b = 3 Replacing in the original equation, we get a = 4 in the first case, and a = 3 in the second case. The set of solutions is therefore (0, 0), (3, 3), (4, 2)}. 1

Exercise 2 a) Let a, b, and c be three integers. Show that the equation ax + by = c has at least one solution if and only if gcd(a, b)/c. b) A group of men and women spent $100 in a store. Knowing that each man spent $8, and each woman spent $5, can you find how many men and how many women are in the group? a) Let a, b, and c be three integers. We need to prove a biconditional p q, where p and q are the two propositions: p: The equation ax + by = c has at least one solution (x 1, y 1 ) and q : gcd(a, b)/c Proving p q is equivalent to proving p q and q p. We will use direct proofs for both implications. a) p q Hypothesis: p is true, namely, the equation ax+by = c has at least one solution (x 1, y 1 ). Therefore ax 1 + by 1 = c. Let g = gcd(a, b): g divides a and g divides b. Therefore, there exists two integers k and l such that a = gk and b = gl. Replacing in the equation above, we get: gkx 1 + gly 1 = c which we rewrite as: g(kx 1 + ly 1 ) = c Since kx 1 + ly 1 is an integer, g divides c, namely q is true. b) q p Hypothesis: q is true, namely gcd(a, b)/c. Let g = gcd(a, b). Since g/c, there exists an integer m such that c = mg. Also, based on Bezout s identity, there exists two integers k and l such that g = ka + lb. Multiplying this equation by m, we get mg = kma + lmb, i.e. c = kma + lmb. We have therefore found a pair (x 1, y 1 ) with x 1 = km and y 1 = lm such that ax 1 + by 1 = c: p is true. n conclusion, p q. b) Let n be the number of men, and let m be the number of women. From the text of the problem, we know that 8n + 5n = 100 We notice first that gcd(8, 5) = 1; since 1 divides 100, from a) we deduce that there is a solution to the problem. 2

Since gcd(8, 5) = 1, acording to Bezout we know that there are two integers u 0 and v 0 such that: 8u + 5v = 1 We can choose for example u 0 = 3 and v 0 = 5. Multiplying the equation above by 100, we get: 8(100u 0 ) + 5(100v 0 ) = 100 whose solutions are therefore n 0 = 100u 0 = 300 and m 0 = 500. All solutions are of the form n = n 0 + 5k = 300 + 5k and m = m 0 5k = 500 8k where k is an integer, and n 0 and m 0. Since n > 0, k 60. Since m 0, k 62. There are therefore 3 solutions for k = 60, 61, and 62: S = (0, 20), (5, 12), (10, 4)}. Exercise 3 a) Let a and b be two natural numbers. Show that if gcd(a, b) = 1 then gcd(a, b 2 ) = 1. Let a and b be two natural numbers such that gcd(a, b) = 1. According to Bezout s identity, there exist two integers k and l such that ak + bl = 1. Multiplying by b, we get abk + b 2 l = b. Let g = gcd(a, b 2 ). By definition of gcd, there exists two integers u and v such that a = ug and b 2 = vg. Replacing in the equation above, we get gubk + gvl = b. Hence, g divides b. Since g also divides a, g is a common divisor of a and b. Since gcd(a, b) = 1, the only possibility is g = 1, therefore gcd(a, b 2 ) = 1, which concludes the proof. b) Let a and b be two natural numbers. Show that if gcd(a, b) = 1 then gcd(a 2, b 2 ) = 1. Let a and b be two natural numbers such that gcd(a, b) = 1. According to question a), we know that gcd(a, b 2 ) = 1, which we can rewrite as gcd(b 2, a). Applying again the property of a) to b 2 and a, we get gcd(b 2, a 2 ) = 1, therefore gcd(a 2, b 2 ) = 1. Exercise 4 Let n be a natural number such that the remainder of the division of 4294 by n is 10, and the remainder of the division of 3521 by n is 11. What is n? We note first that n divides 4294 10 = 4284 and n divides 3521 11 = 3510. Therefore n divides the gcd(4284, 3521) = 2 3 2 = 18. Therefore n = 2, 3, 6, 9, or18 (we can exclude 1!). We can exclude 2, as it divides 4294. Similarly, we can exclude 3 as the remainder of the division of 4294 by 3 is 1. Since 4294 = 715 6 + 4, 6 is not the answer. Similarly, 4294 = 9 477 + 1, 9 is not the solution. Finally, we notice that 4294 = 18 328 + 10, and 3521 = 195 18 + 11. The answer is n = 18. Exercise 5 Find all (x, y) N 2 that satisfy the system of equations: x 2 y 2 = 5440 gcd(x, y) = 8 3

Let x and y be two natural number and let g = gcd(x, y). By definition of gcd, there exists two integers u and v such that x = gu and y = gv. Since g = 8, x = 8u and y = 8v. Replacing in the first equation of the system, we get: Therefore, x 2 y 2 = 64(u 2 v 2 ) = 5440 (u v)(u + v) = 85 Since 85 = 1 5 17, the possible solutions for u v and u+v are S = (1, 85), (5, 17), (17, 5), (85, 1)}. Let us look at all 4 cases: a) u v = 1 u + v = 85 Then u = 43 and v = 42, i.e. x = 344 and y = 336. b) u v = 5 u + v = 17 Then u = 11 and v = 6, i.e. x = 88 and y = 48. c) u v = 17 u + v = 5 Then u = 11 and v = 6, i.e. x = 88 and y = 48. This is not a solution as x and y need to be natural numbers. d) u v = 85 u + v = 1 Then u = 43 and v = 42, i.e. x = 344 and y = 336. This is not a solution as x and y need to be natural numbers.. Therefore the only solutions are S = (344, 336), (88, 48)}. 4

Exercise 6 Let n be a natural number. We define A = n 1 and B = n 2 3n + 6. Show that gcd(a, B) = gcd(a, 4). Let us define g1 = gcd(a, B) and g2 = gcd(a, 4). We will show that g1 g2 amd g2 g1. a) Let us show that g1 g2. We first notice that by definition, g1/a and g1/b. Therefore, g1 divides any combinations of A and B. Now let us notice that: Therefore A 2 = n 2 2n + 1 B = A 2 n + 5 = A 2 A + 4 As g1 divides B A 2 + A, g1 divides 4. Therefore g1 divides A and g1 divides 4, g1 g2. a) Let us show that g2 g1. We first notice that by definition, g2/a and g2/4. Since B = A 2 A + 4, and g2 divides A 2 A + 4, g2 divides B. Therefore g2 divides A and g2 divides B, g2 g1. In conclusion, g1 = gcd(a, B) = g2 gcd(a, 4). Exercise 7 Let a and b be two inatural numbers. Solve the equations a 2 b 2 = 11. We can rewrite the equation as (a b)(a + b) = 11 The solutions for (a + b) and (a b) are therefore S = (1, 11), (11, 1)}. Let us look at all 2 cases: a) a b = 1 a + b = 11 Then a = 6 and b = 5. b) a b = 11 a + b = 1 Then a = 6 and b = 5. Since b needs to be a natural number, this is not a solution. The only solution is (6,5). 5

Extra Credit Let a and b be two natural numbers. Solve gcd(a, b) + lcm(a, b) = b + 9. We want to solve gcd(a, b) + lcm(a, b) = b + 9, where a and b are two natural numbers (i.e. positive non zero integers). As written, the equation looks very complicated. Let us transform it to make it more tractable. Most terms in the equation can be written as multiples of g = gcd(a, b): Since g is a divisor of a and b, there exists non-zero integers m and n such a = mg and b = ng. We also know that g.lcm(a, b) = ab, then g.lcm(a, b) = g.g.mn and therefore lcm(a, b) = gmn. Replacing in the equation, we get: g + gmn = gn + 9, which can be rewritten as g(1 + mn n) = 9. This shows that g divides 9. There are 3 possibilities for g: g = 1, or g = 3 or g = 9: 1) g = 1. The equation becomes lcm(a, b) = b + 8, with lcm(a, b) = ab. Then ab = b + 8, or b(a 1) = 8. Then b is a divisor of 8, i.e. b = 1, b = 2, b = 4 or b = 8. b = 1: a 1 = 8 then a = 9. (9, 1) is one solution of the equation. b = 2: a 1 = 4 then a = 5. (5, 2) is another solution of the equation. b = 4: a 1 = 2 then a = 3. (3, 4) is another solution of the equation. b = 8: a 1 = 1 then a = 2. This would imply gcd(a, b) = 2, which is in contradiction with g = 1. This case does not yield any new solutions. 2) g = 3. The equation becomes lcm(a, b) = b + 6. lcm(a, b) is a multiple of b: lcm(a, b) = mb, hence b(m 1) = 6. Hence b divides 6, i.e. b = 1, b = 2, b = 3 or b = 6. Since b g, we cannot have in this case b = 1 or b = 2. We need to check two cases: If b = 3, then the equation becomes 3 + lcm(a, b) = 3 + 9, i.e. lcm(a, b) = 9. Since lcm(a, b) is a multiple of a, we find that a divides 9. We also know that a is a multiple of 3, as g = 3 is a divisor of a. Then a = 3 or a = 9. We cannot have a = 3 (since we would have lcm(a, b) = 3), hence a = 9. (9, 3) is another solution of the equation. If b = 6, the equation becomes 3 + lcm(a, b) = 6 + 9, hence lcm(a, b) = 12. As above, a is a multiple of 3 and a divides 12. If a = 3 or a = 6, the we would have lcm(a, b) = 6 NO. If a = 12, then gcd(a, b) = 6: NO. In this case, we do not have new solutions. 3) g = 9. The equation becomes lcm(a, b) = b. Since lcm(a, b). gcd(a, b) = ab, we get 9b = ab, i.e. a = 9 (we do not have to consider b=0, as we look for natural numbers). Since lcm(a, b) = b is a multiple of a, there exists k > 0 such that b = 9k. All values of k > 0 are possible. In conclusion, the solutions are: (9, 1), (5, 2), (3, 4), (9, 3), (9, 9k)} where all values of (k > 0) are possible. 6