CHAPTER 3. Congruences. Congruence: definitions and properties

Similar documents
3.2 Solving linear congruences. v3

3.7 Non-linear Diophantine Equations

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?

An integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p.

CHAPTER 6. Prime Numbers. Definition and Fundamental Results

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?

Lecture Notes. Advanced Discrete Structures COT S

4. Congruence Classes

Elementary Number Theory. Franz Luef

CSE 20 DISCRETE MATH. Winter

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

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?

Solution Sheet (i) q = 5, r = 15 (ii) q = 58, r = 15 (iii) q = 3, r = 7 (iv) q = 6, r = (i) gcd (97, 157) = 1 = ,

Math 109 HW 9 Solutions

CSE 20 DISCRETE MATH. Fall

7. Prime Numbers Part VI of PJE

2.3 In modular arithmetic, all arithmetic operations are performed modulo some integer.

Number Theory Proof Portfolio

MATH 361: NUMBER THEORY FOURTH LECTURE

Definition 6.1 (p.277) A positive integer n is prime when n > 1 and the only positive divisors are 1 and n. Alternatively

M381 Number Theory 2004 Page 1

Modular Arithmetic Instructor: Marizza Bailey Name:

Lecture 2. The Euclidean Algorithm and Numbers in Other Bases

ax b mod m. has a solution if and only if d b. In this case, there is one solution, call it x 0, to the equation and there are d solutions x m d

Discrete Mathematics and Probability Theory Fall 2018 Alistair Sinclair and Yun Song Note 6

Integers and Division

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

MATH 2112/CSCI 2112, Discrete Structures I Winter 2007 Toby Kenney Homework Sheet 5 Hints & Model Solutions

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

Basic elements of number theory

Basic elements of number theory

3 The fundamentals: Algorithms, the integers, and matrices

Part V. Chapter 19. Congruence of integers

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 3

7.2 Applications of Euler s and Fermat s Theorem.

A Guide to Arithmetic

MATH 3240Q Introduction to Number Theory Homework 4

Outline. Number Theory and Modular Arithmetic. p-1. Definition: Modular equivalence a b [mod n] (a mod n) = (b mod n) n (a-b)

NOTES ON SIMPLE NUMBER THEORY

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

4 Number Theory and Cryptography

Discrete Mathematics and Probability Theory Summer 2014 James Cook Note 5

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

Part IA Numbers and Sets

Discrete Mathematics and Probability Theory Summer 2017 Course Notes Note 6

1 Overview and revision

2301 Assignment 1 Due Friday 19th March, 2 pm

Chapter 3 Basic Number Theory

Chapter 5. Number Theory. 5.1 Base b representations

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

1. multiplication is commutative and associative;

MATH 115, SUMMER 2012 LECTURE 4 THURSDAY, JUNE 21ST

Name: Mathematics 1C03

Math From Scratch Lesson 20: The Chinese Remainder Theorem

Elementary Number Theory Review. Franz Luef

CPSC 467b: Cryptography and Computer Security

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

Applied Cryptography and Computer Security CSE 664 Spring 2018

This is a recursive algorithm. The procedure is guaranteed to terminate, since the second argument decreases each time.

MATH 310: Homework 7

Relations. Binary Relation. Let A and B be sets. A (binary) relation from A to B is a subset of A B. Notation. Let R A B be a relation from A to B.

Carmen s Core Concepts (Math 135)

MATH Fundamental Concepts of Algebra

Discrete Logarithms. Let s begin by recalling the definitions and a theorem. Let m be a given modulus. Then the finite set

For your quiz in recitation this week, refer to these exercise generators:

Number Theory Math 420 Silverman Exam #1 February 27, 2018

Number Theory. CSS322: Security and Cryptography. Sirindhorn International Institute of Technology Thammasat University CSS322. Number Theory.

SOLUTIONS TO PROBLEM SET 1. Section = 2 3, 1. n n + 1. k(k + 1) k=1 k(k + 1) + 1 (n + 1)(n + 2) n + 2,

Chapter 2 - Relations

Number Theory. Modular Arithmetic

Congruence of Integers

4 PRIMITIVE ROOTS Order and Primitive Roots The Index Existence of primitive roots for prime modulus...

Chinese Remainder Theorem

Number Theory Solutions Packet

A SURVEY OF PRIMALITY TESTS

8 Primes and Modular Arithmetic

Algebra. Modular arithmetic can be handled mathematically by introducing a congruence relation on the integers described in the above example.

Elementary Properties of the Integers

FERMAT S TEST KEITH CONRAD

Winter Camp 2009 Number Theory Tips and Tricks

Number Theory Homework.

1. Prove that the number cannot be represented as a 2 +3b 2 for any integers a and b. (Hint: Consider the remainder mod 3).

CMPUT 403: Number Theory

Know the Well-ordering principle: Any set of positive integers which has at least one element contains a smallest element.

Chapter 9 Mathematics of Cryptography Part III: Primes and Related Congruence Equations

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

CIS 6930/4930 Computer and Network Security. Topic 5.1 Basic Number Theory -- Foundation of Public Key Cryptography

The Euclidean Algorithm and Multiplicative Inverses

MTH 346: The Chinese Remainder Theorem

CSE 20: Discrete Mathematics

MODULAR ARITHMETIC KEITH CONRAD

Number Theory. Zachary Friggstad. Programming Club Meeting

Course MA2C02, Hilary Term 2013 Section 9: Introduction to Number Theory and Cryptography

Lecture 7 Number Theory Euiseong Seo

Definition For a set F, a polynomial over F with variable x is of the form

PREPARATION NOTES FOR NUMBER THEORY PRACTICE WED. OCT. 3,2012

Discrete Mathematics with Applications MATH236

Chapter 2. Divisibility. 2.1 Common Divisors

The Chinese Remainder Theorem

Transcription:

CHAPTER 3 Congruences Part V of PJE Congruence: definitions and properties Definition. (PJE definition 19.1.1) Let m > 0 be an integer. Integers a and b are congruent modulo m if m divides a b. We write a b mod m. The integer m is called the modulus. If a b mod m, then b is a residue of a modulo m. Example. 5 25 mod 10 since 10 (5 25); 3 113 mod 10; 3 113 mod 10 since 10 (3 ( 113)), 10 116. Remark. The next two results show that congruence modulo m behaves much like equality, =. This justifies writing it as a b mod m and not, say, as m (b a). 3.1. Proposition. (PJE proposition 19.1.2) Congruence modulo m is i) Reflexive: a Z, a a mod m. Proof. a a = 0 = m (a a) = a a mod m. ii) Symmetric: a, b Z, (a b mod m) = b a mod m. Proof. m (a b) = m ( (a b)) = b a. iii) Transitive: a, b, c Z, (a b mod m) and (b c mod m) = a c mod m. Proof. m (a b) and m (b c) = m ((a b) + (b c)) = (a c). 1

2 3. CONGRUENCES 3.2. Proposition. Modular arithmetic (PJE proposition 19.1.3) Let a 1, a 2, b 1 and b 2 be integers such that a 1 a 2 mod m and b 1 b 2 mod m. Then a 1 + b 1 a 2 + b 2 mod m; a 1 b 1 a 2 b 2 mod m. Proof (PJE p.233 but I give a slightly different proof ) Observe that (a 1 + b 1 ) (a 2 + b 2 ) = (a 1 a 2 ) + (b 1 b 2 ); a 1 b 1 a 2 b 2 = a 1 b 1 a 1 b 2 + a 1 b 2 a 2 b 2 = a 1 (b 1 b 2 ) + b 2 (a 1 a 2 ) (note how we subtracted a 1 b 2 then added it back). In each case we obtain an integral linear combination of a 1 a 2 and b 1 b 2, both of which are divisible by m by assumption. An integral linear combination of integers divisible by m is divisible by m. Hence the result is also divisible by m, proving that a 1 + b 1 a 2 + b 2 and a 1 b 1 a 2 b 2 mod m. Question The Modular Arithmetic shows that we can add, subtract and multiply congruences mod m, just as we can do with equalities. Can we divide both sides of a congruence by the same integer? The general answer is no, hence the similarity with = stops here. But it is possible in an important special case: 3.3. Proposition. (PJE proposition 19.3.2) If gcd(a, m) = 1 then (ab 1 ab 2 mod m) = (b 1 b 2 mod m). Proof (PJE p.241) Assume ab 1 ab 2 mod m. This means that m (ab 1 ab 2 ) = a(b 1 b 2 ). Since gcd(m, a) = 1, by Corollary 2.5 m (b 1 b 2 ). Hence by definition b 1 b 2 mod m. Example. Consider the congruence 5 25 mod 4. Since 5 and 25 are divisible by 5 and 5 is coprime to the modulus, 4, we can divide both sides of the congruence by 5 and to leave the modulus intact, obtaining the congruence 1 5 mod 4 which is also true. Question Modular Arithmetic shows that in calculations modulo m, an integer can be replaced by any of its residues mod m. Note that each integer has infinitely many residues mod m. Is there the best, or most convenient, residue?

SOLVING LINEAR CONGRUENCES 3 Answer In many ways, the least non-negative residue is the best choice. See the following result. 3.4. Proposition. Let a, b be integers and m be a positive integer. i) The least non-negative residue of an integer a modulo m is the remainder of a on division by m. ii) a b mod m if and only if a and b leave the same remainder when divided by m. Proof Not explicitly given in PJE although the idea is present (i) By definition, a residue of a modulo m is an integer c such that a c = mp for some p Z. Hence R = {a mp : a mp 0, p Z} is the set of all non-negative residues of a. It was shown in the proof of the Division Theorem that the least element, r = min R, of this set is the remainder of a when divided by m. (ii) Assume that a and b leave the same remainder r when divided by m. Then by part (i) a r mod m and b r mod m so r b mod m because congruence is symmetric, and finally a b mod m since congruence is transitive. Now assume that a b mod m, and let r, s be the remainders of a, b, respectively, when divided by m. By part (i), r a b s mod m so s is a non-negative residue of a modulo m. Then by part (i), r s. Similarly, r is a residue of b so s r. We conclude that r = s. Solving linear congruences We will learn to solve equations of the form ax b mod m, where x is an unknown integer. General method: observe that ax b mod m by definition means that there exists y Z such that ax b = my. In other words, x is the first component of a solution (x, y) to the Diophantine equation ax my = b. Solve the Diophantine equation to find x. We illustrate this method by examples.

4 3. CONGRUENCES Example. Find all integers x for which 5x 12 mod 19. Solution If x is an integer solution, then 5x = 12+19k for some k Z, which rearranges as 5x 19k = 12. Such pairs of solutions (x, k) Z 2 can be found by Euclid s Algorithm. Since gcd(5, 19) = 1 which divides 12, this method will give solutions. Start with Work back up to get Multiply by 12 to get 19 = 3 5 + 4 5 = 1 4 + 1, 1 = 5 1 4 = 5 1 (19 3 5) Thus 1 = 4 5 1 19. 5 48 19 12 = 12, so a particular solution to 5x 19k = 12 is (x 0, k 0 ) = (48, 12). The general solution is then (x, k) = (48 + 19l, 12 + 5l) for any l Z. We do not need to keep track of k because we only want to solve for x. Thus all solutions to 5x 12 mod 19 are given by x = 48 + 19l, l Z, which is the same as x 48 mod 19, itself the same as x 10 mod 19. Advice For the answer, choose the least non-negative residue of x. This will be a requirement in the exam. Question Is it true that every linear congruence of the form ax b mod m has a solution expressed by a unique remainder mod m? Answer No. The following situations are also possible: The solution is expressed by more than one remainder mod m. There are no solutions. We illustrate both situations by examples.

SOLVING LINEAR CONGRUENCES 5 Example. (A linear congruence with more than one solution in the given modulus) Find all solutions in integers x to 15x 36 mod 57. Solution First, check there are solutions. To solve 15x 36 mod 57 we will solve 15x = 36 + 57k, i.e. for x, k Z. Apply Euclid s Algorithm, 15x 57k = 36 57 = 3 15 + 12 15 = 1 12 + 3 12 = 4 3 + 0 to see that gcd (57, 15) = 3. Since 3 36 the equation 15x 57k = 36 and thus the congruence will have solutions. Second, find a particular solution. Working back up Euclid s Algorithm we see that Multiply by 12 to get 3 = 15 1 12 = 15 (57 3 15) = 15 4 57. ( ) 15 48 57 12 = 36. So (x 0, k 0 ) = (48, 12) is a particular solution of 15x 57k = 36. Looking at ( ) modulo 57 we see that 15 48 12 mod 57 so a solution of 15x 36 mod 57 is x 0 = 48. Thirdly, find the general solution. Suppose that x 0 Z is a particular solution of 15x 36 mod 57. This is equivalent to there being a k 0 Z such that (x 0, k 0 ) is a particular solution of 15x 57k = 36. Then by Theorem?? the general solution is given by x = x 0 + 57 gcd(15, 57) l, k = k 15 0 + l for l Z. gcd(15, 57) Note that we do not need to keep track of k as we are only looking for x. So all the solutions to 15x 12 mod 57 are given by x = 48 + 19l, l Z. Finally express your answer as a congruence with the original modulus. The solution x = 48 + 19l, l Z, could be written as x 48 mod 19. usual to express the answer in the same modulus, 57, as the question. But it is more Varying l(=

6 3. CONGRUENCES..., 2, 1, 0, 1,...) we find solutions..., 10, 29, 48, 67,.... But 67 10 mod 57 and so after 10, 29 and 48 we get no new solutions mod 57. Whereas 10, 29 and 48 are not congruent (i.e., they are incongruent) mod 57. So we give the solutions to 15x 36 mod 57 as x 10, 29, 48 mod 57. Advice for exam 1) Follow the procedure above: First, check there are solutions. Second, find a particular solution. Thirdly, find the general solution. Finally express your answer as a congruence with the original modulus. This will be a requirement in the exam. 2) When expressing your answer as a congruence give your answer a) as a non-negative number, so the solution to 10x 7 mod 11 should not be given as x 7 mod 11; b) give your answer(s) as an integer smaller than the modulus, so the solution to 3x 5 mod 11 should not be given as x 20 mod 11. Both will be required in the exam. Without these constraints, a congruence question would have infinitely many valid answers which makes marking more difficult. Note that the number of incongruent solutions mod 57 here equals 3, which is the same as gcd(57, 19). This is not a coincidence, as can be seen in the following. Theorem. The congruence ax c mod m is soluble in integers if, and only if, gcd(a, m) c. The number of incongruent solutions modulo m is gcd(a, m). The ideas for the proof can be found around PJE p.244 and are not given here. Example. (A linear congruence with no solutions) Solve 598x 1 mod 455. Solution Assume for contradiction that the congruence has solutions in which case the Diophantine equation 598x 455k = 1 has solutions in integers x and k. Yet we found in Example?? that gcd(598, 455) = 13, and since 13 1, this Diophantine equation has no integer solutions. Contradiction. Hence the congruence has no integer solutions.

MULTIPLICATIVE INVERSES 7 Multiplicative inverses Definition. If a is a solution of the congruence ax 1 ( mod m) then a is called a (multiplicative) inverse of a modulo m and we say that a is invertible modulo m. Since the inverse of a modulo m is a solution of a congruence, it can be found using Euclid s Algorithm. Example. Find an inverse of 56 mod 93. Solution Starting with a = 93 and b = 56 we use Euclid s Algorithm to show that 56 5 + 93 ( 3) = 1. Modulo 93 this gives 56 5 1 mod 93. Hence x = 5 is a solution. Advice for exam Don t forget to CHECK your answer by multiplying 56 by 5 and finding the remainder on division by 93. 3.5. Proposition. a is invertible mod m gcd(a, m) = 1. Proof. The congruence ax 1 mod m is soluble, if and only if the equation ax my = 1 is. By Proposition?? this happens iff a and m are coprime. If we can find a multiplicative inverse a to a modulo m we can then solve ax b mod m by multiplying both sides by a to get x (a a)x a (ax) a b mod m. 3.6. Example. Solve 56x 23 mod 93. Solution Multiply both sides of the equation by the inverse of 56 mod 93, i.e. 5, to get 280x 115 mod 93, i.e. x 115 22 mod 93. The advantage of finding the inverse of 56 modulo 93 is that once found we can solve each of 56x b mod 93 for any b Z. And of course, if 5 is the inverse of 56 mod 93 then 56 is the inverse of 5 mod 93. This fact can be used in: Example. Solve 5x 23 mod 93.

8 3. CONGRUENCES Solution Multiply both sides of the equation by the inverse of 5 mod 93, i.e. 56, to get 280x 1288 mod 93, that is, x 1288 79 mod 93. Solving Simultaneous Pairs of Linear Congruences Consider the two linear congruences x 2 mod 5 and x 1 mod 3. Integers satisfying the first congruence include... 8, 3, 2, 7, 12, 17, 22, 27, 32,... Those satisfying the second include... 8, 5, 2, 1, 4, 7, 10, 13, 16, 19, 22,... So 8, 7 and 22 satisfy both congruences simultaneously. What other integers satisfy both simultaneously? 3.7. Example. Find all x such that x 2 mod 5, and x 1 mod 3. Solution Write x 2 mod 5 as x = 2 + 5k for some k Z and write x 1 mod 3 as x = 1 + 3l for some l Z. Equate to get 2 + 5k = 1 + 3l, or 3l 5k = 1. We could solve this using Euclid s Algorithm, though here it is as easy to stare and see that l = 2, k = 1, is a solution, while (k, l) = (1 + 3t, 2 + 5t), t Z is the general solution. Thus the x that satisfy both congruences are i.e. x 7 mod 15. x = 2 + 5k = 2 + 5 (1 + 3t) = 7 + 15t, for all t Z,

3.8. Example. Solve SOLVING SIMULTANEOUS PAIRS OF LINEAR CONGRUENCES 9 x 2 mod 6 and x 1 mod 4. Solution Informally, we observe that integers satisfying the first congruence include..., 2, 8, 14, 20, 26,... while..., 1, 5, 9, 13, 17, 21,... satisfy the second. It looks as if these lists have nothing in common, the first contains even integers, the second odd integers. Thus there appears to be no simultaneous solutions to the two congruences. Now let us apply the formal method above: x 2 mod 6 becomes x = 2 + 6k while x 1 mod 4 becomes x = 1 + 4l where k, l Z. Equate to get 2 + 6k = 1 + 4l, i.e. 4l + 6k = 1. This has no solutions because the left hand side of this is even, the right hand side odd. We exclude the situation as in Example 3.8 by demanding that the moduli of the two congruences are coprime. If we do that it is possible to prove that the system always has a solution: 3.9. Theorem. Chinese Remainder Theorem Let m 1 and m 2 be coprime positive integers, and a 1, a 2 integers. Then the simultaneous congruences x a 1 mod m 1 and x a 2 mod m 2 have exactly one solution x 0 with 0 x 0 < m 1 m 2, and the general solution is x x 0 mod m 1 m 2. Proof Not proved in PJE Rewrite the simultaneous congruences as the equation x = a 1 + m 1 k = a 2 + m 2 l, k, l Z. This is equivalent to the equation m 1 k m 2 l = a 2 a 1

10 3. CONGRUENCES which has solutions (k, l) Z 2 because gcd(m 1, m 2 ) = 1 divides a 2 a 1. So by Theorem?? the general solution has the form (k, l) = (k 0 + m 2 t, l 0 + m 1 t), t Z, for some k 0 and l 0. We obtain the general solution for x which is x = a 1 + m 1 k = (a 1 + m 1 k 0 ) + m 1 m 2 t, t Z x (a 1 + m 1 k 0 ) mod m 1 m 2. Hence the Theorem holds with x 0 being the least non-negative residue of a 1 + m 1 k 0 mod m 1 m 2. By Proposition 3.4 one has 0 x 0 < m 1 m 2. Solving Simultaneous Triplets of Linear Congruences. Not required for the exam Example. Solve the system 2x 3 mod 5, 3x 4 mod 7, 5x 7 mod 11. Solution Do this in steps. First solve each congruence individually. For congruences such as these with small coefficients I would solve by observation, i.e. try x = 0, 1, 2,... etc. until you find a solution. In this way you get the system x 4 mod 5, x 6 mod 7, x 8 mod 11. Second, take any pair and solve. For example choose the pair x 4 mod 5 and x 6 mod 7, which has the solution x 34 mod 35. Third, introduce the unused congruence. In our example this gives the the pair x 34 mod 35 and x 8 mod 11. The solution of this is left to students. Four or more linear congruences are no more unused congruences. Simply repeat the third step above until there

METHOD OF SUCCESSIVE SQUARING 11 Method of Successive Squaring The Modular Arithmetic proposition stated that if a 1 a 2 mod m and b 1 b 2 mod m then a 1 b 1 a 2 b 2 mod m. A special case of this, when a 1 = b 1 and a 2 = b 2, states that if a 1 a 2 mod m then a 2 1 a2 2 mod m. Application If given a modulus m and an integer a and you wish to calculate a 2 mod m you might first calculate a 2 and then find the least non-negative residue mod m. Alternatively you could first find the least non-negative residue r 1 a mod m and then square r 1 and find its least non-negative residue mod m. By Modular Arithmetic, we get the same answer whichever method we use. The advantage of finding r 1 first is that 0 r 1 < m and so we need only square a number no larger than m whereas the original a may have been far larger than m. This idea can be repeated and the resulting method is best illustrated by an example. Example. Not in class Calculate the least non-negative residue of 4 100 mod 13. Solution The Method of Successive Squaring. Then 4 2 3 mod 13, 4 4 3 2 9 4 mod 13, 4 8 ( 4) 2 3 mod 13, 4 16 3 2 9 4 mod 13, 4 32 ( 4) 2 3 mod 13, 4 64 3 2 9 4 mod 13. 4 100 = 4 64+32+4 = 4 64 4 32 4 4 ( 4) 3 ( 4) 9 mod 13. Note What becomes important in this method is how to write the exponent as a sum of powers of 2. This is the same as writing the exponent in binary notation. So, in this

12 3. CONGRUENCES example 100 10 = 1100100 2 = 1 2 6 + 1 2 5 + 1 2 2 = 64 + 32 + 4 and 64, 32 and 4 are the exponents seen above. Question How to write a number N as a sum of distinct powers of 2? Answer find the highest power 2 k of 2 such that 2 k N; write N = 2 k + N 1 ; here N 1 < 2 k (otherwise we would have found at least 2 k+1 in the previous step); repeat the process to write N 1 as a sum of powers of 2. 3.10. Example. Find the last 2 digits of 2013 99. Solution An integer with r 2 digits, a r a r 1...a 2 a 1 a 0 (r 2) in decimal notation, represents a r 10 r + a r 1 10 r 1 +... + a 2 10 2 + a 1 10 + a 0 = ( a r 10 r 2 + a r 1 10 r 3 +... + a 2 ) 100 + (a1 10 + a 0 ) (a 1 10 + a 0 ) mod 100. So the two digits of the remainder of 2013 99 2013 99. mod 100 will be the last two digits of mod 100 2013 2 13 2 69 13 4 69 2 61 13 8 61 2 21 13 16 21 2 41 13 32 41 2 81 13 64 81 2 61. Then, because 99 = 64 + 32 + 2 + 1 when written as a sum of powers of 2, we find that 13 99 = 13 64 13 32 13 2 13 61 81 69 13 mod 100 77 mod 100.

NON-LINEAR DIOPHANTINE EQUATIONS 13 So the last two digits of 13 99 are 7 and 7. Questions for students. What are the last three digits of 13 99. What are the last two digits of 13 1010? Non-linear Diophantine Equations As an example of the use of congruences we can use them to show when some Diophantine equations do not have integer solutions. This is quite a negative application we do not prove that the equations have solutions, if they do! Idea 1) Given a Diophantine Equation first assume it has integer solutions. 2) Then look at the equation modulo an appropriate modulus. 3) Find a contradiction. 3.11. Example. (cf. PJE example 19.2.6) Prove that there are no integral solutions to 15x 2 7y 2 = 1. Solution Assume there is a solution (x 0, y 0 ) Z 2, so 15x 2 0 7y2 0 = 1. Look at the equation modulo 5 to get 0x 2 7y0 2 1 mod 5 3y0 2 1 mod 5. Our logic in choosing modulus 5 here is that the term 15x 2 becomes zero mod 5. Indeed, 5 15 and a 0 mod m m a. Multiplying both sides of the congruence by 2 we get 6y0 2 2 mod 5 i.e. y0 2 2 mod 5. We see if this is possible or not by testing each possible residue of y mod 5: y mod 5 y 2 mod 5 0 0 1 1 2 4 3 4 4 1

14 3. CONGRUENCES We can see that a square can be congruent only to 0, 1 or 4 modulo 5. In no case do we get y 2 2 mod 5, there being no 2 in the right hand column. So our assumption that 15x 2 7y 2 = 1 has a solution has led to a contradiction modulo 5. Hence the original equation has no integer solutions. Be careful If we look at the equation modulo 7, we get 15x 2 0 1 mod 7 or x 2 0 1 mod 7. Unfortunately there is a solution to this, namely x 0 = 1. Thus we have not found a contradiction. This does not mean that there is anything wrong with the method, just that this modulus has not led to a contradiction. Alternative Solution We could have looked at the equation modulo 3, to get 7y0 2 1 mod 3 or 2y0 2 1 mod 3. Multiply both sides by 2 to get 4y2 0 2 mod 3, i.e. y2 0 2 mod 3. We see if this is possible or not by testing each possible value for y. y mod 3 y 2 mod 3 0 0 1 1 2 1 In no case do we get y 2 2 mod 3. So our assumption that 15x 2 7y 2 = 1 has a solution has led to a contradiction modulo 3. Hence the original equation has no integer solutions. The lesson from this is that the smaller you take the modulus the smaller the table, i.e. the less work you have to do. 3.12. Example. (MATH10101 Exam 2009) Show that for any n 1 mod 7 no integers a, b can be found satisfying n = 2a 3 5b 3. Solution The information concerning n is given modulo 7 so we look at the Diophantine equation modulo 7, and try to find integer solutions of 2a 3 5b 3 1 mod 7 which is equivalent to 2a 3 + 2b 3 = 2(a 3 + b 3 ) 1 mod 7. Observe that 4 is the inverse of 2 mod 7, i.e., 4 2 1 mod 7. Multiply both sides of the congruence by 4: 2(a 3 +b 3 ) 1 mod 7 4 2(a 3 +b 3 ) 4 1 mod 7 a 3 +b 3 4 mod 7.

We search all possible values of ( a 3, b 3) mod 7. NON-LINEAR DIOPHANTINE EQUATIONS 15 a mod 7 a 3 mod 7 0 0 1 1 2 1 3 3 3 = 27 6 4 4 3 ( 3) 3 3 3 6 1 5 6 6 6 Hence a 3 takes only 3 different values modulo 7, i.e. a 3 0, 1 or 6 mod 7. Thus there are only 9 different possibilities for the pair ( a 3, b 3) mod 7: ( a 3, b 3) mod 7 a 3 + b 3 mod 7 (0, 0) 0 (0, 1) 1 (0, 6) 6 (1, 0) 1 (1, 1) 2 (1, 6) 0 (6, 0) 6 (6, 1) 7 0 (6, 6) 12 5 In no row do we see a final result of 4, hence a 3 +b 3 is never 4 mod 7, hence no n 1 mod 7 can be written as 2a 3 5b 3 for integers a and b. Question how do we find the appropriate modulus? Answer There is no method for finding the right modulus, we have to look at the original equation with different moduli, trying to find a case that has no solutions. If, for all moduli we choose, the resulting congruence has a solution there is a chance that the original equation has solutions, but if so these have to be found by other means. Other examples students may wish to try: Example (MATH10111 exam 2007) Show that 7x 4 + 2y 3 = 3 has no integer solutions.

16 3. CONGRUENCES Show that 5 does not divide a 3 + a 2 + 1 for any a Z. Example (MATH10111 exam 2008). Show that 2x 3 + 27y 4 = 21 has no integer solutions. Example (MATH10111 exam 2009) Show that 7x 5 + 3y 4 = 2 has no integer solutions.