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 = ,

Similar documents
3.2 Solving linear congruences. v3

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?

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?

Homework #2 solutions Due: June 15, 2012

Math 109 HW 9 Solutions

4. Congruence Classes

CHAPTER 3. Congruences. Congruence: definitions and properties

Solutions to Section 2.1 Homework Problems S. F. Ellermeyer

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

Mathematics of Cryptography Part I

3.7 Non-linear Diophantine Equations

Lecture Notes. Advanced Discrete Structures COT S

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

Ma/CS 6a Class 2: Congruences

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

Math 430 Midterm II Review Packet Spring 2018 SOLUTIONS TO PRACTICE PROBLEMS

A Readable Introduction to Real Mathematics

MATH 310: Homework 7

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

Integers and Division

Lecture 7 Number Theory Euiseong Seo

SOLUTIONS Math 345 Homework 6 10/11/2017. Exercise 23. (a) Solve the following congruences: (i) x (mod 12) Answer. We have

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

The Chinese Remainder Theorem

7. Prime Numbers Part VI of PJE

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

Elementary Properties of the Integers

Lecture 7: Number Theory Steven Skiena. skiena

Number Theory. Modular Arithmetic

7.2 Applications of Euler s and Fermat s Theorem.

Ma/CS 6a Class 2: Congruences

Part V. Chapter 19. Congruence of integers

ELEMENTS OF NUMBER THEORY

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

M381 Number Theory 2004 Page 1

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?

LINEAR CONGRUENCES AND LINEAR DIOPHANTINE EQUATIONS

MATH 3240Q Introduction to Number Theory Homework 4

Math From Scratch Lesson 20: The Chinese Remainder Theorem

CPSC 467b: Cryptography and Computer Security

Rings of Residues. S. F. Ellermeyer. September 18, ; [1] m

All variables a, b, n, etc are integers unless otherwise stated. Each part of a problem is worth 5 points.

The Euclidean Algorithm and Multiplicative Inverses

CHAPTER 6. Prime Numbers. Definition and Fundamental Results

MATH 145 Algebra, Solutions to Assignment 4

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

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

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

MATH 4400 SOLUTIONS TO SOME EXERCISES. 1. Chapter 1

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

3 The fundamentals: Algorithms, the integers, and matrices

Lecture notes: Algorithms for integers, polynomials (Thorsten Theobald)

Number Theory Solutions Packet

Number theory (Chapter 4)

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.

Math Circle Beginners Group February 28, 2016 Euclid and Prime Numbers Solutions

Chapter 4 Finite Fields

1. multiplication is commutative and associative;

Congruences. September 16, 2006

A field F is a set of numbers that includes the two numbers 0 and 1 and satisfies the properties:

CS 5319 Advanced Discrete Structure. Lecture 9: Introduction to Number Theory II

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

Chapter 1 A Survey of Divisibility 14

Number Theory Homework.

44.(ii) In this case we have that (12, 38) = 2 which does not divide 5 and so there are no solutions.

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

This exam contains 5 pages (including this cover page) and 4 questions. The total number of points is 100. Grade Table

Practice Number Theory Problems

4 Number Theory and Cryptography

NOTES ON SIMPLE NUMBER THEORY

Number Theory Basics Z = {..., 2, 1, 0, 1, 2,...} For, b Z, we say that divides b if z = b for some. Notation: b Fact: for all, b, c Z:

NUMBER SYSTEMS. Number theory is the study of the integers. We denote the set of integers by Z:

Intermediate Math Circles February 26, 2014 Diophantine Equations I

Mathematics 228(Q1), Assignment 3 Solutions

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

MTH 346: The Chinese Remainder Theorem

Chapter 8. Introduction to Number Theory

Elementary Number Theory II

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

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

Lecture 5: Arithmetic Modulo m, Primes and Greatest Common Divisors Lecturer: Lale Özkahya

Number Theory Proof Portfolio

Algorithms CMSC Basic algorithms in Number Theory: Euclid s algorithm and multiplicative inverse

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

The Chinese Remainder Theorem

8 Primes and Modular Arithmetic

Homework 6 Solutions to Selected Problems

1 Overview and revision

Elementary Number Theory. Franz Luef

Wilson s Theorem and Fermat s Little Theorem

Some Facts from Number Theory

Math Circle Beginners Group February 28, 2016 Euclid and Prime Numbers

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

AN ALGEBRAIC PROOF OF RSA ENCRYPTION AND DECRYPTION

Elementary Number Theory Review. Franz Luef

Math 312/ AMS 351 (Fall 17) Sample Questions for Final

Intermediate Math Circles February 29, 2012 Linear Diophantine Equations I

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

cse 311: foundations of computing Fall 2015 Lecture 12: Primes, GCD, applications

cse 311: foundations of computing Spring 2015 Lecture 12: Primes, GCD, applications

Transcription:

Solution Sheet 2 1. (i) q = 5, r = 15 (ii) q = 58, r = 15 (iii) q = 3, r = 7 (iv) q = 6, r = 3. 2. (i) gcd (97, 157) = 1 = 34 97 21 157, (ii) gcd (527, 697) = 17 = 4 527 3 697, (iii) gcd (2323, 1679) = 23 = 18 1679 13 2323, (iv) gcd (4247, 2821) = 31 = 2 4247 3 2821. 3. (i) gcd (44517, 15691) = 71, (ii) gcd (173417, 159953) = 17. 4. (i) 5 41 3 68 = 1, (ii) 5 71 3 118 = 1, For (3k + 2, 5k + 3) we have 5 (3k + 2) 3 (5k + 3) = 1, 5. (i) By observation m = 3, n = 2 is a solution, so the general solution is m = 3 + 5k, n = 2 3k for k Z. (ii) Recall, if gcd (a, b) c then we can use Euclid s algorithm to solve ax + by = gcd (a, b), and then multiply through by c/ gcd (a, b) to get an integral solution to am + bn = c. The general solution is then for k Z. ( m 0 + bk gcd (a, b), n 0 ak gcd (a, b) In this example (2, 15) = 1 which divides 4. But we have no need to use Euclid s Algorithm, instead we quickly observe that 1 = 2 7 + 15 1. So, multiplying through by c/ gcd (a, b) = 4/1 = 4, we get 4 = 2 28 + 15 4. Thus m = 28, n = 4 is a particular solution. The general solution is m = 28 + 15k, n = 4 2k for k Z. Note, you might have observed immediately that 4 = 2m + 15n has a particular solution m = 2, n = 0. This leads to the general solution 1 )

m = 2 + 15l, n = 2l for l Z. This is the same set of solutions as above, map between them by l k 2. (iii) Euclid s Algorithm gives 385 = 12 31 + 13 31 = 2 13 + 5 13 = 2 5 + 3 5 = 3 + 2 3 = 2 + 1 Working back we find that 1 = 12 385 149 31. So a particular solution is m = 149, n = 12. The general solution is m = 149 + 385k, n = 12 31k for k Z. (iv) Euclid s Algorithm gives 73 = 41 + 32 41 = 32 + 9 32 = 3 9 + 5 9 = 5 + 4 5 = 4 + 1. Working back we find that 1 = 9 73 16 41. Multiply by 20 to get 20 = 180 73 320 41. So a particular solution is m = 320, n = 180. The general solution is m = 320 + 73k, n = 180 41k for k Z. 2

(v) Divide through by 3 to get 31m + 27n = 1. We quickly find by Euclid s Algorithm that 1 = 7 31 8 27 so a particular solution is m = 7, n = 8. The general solution is m = 7 + 27k, n = 8 31k for k Z. (vi) From Question 2(ii) we know that gcd (527, 697) = 17 and 17 13, hence the Diophantine Equation has no solutions. (vii) Euclid s Algorithm gives 533 = 403 + 130, 403 = 3 130 + 13, 130 = 10 13. Hence gcd (533, 403) = 13. Since 13 52 the equation has solutions. Working back we have 13 = 4 403 3 533. Multiply through by 4 to get a particular solution of m = 12, n = 16. The general solution is m = 12 + 31k, n = 16 41k for k Z, where 31 = 403/13 and 41 = 533/13. (Recall that the general solution is (m 0 + bk/ gcd (a, b), n 0 ak/ gcd (a, b)) for k Z.) 6. If the number of large boxes is x and small boxes y we must have 90x + 70y = 1100 (all prices in pennies). Divide by 10 to get 9x + 7y = 110. Euclid s Algorithm will give a solution x = 6 and y = 8. The general solution is x = 6 + 7t, y = 8 9t, t Z. But note that if t > 0 we have y < 0 while if t < 0 then x < 0. Since it seems reasonable that the number of boxes should be positive the only solution to our question comes from t = 0, i.e. 6 large boxes and 8 small boxes. 7. Write 3s + 5t = v. By the hint given, 6s + 10t + 15u = 4 becomes 2v + 15u = 4. By Question 5(ii) this has a solution v = 28, u = 4. For what s, t do we have 3s + 5t = 28? From question 5(i) we know that 3 ( 3) + 5 2 = 1. Multiply through by 28 and we get a solution (s, t, u) = (84, 56, 4). 3

For a second solution start with v = 2, u = 0. Then a solution to 3s + 5t = 2 could be s = 1, t = 1. Thus we get (s, t, u) = ( 1, 1, 0). Note, you may well have found other answers, you just have to check they are correct by substituting back into the equations. 8. (i) Euclid s Algorithm gives 41 = 31 + 10 31 = 3 10 + 1 Working back gives 1 = 4 31 3 41. Multiply through by 4 to find that 16 is a particular solution to 31x 4 mod 41. The general solution is 16 + 41k, k Z. (ii) Euclid s Algorithm gives 157 = 97 + 60 97 = 60 + 37 60 = 37 + 23 37 = 23 + 14 23 = 14 + 9 14 = 9 + 5 9 = 5 + 4 5 = 4 + 1. I leave it to the student to reverse this and derive 1 = 34 97 21 157. (1) Multiplying through by 2 we see that 68 is a particular solution of 97x 2 mod 157 and the general solution is 68 + 157k, k Z. Actually, (1) was seen in the solution to Question 2(i). (iii) Note that 1679 and 2323 were seen earlier in Question 2(iii), where the greatest common divisor of 23 was found. Since 23 does not divide 21 the congruence 1679x 21 mod 2323 has no solutions. 4

(iv) Divide through by 3 to get 29x 19 mod 35. Euclid s algorithm gives 1 = 5 35 6 29. Multiply through by 19 to find a particular solution of x 6 19 = 114 26 mod 35. The general solution is x 26 mod 35 or, in terms of the initial modulus, x 26, 61 or 96 mod 105. 9. Throughout this question you could use Euclid s Algorithm as in the previous question. But sometimes there are other approaches that work. (i) Look back at Question 5(iii) to find 31 ( 149) 1 mod 385. Multiply through by 4 to find the general solution of x 4 ( 149) = 596 174 mod 385. (ii) Start with 32x 47 47 + 385 mod 385, which gives an even number on the right hand side and thus the possibility of cancelling a factor of 2. In fact 47 + 385 = 432 = 16 27 so we can divide both sides by 16 to get 2x 27 mod 385. Apply the same idea again, so 2x 27 + 385 = 412 mod 385. Divide through by 2 to get x 206 mod 385. (iii) Write the equation as 13 47x (47 73) x = 26x mod 73 Divide through by 13 to get 1 2x mod 73. Perhaps now use the method from (ii) to write 2x 74 mod 73, thus x 37 mod 73 or x 37 36 mod 73. (iv) Divide through by 6 to get 7x 15 mod 26. Looking at a few small x we come across 7 3 5 mod 26. Multiplying by 3 we see that a solution to the congruence is x 9 17 mod 26. In terms of the original modulus, the solutions are x 17, 43, 69, 95, 121, 147 mod 156. 5

10. a) Squaring, 5 2 = 25 16 mod 41, 5 4 (16) 2 10 mod 41, 5 8 10 2 18 mod 41, 5 16 18 2 37 4 mod 41, 5 32 4 2 16 mod 41, 5 64 = 16 2 10 mod 41. b) From this list we note that 5 64 10 5 4 mod 41, and so on dividing through by 5 4 (coprime to 41) gives 5 60 1 mod 41. OR you might note from the list that So 5 20 1 mod 41. 5 16 5 4 4 10 1 mod 41. c) Multiply both sides of 5 2 x 7 mod 41 by 5 58 to get 5 60 x 7 5 58 i.e. x 7 5 58 mod 41. Here 11. Squaring, 7 5 58 = 7 5 32 5 16 5 8 5 2 7 16 ( 4) 18 ( 16) mod 41 38 mod 41. 3 2 = 9 2 mod 11, 3 4 ( 2) 2 4 mod 11, 3 8 4 2 5 mod 11, 3 16 5 2 3 mod 11, 3 32 9 mod 11. So 3 40 = 3 32 3 8 9 5 1 mod 11. Note that 40 35 7 35 ( 4) 35 (4 35 ) mod 11. Also, from this list we see that 4 3 4 mod 11 so we can read off the first few lines below from the list above. 4 2 3 8 5 mod 11, 4 4 3 16 3 mod 11, 4 8 3 32 9 2 mod 11, 4 16 ( 2) 2 4 mod 11, 4 32 4 2 5 mod 11. 6

Thus 40 35 (4 32 4 2 4) (5 5 4) 10 mod 11. Finally, 3 40 + 40 35 1 + 10 0 mod 11. 12. (i) Write the two congruences as x = 3 + 11k and x = 4 + 13l for integers k, l. Equate to get 3 + 11k = 4 + 13l. Thus we get a linear Diophantine equation 11k 13l = 1. Use Euclid s Algorithm to find 11 6 13 5 = 1. We can thus use k = 6 to find a particular solution to the system of x = 69. The general solution is x 69 mod 143. (ii) Multiply the first congruence by 4 (since 4 2 1 mod 7) and the second by 3 (since 3 4 1 mod 11). So we have x 4 mod 7, x 18 7 mod 11. Write x = 4 + 7k and x = 7 + 11l. As before set 4 + 7k = 7 + 11l or 7k 11l = 3. If you look at this you should see a solution, 7 2 11 1 = 3. With k = 2 we get a particular solution to the system of x = 18. The general solution is x 18 mod 77. (iii) Write x = 432 + 527k and x = 324 + 697l so 697l 527k = 432 324 = 108. For this to have solutions we need gcd (697, 527) 108. Looking back to Question 2(ii), Sheet2, we see that gcd (697, 527) = 17 108. Hence there are no solutions of the system. (iv) We have seen both congruences previously. From the solution to Question 8(i), Sheet 2, we can replace 31x 4 mod 41 by x 16 mod 41. From the solution to Question 9(iii), Sheet 2, we can replace 47x 13 mod 73 by x 36 mod 73. Thus x = 16+41k and x = 36+73l and so 41k 73l = 20. We have seen this Diophantine Equation in Question 5(iv), Sheet 2. A solution is k = 320, l = 180. Thus a solution of the system of Diophantine Equations is x = 13104. Hence the general solution is x 13104 1861 mod 2993. (v) The methods from the course only work for pairs of congruences, so we first look at x 1 mod 4 x 2 mod 3. 7

Equating 1 + 4k = 2 + 3l we find a solution of k = 1, l = 1 and so the general solution is x 5 mod 12. Thus we get a second pair of congruences x 5 mod 12, x 3 mod 7. Equating 5 + 12m = 3 + 7n we find a solution of m = 1, n = 2 and thus the general solution x 17 mod 84. 13. (i) n n 2 mod 5 0 0 1 1 2 4 3 4 4 1 So the only residues of squares modulo 5 are 0,1 and 4. If there is an integral solution to 30x 2 23y 2 = 1 then when we look at the equation modulo 5 we find that 23y 2 1 mod 5, i.e. 3y 2 1 mod 5 or, since 3 2 1 mod 5, y 2 2 3 mod 5. Impossible. Note in the table above, (5 n) 2 = 5 2 10n + n 2 n 2 mod 5 so we need only have taken n = 0, 1 or 2 to have found all possible residues. (ii) n n 2 mod 7 0 0 1 1 2 4 3 2 If 5x 2 14y 2 = 1 has a solution then, looking modulo 7, we must have 5x 2 1 mod 7. Since 3 5 1 mod 7 we get x 2 3 mod 7. Impossible. (iii) As in part (i) look at the equation modulo 5. 8