Math Circles - Lesson 2 Linear Diophantine Equations cont.

Similar documents
Intermediate Math Circles February 29, 2012 Linear Diophantine Equations I

Intermediate Math Circles February 26, 2014 Diophantine Equations I

Intermediate Math Circles March 7, 2012 Problem Set: Linear Diophantine Equations II Solutions

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

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

The Euclidean Algorithm and Multiplicative Inverses

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

Questionnaire for CSET Mathematics subset 1

Cool Results on Primes

Chapter 2. Divisibility. 2.1 Common Divisors

4 Powers of an Element; Cyclic Groups

Ch 4.2 Divisibility Properties

Algebra Summer Review Packet

#26: Number Theory, Part I: Divisibility

5: The Integers (An introduction to Number Theory)

Math 131 notes. Jason Riedy. 6 October, Linear Diophantine equations : Likely delayed 6

Math101, Sections 2 and 3, Spring 2008 Review Sheet for Exam #2:

Number Theory. Introduction

Chapter 1 A Survey of Divisibility 14

Modular Arithmetic Instructor: Marizza Bailey Name:

The Euclidean Algorithm

Chapter 2 INTEGERS. There will be NO CALCULATORS used for this unit!

Math 110 FOUNDATIONS OF THE REAL NUMBER SYSTEM FOR ELEMENTARY AND MIDDLE SCHOOL TEACHERS

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

SECTION 2.3: LONG AND SYNTHETIC POLYNOMIAL DIVISION

3 The fundamentals: Algorithms, the integers, and matrices

Applied Cryptography and Computer Security CSE 664 Spring 2017

Notes for Recitation 6

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

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

Math 120. x x 4 x. . In this problem, we are combining fractions. To do this, we must have

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

6.4 Division of Polynomials. (Long Division and Synthetic Division)

Chapter 5. Number Theory. 5.1 Base b representations

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

Name Class Date. What is the solution to the system? Solve by graphing. Check. x + y = 4. You have a second point (4, 0), which is the x-intercept.

In this unit we will study exponents, mathematical operations on polynomials, and factoring.

Arithmetic and Algebra

3.3 Linear Equations in Standard Form

Sect The Slope-Intercept Form

Example: This theorem is the easiest way to test an ideal (or an element) is prime. Z[x] (x)

Q 2.0.2: If it s 5:30pm now, what time will it be in 4753 hours? Q 2.0.3: Today is Wednesday. What day of the week will it be in one year from today?

MTH 346: The Chinese Remainder Theorem

4 Number Theory and Cryptography

Chapter 5: The Integers

2 Elementary number theory

Math Circle at FAU 10/27/2018 SOLUTIONS

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

MHF4U. Advanced Functions Grade 12 University Mitchell District High School. Unit 2 Polynomial Functions 9 Video Lessons

Multiplying and dividing integers Student Activity Sheet 2; use with Exploring Patterns of multiplying and dividing integers

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

CPSC 467b: Cryptography and Computer Security

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

NOTES ON SIMPLE NUMBER THEORY

Systems of Equations. Red Company. Blue Company. cost. 30 minutes. Copyright 2003 Hanlonmath 1

Senior Math Circles Cryptography and Number Theory Week 2

ACTIVITY 3. Learning Targets: 38 Unit 1 Equations and Inequalities. Solving Inequalities. continued. My Notes

Number Theory Notes Spring 2011

Math 1302 Notes 2. How many solutions? What type of solution in the real number system? What kind of equation is it?

= $ m. Telephone Company B charges $11.50 per month plus five cents per minute. Writing that mathematically, we have c B. = $

WORKSHEET ON NUMBERS, MATH 215 FALL. We start our study of numbers with the integers: N = {1, 2, 3,...}

Homework #2 solutions Due: June 15, 2012

Lesson 21 Not So Dramatic Quadratics

NAME DATE PERIOD. Power and Radical Functions. New Vocabulary Fill in the blank with the correct term. positive integer.

Lecture 2. The Euclidean Algorithm and Numbers in Other Bases

CS250: Discrete Math for Computer Science

MATH 145 Algebra, Solutions to Assignment 4

Euclidean Domains. Kevin James

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

Intermediate Math Circles November 18, 2009 Solving Linear Diophantine Equations

3.5. Dividing Polynomials. LEARN ABOUT the Math. Selecting a strategy to divide a polynomial by a binomial

LHS Algebra Pre-Test

Divisors. Common divisors. Let m, n P Z with m 0. Wesaythatm divides n if n is a multiple of m, i.e.

4. Number Theory (Part 2)

L1 2.1 Long Division of Polynomials and The Remainder Theorem Lesson MHF4U Jensen

Chapter 1: January 26 January 30

Module 1. Integers, Induction, and Recurrences

Review Problems for the Final

Math 0310 Final Exam Review

Grade 7/8 Math Circles. Continued Fractions

Name Date Class. Standardized test prep Review of Linear Equations 8 Blue/Green

More Polynomial Equations Section 6.4

Math From Scratch Lesson 20: The Chinese Remainder Theorem

EDULABZ INTERNATIONAL NUMBER SYSTEM

ACCUPLACER MATH 0310

June If you want, you may scan your assignment and convert it to a.pdf file and it to me.

Deepening Mathematics Instruction for Secondary Teachers: Algebraic Structures

Polynomials. This booklet belongs to: Period

2.1 Using Models to Multiply Integers (pp )

Math 138: Introduction to solving systems of equations with matrices. The Concept of Balance for Systems of Equations

Math 1310 Section 4.1: Polynomial Functions and Their Graphs. A polynomial function is a function of the form ...

NOTES ON VECTORS, PLANES, AND LINES

CURRICULUM UNIT MAP 1 ST QUARTER. COURSE TITLE: Applied Algebra 1 GRADE: 9

Basic elements of number theory

Basic elements of number theory

L1 2.1 Long Division of Polynomials and The Remainder Theorem Lesson MHF4U Jensen

1.1 Variables and Expressions How can a verbal expression be translated to an algebraic expression?

Arithmetic Algorithms, Part 1

Chapter 1A -- Real Numbers. iff. Math Symbols: Sets of Numbers

Modeling Data. 27 will get new packet. 24 Mixed Practice 3 Binomial Theorem. 23 Fundamental Theorem March 2

Transcription:

Math Circles - Lesson 2 Linear Diophantine Equations cont. Zack Cramer - zcramer@uwaterloo.ca March 7, 2018 Last week we discussed linear Diophantine equations (LDEs), which are equations of the form ax + by = c for some integers a, b, and c. The important thing about Diophantine equations is that their solutions have to be integers! Here are some examples from last time: (I) 8x + 3y = 10 has a solution given by 8( 10) + 3(30) = 10. (II) 14x + 35y = 4 has no solutions. Why? Because if we divide both sides by 7, we get 2x + 5y = 4 7. Since the left-hand side is an integer and the right-hand side is not, no solutions can exist. Example (II) shows that the existence of solutions to ax + by = c depends on the common divisors of a and b. In particular, it was important for us to be able to find gcd(a, b), the greatest common divisor of a and b. To do this, we used the following tools: The Division Algorithm. Let a and b be integers with b > 0. There are unique integers q (the quotient) and r (the remainder) such that Furthermore, gcd(a, b) = gcd(b, r). a = bq + r and 0 r < b. 1

The Euclidean Algorithm. Step 1: Arrange a and b so that a b. Step 2: Write a = bq + r where 0 r < b. Step 3: If r = 0, then stop! We get gcd(a, b) = gcd(b, 0) = b. Step 4: Replace (a, b) with (b, r) and return to Step 1. These algorithms led to the following result on solutions to ax + by = c: Theorem. The LDE ax + by = c has a solution if and only if gcd(a, b) divides c. Using the Euclidean algorithm and working backwards, we get an equation of the form ax 0 + by 0 = gcd(a, b). The solution to the LDE can then be obtained by multiplying both sides of this c equation by. So we have ax + by = c where gcd(a, b) x = x 0 c gcd(a, b) and y = y 0 c gcd(a, b). Example. Use the above approach to solve the LDE 66x + 15y = 18. Solution. We ll start by using the Euclidean algorithm to find gcd(66, 15): 66 = 15(4) + 6 gcd(66, 15) = gcd(15, 6) (1) 15 = 6(2) + 3 gcd(15, 6) = gcd(6, 3) (2) 6 = 3(2) + 0 gcd(6, 3) = gcd(3, 0) = 3. 2

Since gcd(66, 15) = 3 divides 18, there is a solution to this LDE. To find it, we work backwards through the Euclidean algorithm: 3 = 15 6(2) by (2) = 15 [66 15(4)](2) by (1) = 15(9) + 66( 2) Thus, we arrive at the equation 66( 2) + 15(9) = 3. A solution to our LDE can be obtained by multiplying the above expression by 18/3 = 6: 66( 12) + 15(54) = 18. 1 Finding the Complete Solution to an LDE Let s consider the following variation on the Mario example from last time: Example (Goomba s revenge!). Goomba has forgotten how to run, and instead can only jump forward or backward. He can make long jumps 6 metres in length, or short jumps 4 metres in length. Mario (who has also forgotten how to run) stands 16 metres away. If Goomba makes x long jumps and y short jumps, find all possible choices of (x, y) that will allow him to land on Mario. Just like last time, this problem can be represented as an linear Diophantine equation: 6x + 4y = 16. By using the Euclidean algorithm and working backwards, we can find a particular solution: 6(8) + 4( 8) = 16. So he will land on Mario by making 8 long jumps forward and 8 short jumps backward. But this is not the only way! Provide at least 2 more solutions. 3

Uh oh... there may be quite a few solutions. How many more are there? How do we obtain them? To answer these questions, we re going to have to think cleverly! By moving things around a bit, the equation can be written as 6x + 4y = 16 4y = 6x + 16 y = 6 4 x + 16 4 y = 3 2 x + 4 We recognize this as the equation of a line with slope = and y-intercept =. The solutions to our LDE are exactly the points (x, y) on this line whose coordinates are integers! On the left is the graph of the line 6x + 4y = 16. Below are some of the integer points on this line: x y.. 2 7 0 4 2 1 4 2 6 5 8 8 our solution! 10 11.. These are the solutions to our LDE! Do you notice a pattern? 4

Suppose we move along this line from top-left to bottom-right, starting at a particular solution (x 0, y 0 ). To get to the next solution, we must add to the x-value and subtract from the y-value. To get to the previous solution, we must subtract from the x-value and add to the y-value. The following theorem summarizes this phenomenon: Theorem. Suppose that (x 0, y 0 ) is one solution to the linear Diophantine equation ax + by = c, and let d = gcd(a, b). Then the full list of integer solutions is given by ( ) b ( a x = x 0 + n, y = y 0 n d d) where n is any integer. Let s test out this theorem for 6x + 4y = 16, the LDE from our previous example. We found that a = 6,, b = 4, d = gcd(6, 4) = 2, and (x 0, y 0 ) = (8, 8) is a particular solution. This means that the full list of solutions is given by where n is any integer. x = x 0 + n ( ) ( ) b 4 = 8 + n d 2 = 8 + 2n ( ( ) a 6 y = y 0 n = 8 n d) 2 = 8 3n 5

In the table below, we plug in various values for n. Each time we do, we get a different solution (x, y). n 0 1 2 3 4 1 2 3 4 101 x = 8 + 2n 8 10 14 16 6 2 0 y = 8 3n 8 11 14 17 5 2 1 4 How many solutions does our LDE have?. Example. Find all integer solutions to the LDE 66x + 15y = 18. Solution. This was the example from before. We saw that a = 66, b = 15, d = gcd(a, b) = 3, and (x 0, y 0 ) = ( 12, 54) is a particular solution. Thus, the full list of solutions is given by x = y = 6

2 Restrictions on Solutions to LDEs Recall the following example from last time: Example. Becky needs $2.15 to buy an extra large coffee. She only has quarters and dimes, and the cashier insists that she pay with exact change. Is there a combination of quarters and dimes that will total $2.15? Solution. This example is asking for a solution to the LDE 25x + 10y = 215. By using the Euclidean algorithm and working backwards, we obtain the particular solution 25(43) + 10( 86) = 215. It looks like Becky can buy her coffee with 43 quarters and 86 dimes. Wait... there s something wrong here: our solution doesn t make sense in the context of this problem. What we really want is a solution where both x and y are integers. To accomplish this, we ll need to find all solutions to the LDE, and then restrict our attention to the ones that make sense. Since a = 25, b = 10, d = gcd(a, b) = 5, and (x 0, y 0 ) = (43, 86) is a particular solution, so the full list of solutions is given by x = x 0 + n ( ) ( ) b 10 = 43 + n d 5 = 43 + 2n 7

( ( ) a 25 y = y 0 n = 86 n d) 5 = 86 5n where n is any integer. For (x, y) to be a valid solution, we need both x 0 and y 0. Which values of n will satisfy these conditions? x 0 2n 43 n 43 2 = 21.5 n 21 (since n is an integer). y 0 5n 86 n 86 5 = 17.2 n 18 (since n is an integer). Below are the 4 valid solutions to this equation: n 18 19 20 21 x = 43 + 2n 7 5 3 1 y = 86 5n 4 9 14 19 Remark. Solving for n in an inequality is just like solving for n in an equation. The only difference: we must reverse the inequality sign when multiplying or dividing by a negative number. 8