CHAPTER 3. Congruences. Congruence: definitions and properties

Size: px
Start display at page:

Download "CHAPTER 3. Congruences. Congruence: definitions and properties"

Transcription

1 CHAPTER 3 Congruences Part V of PJE Congruence: definitions and properties Definition. (PJE definition ) 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 mod 10 since 10 (5 25); mod 10; mod 10 since 10 (3 ( 113)), 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) Proposition. (PJE proposition ) 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 2 3. CONGRUENCES 3.2. Proposition. Modular arithmetic (PJE proposition ) 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 ) 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?

3 SOLVING LINEAR CONGRUENCES 3 Answer In many ways, the least non-negative residue is the best choice. See the following result 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 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 = = , 1 = = 5 1 (19 3 5) Thus 1 = = 12, so a particular solution to 5x 19k = 12 is (x 0, k 0 ) = (48, 12). The general solution is then (x, k) = ( l, l) 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 = l, 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.

5 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 = k, i.e. for x, k Z. Apply Euclid s Algorithm, 15x 57k = = = = 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 ( ) = ( ) = 36. So (x 0, k 0 ) = (48, 12) is a particular solution of 15x 57k = 36. Looking at ( ) modulo 57 we see that 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 gcd(15, 57) l, k = k 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 = l, l Z. Finally express your answer as a congruence with the original modulus. The solution x = l, 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 6 3. CONGRUENCES..., 2, 1, 0, 1,...) we find solutions..., 10, 29, 48, 67,.... But 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.

7 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 ( 3) = 1. Modulo 93 this gives 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 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 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 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 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 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 = (1 + 3t) = t, for all t Z,

9 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 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

11 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 mod 13. Solution The Method of Successive Squaring. Then mod 13, mod 13, 4 8 ( 4) 2 3 mod 13, mod 13, 4 32 ( 4) 2 3 mod 13, mod = = ( 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 12 3. CONGRUENCES example = = = 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 Example. Find the last 2 digits of 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 a a a 0 = ( a r 10 r 2 + a r 1 10 r a 2 ) (a a 0 ) (a a 0 ) mod 100. So the two digits of the remainder of mod 100 will be the last two digits of mod Then, because 99 = when written as a sum of powers of 2, we find that = mod mod 100.

13 NON-LINEAR DIOPHANTINE EQUATIONS 13 So the last two digits of are 7 and 7. Questions for students. What are the last three digits of What are the last two digits of ? 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 Example. (cf. PJE example ) 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

14 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 mod 7 or x 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 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 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., 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.

15 We search all possible values of ( a 3, b 3) mod 7. NON-LINEAR DIOPHANTINE EQUATIONS 15 a mod 7 a 3 mod = ( 3) 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 16 3. CONGRUENCES Show that 5 does not divide a 3 + a for any a Z. Example (MATH10111 exam 2008). Show that 2x y 4 = 21 has no integer solutions. Example (MATH10111 exam 2009) Show that 7x 5 + 3y 4 = 2 has no integer solutions.

3.2 Solving linear congruences. v3

3.2 Solving linear congruences. v3 3.2 Solving linear congruences. v3 Solving equations of the form ax b (mod m), where x is an unknown integer. Example (i) Find an integer x for which 56x 1 mod 93. Solution We have already solved this

More information

3.7 Non-linear Diophantine Equations

3.7 Non-linear Diophantine Equations 37 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 -

More information

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? Chapter 3: Theory of Modular Arithmetic 25 SECTION C Solving Linear Congruences By the end of this section you will be able to solve congruence equations determine the number of solutions find the multiplicative

More information

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

An integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p. Chapter 6 Prime Numbers Part VI of PJE. Definition and Fundamental Results Definition. (PJE definition 23.1.1) An integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p. If n > 1

More information

CHAPTER 6. Prime Numbers. Definition and Fundamental Results

CHAPTER 6. Prime Numbers. Definition and Fundamental Results CHAPTER 6 Prime Numbers Part VI of PJE. Definition and Fundamental Results 6.1. Definition. (PJE definition 23.1.1) An integer p is prime if p > 1 and the only positive divisors of p are 1 and p. If n

More information

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? Chapter 3: Theory of Modular Arithmetic 25 SECTION C Solving Linear Congruences By the end of this section you will be able to solve congruence equations determine the number of solutions find the multiplicative

More information

Lecture Notes. Advanced Discrete Structures COT S

Lecture Notes. Advanced Discrete Structures COT S Lecture Notes Advanced Discrete Structures COT 4115.001 S15 2015-01-13 Recap Divisibility Prime Number Theorem Euclid s Lemma Fundamental Theorem of Arithmetic Euclidean Algorithm Basic Notions - Section

More information

4. Congruence Classes

4. Congruence Classes 4 Congruence Classes Definition (p21) The congruence class mod m of a Z is Example With m = 3 we have Theorem For a b Z Proof p22 = {b Z : b a mod m} [0] 3 = { 6 3 0 3 6 } [1] 3 = { 2 1 4 7 } [2] 3 = {

More information

Elementary Number Theory. Franz Luef

Elementary Number Theory. Franz Luef Elementary Number Theory Congruences Modular Arithmetic Congruence The notion of congruence allows one to treat remainders in a systematic manner. For each positive integer greater than 1 there is an arithmetic

More information

CSE 20 DISCRETE MATH. Winter

CSE 20 DISCRETE MATH. Winter CSE 20 DISCRETE MATH Winter 2017 http://cseweb.ucsd.edu/classes/wi17/cse20-ab/ Today's learning goals Determine whether a relation is an equivalence relation by determining whether it is Reflexive Symmetric

More information

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

MATH 433 Applied Algebra Lecture 4: Modular arithmetic (continued). Linear congruences. MATH 433 Applied Algebra Lecture 4: Modular arithmetic (continued). Linear congruences. Congruences Let n be a postive integer. The integers a and b are called congruent modulo n if they have the same

More information

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?

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? 2 Mod math Modular arithmetic is the math you do when you talk about time on a clock. For example, if it s 9 o clock right now, then it ll be 1 o clock in 4 hours. Clearly, 9 + 4 1 in general. But on a

More information

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

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

More information

Math 109 HW 9 Solutions

Math 109 HW 9 Solutions Math 109 HW 9 Solutions Problems IV 18. Solve the linear diophantine equation 6m + 10n + 15p = 1 Solution: Let y = 10n + 15p. Since (10, 15) is 5, we must have that y = 5x for some integer x, and (as we

More information

CSE 20 DISCRETE MATH. Fall

CSE 20 DISCRETE MATH. Fall CSE 20 DISCRETE MATH Fall 2017 http://cseweb.ucsd.edu/classes/fa17/cse20-ab/ Today's learning goals Determine whether a relation is an equivalence relation by determining whether it is Reflexive Symmetric

More information

7. Prime Numbers Part VI of PJE

7. Prime Numbers Part VI of PJE 7. Prime Numbers Part VI of PJE 7.1 Definition (p.277) A positive integer n is prime when n > 1 and the only divisors are ±1 and +n. That is D (n) = { n 1 1 n}. Otherwise n > 1 is said to be composite.

More information

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

2.3 In modular arithmetic, all arithmetic operations are performed modulo some integer. CHAPTER 2 INTRODUCTION TO NUMBER THEORY ANSWERS TO QUESTIONS 2.1 A nonzero b is a divisor of a if a = mb for some m, where a, b, and m are integers. That is, b is a divisor of a if there is no remainder

More information

Number Theory Proof Portfolio

Number Theory Proof Portfolio Number Theory Proof Portfolio Jordan Rock May 12, 2015 This portfolio is a collection of Number Theory proofs and problems done by Jordan Rock in the Spring of 2014. The problems are organized first by

More information

MATH 361: NUMBER THEORY FOURTH LECTURE

MATH 361: NUMBER THEORY FOURTH LECTURE MATH 361: NUMBER THEORY FOURTH LECTURE 1. Introduction Everybody knows that three hours after 10:00, the time is 1:00. That is, everybody is familiar with modular arithmetic, the usual arithmetic of the

More information

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

Definition 6.1 (p.277) A positive integer n is prime when n > 1 and the only positive divisors are 1 and n. Alternatively 6 Prime Numbers Part VI of PJE 6.1 Fundamental Results Definition 6.1 (p.277) A positive integer n is prime when n > 1 and the only positive divisors are 1 and n. Alternatively D (p) = { p 1 1 p}. Otherwise

More information

M381 Number Theory 2004 Page 1

M381 Number Theory 2004 Page 1 M81 Number Theory 2004 Page 1 [[ Comments are written like this. Please send me (dave@wildd.freeserve.co.uk) details of any errors you find or suggestions for improvements. ]] Question 1 20 = 2 * 10 +

More information

Modular Arithmetic Instructor: Marizza Bailey Name:

Modular Arithmetic Instructor: Marizza Bailey Name: Modular Arithmetic Instructor: Marizza Bailey Name: 1. Introduction to Modular Arithmetic If someone asks you what day it is 145 days from now, what would you answer? Would you count 145 days, or find

More information

Lecture 2. The Euclidean Algorithm and Numbers in Other Bases

Lecture 2. The Euclidean Algorithm and Numbers in Other Bases Lecture 2. The Euclidean Algorithm and Numbers in Other Bases At the end of Lecture 1, we gave formulas for the greatest common divisor GCD (a, b), and the least common multiple LCM (a, b) of two integers

More information

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

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 10. Linear congruences In general we are going to be interested in the problem of solving polynomial equations modulo an integer m. Following Gauss, we can work in the ring Z m and find all solutions to

More information

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

Discrete Mathematics and Probability Theory Fall 2018 Alistair Sinclair and Yun Song Note 6 CS 70 Discrete Mathematics and Probability Theory Fall 2018 Alistair Sinclair and Yun Song Note 6 1 Modular Arithmetic In several settings, such as error-correcting codes and cryptography, we sometimes

More information

Integers and Division

Integers and Division Integers and Division Notations Z: set of integers N : set of natural numbers R: set of real numbers Z + : set of positive integers Some elements of number theory are needed in: Data structures, Random

More information

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

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers ALGEBRA CHRISTIAN REMLING 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers by Z = {..., 2, 1, 0, 1,...}. Given a, b Z, we write a b if b = ac for some

More information

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

MATH 2112/CSCI 2112, Discrete Structures I Winter 2007 Toby Kenney Homework Sheet 5 Hints & Model Solutions MATH 11/CSCI 11, Discrete Structures I Winter 007 Toby Kenney Homework Sheet 5 Hints & Model Solutions Sheet 4 5 Define the repeat of a positive integer as the number obtained by writing it twice in a

More information

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

12x + 18y = 50. 2x + v = 12. (x, v) = (6 + k, 2k), k Z. Math 3, Fall 010 Assignment 3 Solutions Exercise 1. Find all the integral solutions of the following linear diophantine equations. Be sure to justify your answers. (i) 3x + y = 7. (ii) 1x + 18y = 50. (iii)

More information

Basic elements of number theory

Basic elements of number theory Cryptography Basic elements of number theory Marius Zimand 1 Divisibility, prime numbers By default all the variables, such as a, b, k, etc., denote integer numbers. Divisibility a 0 divides b if b = a

More information

Basic elements of number theory

Basic elements of number theory Cryptography Basic elements of number theory Marius Zimand By default all the variables, such as a, b, k, etc., denote integer numbers. Divisibility a 0 divides b if b = a k for some integer k. Notation

More information

3 The fundamentals: Algorithms, the integers, and matrices

3 The fundamentals: Algorithms, the integers, and matrices 3 The fundamentals: Algorithms, the integers, and matrices 3.4 The integers and division This section introduces the basics of number theory number theory is the part of mathematics involving integers

More information

Part V. Chapter 19. Congruence of integers

Part V. Chapter 19. Congruence of integers Part V. Chapter 19. Congruence of integers Congruence modulo m Let m be a positive integer. Definition. Integers a and b are congruent modulo m if and only if a b is divisible by m. For example, 1. 277

More information

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 3

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 3 CS 70 Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 3 Modular Arithmetic In several settings, such as error-correcting codes and cryptography, we sometimes wish to work over a smaller

More information

7.2 Applications of Euler s and Fermat s Theorem.

7.2 Applications of Euler s and Fermat s Theorem. 7.2 Applications of Euler s and Fermat s Theorem. i) Finding and using inverses. From Fermat s Little Theorem we see that if p is prime and p a then a p 1 1 mod p, or equivalently a p 2 a 1 mod p. This

More information

A Guide to Arithmetic

A Guide to Arithmetic A Guide to Arithmetic Robin Chapman August 5, 1994 These notes give a very brief resumé of my number theory course. Proofs and examples are omitted. Any suggestions for improvements will be gratefully

More information

MATH 3240Q Introduction to Number Theory Homework 4

MATH 3240Q Introduction to Number Theory Homework 4 If the Sun refused to shine I don t mind I don t mind If the mountains fell in the sea Let it be it ain t me Now if six turned out to be nine Oh I don t mind I don t mind Jimi Hendrix If Six Was Nine from

More information

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

Outline. Number Theory and Modular Arithmetic. p-1. Definition: Modular equivalence a b [mod n] (a mod n) = (b mod n) n (a-b) Great Theoretical Ideas In CS Victor Adamchik CS - Lecture Carnegie Mellon University Outline Number Theory and Modular Arithmetic p- p Working modulo integer n Definitions of Z n, Z n Fundamental lemmas

More information

NOTES ON SIMPLE NUMBER THEORY

NOTES ON SIMPLE NUMBER THEORY NOTES ON SIMPLE NUMBER THEORY DAMIEN PITMAN 1. Definitions & Theorems Definition: We say d divides m iff d is positive integer and m is an integer and there is an integer q such that m = dq. In this case,

More information

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

Math 131 notes. Jason Riedy. 6 October, Linear Diophantine equations : Likely delayed 6 Math 131 notes Jason Riedy 6 October, 2008 Contents 1 Modular arithmetic 2 2 Divisibility rules 3 3 Greatest common divisor 4 4 Least common multiple 4 5 Euclidean GCD algorithm 5 6 Linear Diophantine

More information

4 Number Theory and Cryptography

4 Number Theory and Cryptography 4 Number Theory and Cryptography 4.1 Divisibility and Modular Arithmetic This section introduces the basics of number theory number theory is the part of mathematics involving integers and their properties.

More information

Discrete Mathematics and Probability Theory Summer 2014 James Cook Note 5

Discrete Mathematics and Probability Theory Summer 2014 James Cook Note 5 CS 70 Discrete Mathematics and Probability Theory Summer 2014 James Cook Note 5 Modular Arithmetic In several settings, such as error-correcting codes and cryptography, we sometimes wish to work over a

More information

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

2 Arithmetic. 2.1 Greatest common divisors. This chapter is about properties of the integers Z = {..., 2, 1, 0, 1, 2,...}. 2 Arithmetic This chapter is about properties of the integers Z = {..., 2, 1, 0, 1, 2,...}. (See [Houston, Chapters 27 & 28]) 2.1 Greatest common divisors Definition 2.16. If a, b are integers, we say

More information

Part IA Numbers and Sets

Part IA Numbers and Sets Part IA Numbers and Sets Definitions Based on lectures by A. G. Thomason Notes taken by Dexter Chua Michaelmas 2014 These notes are not endorsed by the lecturers, and I have modified them (often significantly)

More information

Discrete Mathematics and Probability Theory Summer 2017 Course Notes Note 6

Discrete Mathematics and Probability Theory Summer 2017 Course Notes Note 6 CS 70 Discrete Mathematics and Probability Theory Summer 2017 Course Notes Note 6 Modular Arithmetic In several settings, such as error-correcting codes and cryptography, we sometimes wish to work over

More information

1 Overview and revision

1 Overview and revision MTH6128 Number Theory Notes 1 Spring 2018 1 Overview and revision In this section we will meet some of the concerns of Number Theory, and have a brief revision of some of the relevant material from Introduction

More information

2301 Assignment 1 Due Friday 19th March, 2 pm

2301 Assignment 1 Due Friday 19th March, 2 pm Show all your work. Justify your solutions. Answers without justification will not receive full marks. Only hand in the problems on page 2. Practice Problems Question 1. Prove that if a b and a 3c then

More information

Chapter 3 Basic Number Theory

Chapter 3 Basic Number Theory Chapter 3 Basic Number Theory What is Number Theory? Well... What is Number Theory? Well... Number Theory The study of the natural numbers (Z + ), especially the relationship between different sorts of

More information

Chapter 5. Number Theory. 5.1 Base b representations

Chapter 5. Number Theory. 5.1 Base b representations Chapter 5 Number Theory The material in this chapter offers a small glimpse of why a lot of facts that you ve probably nown and used for a long time are true. It also offers some exposure to generalization,

More information

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

COMP239: Mathematics for Computer Science II. Prof. Chadi Assi EV7.635 COMP239: Mathematics for Computer Science II Prof. Chadi Assi assi@ciise.concordia.ca EV7.635 The Euclidean Algorithm The Euclidean Algorithm Finding the GCD of two numbers using prime factorization is

More information

1. multiplication is commutative and associative;

1. multiplication is commutative and associative; Chapter 4 The Arithmetic of Z In this chapter, we start by introducing the concept of congruences; these are used in our proof (going back to Gauss 1 ) that every integer has a unique prime factorization.

More information

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

MATH 115, SUMMER 2012 LECTURE 4 THURSDAY, JUNE 21ST MATH 115, SUMMER 2012 LECTURE 4 THURSDAY, JUNE 21ST JAMES MCIVOR Today we enter Chapter 2, which is the heart of this subject. Before starting, recall that last time we saw the integers have unique factorization

More information

Name: Mathematics 1C03

Name: Mathematics 1C03 Name: Student ID Number: Mathematics 1C03 Day Class Instructor: M. Harada Duration: 2.5 hours April 2018 McMaster University PRACTICE Final Examination This is a PRACTICE final exam. The actual final exam

More information

Math From Scratch Lesson 20: The Chinese Remainder Theorem

Math From Scratch Lesson 20: The Chinese Remainder Theorem Math From Scratch Lesson 20: The Chinese Remainder Theorem W. Blaine Dowler January 2, 2012 Contents 1 Relatively Prime Numbers 1 2 Congruence Classes 1 3 Algebraic Units 2 4 Chinese Remainder Theorem

More information

Elementary Number Theory Review. Franz Luef

Elementary Number Theory Review. Franz Luef Elementary Number Theory Review Principle of Induction Principle of Induction Suppose we have a sequence of mathematical statements P(1), P(2),... such that (a) P(1) is true. (b) If P(k) is true, then

More information

CPSC 467b: Cryptography and Computer Security

CPSC 467b: Cryptography and Computer Security CPSC 467b: Cryptography and Computer Security Michael J. Fischer Lecture 8 February 1, 2012 CPSC 467b, Lecture 8 1/42 Number Theory Needed for RSA Z n : The integers mod n Modular arithmetic GCD Relatively

More information

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

a the relation arb is defined if and only if = 2 k, k DISCRETE MATHEMATICS Past Paper Questions in Number Theory 1. Prove that 3k + 2 and 5k + 3, k are relatively prime. (Total 6 marks) 2. (a) Given that the integers m and n are such that 3 (m 2 + n 2 ),

More information

Applied Cryptography and Computer Security CSE 664 Spring 2018

Applied Cryptography and Computer Security CSE 664 Spring 2018 Applied Cryptography and Computer Security Lecture 12: Introduction to Number Theory II Department of Computer Science and Engineering University at Buffalo 1 Lecture Outline This time we ll finish the

More information

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

This is a recursive algorithm. The procedure is guaranteed to terminate, since the second argument decreases each time. 8 Modular Arithmetic We introduce an operator mod. Let d be a positive integer. For c a nonnegative integer, the value c mod d is the remainder when c is divided by d. For example, c mod d = 0 if and only

More information

MATH 310: Homework 7

MATH 310: Homework 7 1 MATH 310: Homework 7 Due Thursday, 12/1 in class Reading: Davenport III.1, III.2, III.3, III.4, III.5 1. Show that x is a root of unity modulo m if and only if (x, m 1. (Hint: Use Euler s theorem and

More information

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.

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. 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. If (a, b) R, we write a R b. 1 Binary Relation Example:

More information

Carmen s Core Concepts (Math 135)

Carmen s Core Concepts (Math 135) Carmen s Core Concepts (Math 135) Carmen Bruni University of Waterloo Week 8 1 The following are equivalent (TFAE) 2 Inverses 3 More on Multiplicative Inverses 4 Linear Congruence Theorem 2 [LCT2] 5 Fermat

More information

MATH Fundamental Concepts of Algebra

MATH Fundamental Concepts of Algebra MATH 4001 Fundamental Concepts of Algebra Instructor: Darci L. Kracht Kent State University April, 015 0 Introduction We will begin our study of mathematics this semester with the familiar notion of even

More information

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

Discrete Logarithms. Let s begin by recalling the definitions and a theorem. Let m be a given modulus. Then the finite set Discrete Logarithms Let s begin by recalling the definitions and a theorem. Let m be a given modulus. Then the finite set Z/mZ = {[0], [1],..., [m 1]} = {0, 1,..., m 1} of residue classes modulo m is called

More information

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

For your quiz in recitation this week, refer to these exercise generators: Monday, Oct 29 Today we will talk about inverses in modular arithmetic, and the use of inverses to solve linear congruences. For your quiz in recitation this week, refer to these exercise generators: GCD

More information

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

Number Theory Math 420 Silverman Exam #1 February 27, 2018 Name: Number Theory Math 420 Silverman Exam #1 February 27, 2018 INSTRUCTIONS Read Carefully Time: 50 minutes There are 5 problems. Write your name neatly at the top of this page. Write your final answer

More information

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

Number Theory. CSS322: Security and Cryptography. Sirindhorn International Institute of Technology Thammasat University CSS322. Number Theory. CSS322: Security and Cryptography Sirindhorn International Institute of Technology Thammasat University Prepared by Steven Gordon on 29 December 2011 CSS322Y11S2L06, Steve/Courses/2011/S2/CSS322/Lectures/number.tex,

More information

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,

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, SOLUTIONS TO PROBLEM SET 1 Section 1.3 Exercise 4. We see that 1 1 2 = 1 2, 1 1 2 + 1 2 3 = 2 3, 1 1 2 + 1 2 3 + 1 3 4 = 3 4, and is reasonable to conjecture n k=1 We will prove this formula by induction.

More information

Chapter 2 - Relations

Chapter 2 - Relations Chapter 2 - Relations Chapter 2: Relations We could use up two Eternities in learning all that is to be learned about our own world and the thousands of nations that have arisen and flourished and vanished

More information

Number Theory. Modular Arithmetic

Number Theory. Modular Arithmetic Number Theory The branch of mathematics that is important in IT security especially in cryptography. Deals only in integer numbers and the process can be done in a very fast manner. Modular Arithmetic

More information

Congruence of Integers

Congruence of Integers Congruence of Integers November 14, 2013 Week 11-12 1 Congruence of Integers Definition 1. Let m be a positive integer. For integers a and b, if m divides b a, we say that a is congruent to b modulo m,

More information

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

4 PRIMITIVE ROOTS Order and Primitive Roots The Index Existence of primitive roots for prime modulus... PREFACE These notes have been prepared by Dr Mike Canfell (with minor changes and extensions by Dr Gerd Schmalz) for use by the external students in the unit PMTH 338 Number Theory. This booklet covers

More information

Chinese Remainder Theorem

Chinese Remainder Theorem Chinese Remainder Theorem Theorem Let R be a Euclidean domain with m 1, m 2,..., m k R. If gcd(m i, m j ) = 1 for 1 i < j k then m = m 1 m 2 m k = lcm(m 1, m 2,..., m k ) and R/m = R/m 1 R/m 2 R/m k ;

More information

Number Theory Solutions Packet

Number Theory Solutions Packet Number Theory Solutions Pacet 1 There exist two distinct positive integers, both of which are divisors of 10 10, with sum equal to 157 What are they? Solution Suppose 157 = x + y for x and y divisors of

More information

A SURVEY OF PRIMALITY TESTS

A SURVEY OF PRIMALITY TESTS A SURVEY OF PRIMALITY TESTS STEFAN LANCE Abstract. In this paper, we show how modular arithmetic and Euler s totient function are applied to elementary number theory. In particular, we use only arithmetic

More information

8 Primes and Modular Arithmetic

8 Primes and Modular Arithmetic 8 Primes and Modular Arithmetic 8.1 Primes and Factors Over two millennia ago already, people all over the world were considering the properties of numbers. One of the simplest concepts is prime numbers.

More information

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

Algebra. Modular arithmetic can be handled mathematically by introducing a congruence relation on the integers described in the above example. Coding Theory Massoud Malek Algebra Congruence Relation The definition of a congruence depends on the type of algebraic structure under consideration Particular definitions of congruence can be made for

More information

Elementary Properties of the Integers

Elementary Properties of the Integers Elementary Properties of the Integers 1 1. Basis Representation Theorem (Thm 1-3) 2. Euclid s Division Lemma (Thm 2-1) 3. Greatest Common Divisor 4. Properties of Prime Numbers 5. Fundamental Theorem of

More information

FERMAT S TEST KEITH CONRAD

FERMAT S TEST KEITH CONRAD FERMAT S TEST KEITH CONRAD 1. Introduction Fermat s little theorem says for prime p that a p 1 1 mod p for all a 0 mod p. A naive extension of this to a composite modulus n 2 would be: for all a 0 mod

More information

Winter Camp 2009 Number Theory Tips and Tricks

Winter Camp 2009 Number Theory Tips and Tricks Winter Camp 2009 Number Theory Tips and Tricks David Arthur darthur@gmail.com 1 Introduction This handout is about some of the key techniques for solving number theory problems, especially Diophantine

More information

Number Theory Homework.

Number Theory Homework. Number Theory Homewor. 1. The Theorems of Fermat, Euler, and Wilson. 1.1. Fermat s Theorem. The following is a special case of a result we have seen earlier, but as it will come up several times in this

More information

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).

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). 1. Prove that the number 123456782 cannot be represented as a 2 +3b 2 for any integers a and b. (Hint: Consider the remainder mod 3). Solution: First, note that 123456782 2 mod 3. How did we find out?

More information

CMPUT 403: Number Theory

CMPUT 403: Number Theory CMPUT 403: Number Theory Zachary Friggstad February 26, 2016 Outline Factoring Sieve Multiplicative Functions Greatest Common Divisors Applications Chinese Remainder Theorem Factoring Theorem (Fundamental

More information

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

Know the Well-ordering principle: Any set of positive integers which has at least one element contains a smallest element. The first exam will be on Monday, June 8, 202. The syllabus will be sections. and.2 in Lax, and the number theory handout found on the class web site, plus the handout on the method of successive squaring

More information

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

Chapter 9 Mathematics of Cryptography Part III: Primes and Related Congruence Equations Chapter 9 Mathematics of Cryptography Part III: Primes and Related Congruence Equations Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 9.1 Chapter 9 Objectives

More information

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

Proof 1: Using only ch. 6 results. Since gcd(a, b) = 1, we have Exercise 13. Consider positive integers a, b, and c. (a) Suppose gcd(a, b) = 1. (i) Show that if a divides the product bc, then a must divide c. I give two proofs here, to illustrate the different methods.

More information

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

CIS 6930/4930 Computer and Network Security. Topic 5.1 Basic Number Theory -- Foundation of Public Key Cryptography CIS 6930/4930 Computer and Network Security Topic 5.1 Basic Number Theory -- Foundation of Public Key Cryptography 1 Review of Modular Arithmetic 2 Remainders and Congruency For any integer a and any positive

More information

The Euclidean Algorithm and Multiplicative Inverses

The Euclidean Algorithm and Multiplicative Inverses 1 The Euclidean Algorithm and Multiplicative Inverses Lecture notes for Access 2009 The Euclidean Algorithm is a set of instructions for finding the greatest common divisor of any two positive integers.

More information

MTH 346: The Chinese Remainder Theorem

MTH 346: The Chinese Remainder Theorem MTH 346: The Chinese Remainder Theorem March 3, 2014 1 Introduction In this lab we are studying the Chinese Remainder Theorem. We are going to study how to solve two congruences, find what conditions are

More information

CSE 20: Discrete Mathematics

CSE 20: Discrete Mathematics Spring 2018 Summary So far: Today: Logic and proofs Divisibility, modular arithmetics Number Systems More logic definitions and proofs Reading: All of Chap. 1 + Chap 4.1, 4.2. Divisibility P = 5 divides

More information

MODULAR ARITHMETIC KEITH CONRAD

MODULAR ARITHMETIC KEITH CONRAD MODULAR ARITHMETIC KEITH CONRAD. Introduction We will define the notion of congruent integers (with respect to a modulus) and develop some basic ideas of modular arithmetic. Applications of modular arithmetic

More information

Number Theory. Zachary Friggstad. Programming Club Meeting

Number Theory. Zachary Friggstad. Programming Club Meeting Number Theory Zachary Friggstad Programming Club Meeting Outline Factoring Sieve Multiplicative Functions Greatest Common Divisors Applications Chinese Remainder Theorem Throughout, problems to try are

More information

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

Course MA2C02, Hilary Term 2013 Section 9: Introduction to Number Theory and Cryptography Course MA2C02, Hilary Term 2013 Section 9: Introduction to Number Theory and Cryptography David R. Wilkins Copyright c David R. Wilkins 2000 2013 Contents 9 Introduction to Number Theory 63 9.1 Subgroups

More information

Lecture 7 Number Theory Euiseong Seo

Lecture 7 Number Theory Euiseong Seo Lecture 7 Number Theory Euiseong Seo (euiseong@skku.edu) 1 Number Theory God created the integers. All else is the work of man Leopold Kronecker Study of the property of the integers Specifically, integer

More information

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

Definition For a set F, a polynomial over F with variable x is of the form *6. Polynomials Definition For a set F, a polynomial over F with variable x is of the form a n x n + a n 1 x n 1 + a n 2 x n 2 +... + a 1 x + a 0, where a n, a n 1,..., a 1, a 0 F. The a i, 0 i n are the

More information

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

PREPARATION NOTES FOR NUMBER THEORY PRACTICE WED. OCT. 3,2012 PREPARATION NOTES FOR NUMBER THEORY PRACTICE WED. OCT. 3,2012 0.1. Basic Num. Th. Techniques/Theorems/Terms. Modular arithmetic, Chinese Remainder Theorem, Little Fermat, Euler, Wilson, totient, Euclidean

More information

Discrete Mathematics with Applications MATH236

Discrete Mathematics with Applications MATH236 Discrete Mathematics with Applications MATH236 Dr. Hung P. Tong-Viet School of Mathematics, Statistics and Computer Science University of KwaZulu-Natal Pietermaritzburg Campus Semester 1, 2013 Tong-Viet

More information

Chapter 2. Divisibility. 2.1 Common Divisors

Chapter 2. Divisibility. 2.1 Common Divisors Chapter 2 Divisibility 2.1 Common Divisors Definition 2.1.1. Let a and b be integers. A common divisor of a and b is any integer that divides both a and b. Suppose that a and b are not both zero. By Proposition

More information

The Chinese Remainder Theorem

The Chinese Remainder Theorem Chapter 5 The Chinese Remainder Theorem 5.1 Coprime moduli Theorem 5.1. Suppose m, n N, and gcd(m, n) = 1. Given any remainders r mod m and s mod n we can find N such that N r mod m and N s mod n. Moreover,

More information