# Elementary Number Theory We begin with a bit of elementary number theory, which is concerned

Save this PDF as:

Size: px
Start display at page:

Download "Elementary Number Theory We begin with a bit of elementary number theory, which is concerned"

## Transcription

1 CONSTRUCTION OF THE FINITE FIELDS Z p S. R. DOTY Elementary Number Theory We begin with a bit of elementary number theory, which is concerned solely with questions about the set of integers Z = {0, ±1, ±2, ±3,... }. We are not concerned with real numbers or fractions here. We need the concept of divisibility in Z, the division algorithm, and the Euclidean algorithm. A.1. Definition. Let a, b Z. Say that a divides b (written a b) if there exists some k Z such that b = ak. We also say that b is divisible by a, or that b is a multiple of a, when this is so. If b is divisible by a, we also say that a is a divisor or factor of b. Note that any integer divides 0. A.2. Lemma. (Division Algorithm) Let m and n be given positive integers. There exist unique integers q, r such that m = qn + r (0 r < n). The integers q, r are called the quotient and remainder, respectively. The procedure by which we obtain them is called long division, as you undoubtedly recall. A.3. Definition. A positive integer p > 1 is prime if it has no positive integer divisors other than 1 and p. Note that we explicitly exclude 1 from the set of prime numbers. The number 1 is not a prime! The primes in Z are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47 and so on. There are infinitely many primes in Z. A.4. Definition. Let a, b Z. Any integer d such that d a and d b is called a common divisor of a, b. The greatest common divisor (gcd) of a, b is the largest of the common divisors. Write gcd(a, b) or more simply just (a, b) for the gcd of a, b. Note that the gcd of the pair 0, 0 is undefined, since there is no largest common divisor, but the gcd is well-defined in every other case. What is gcd(n, 0) when n 0? 1

2 2 S. R. DOTY People say that a, b are relatively prime if their gcd is 1. This means that they have no prime factors in common, since if p a and p b then (a, b) p is surely larger than 1. One way to compute the gcd of two given positive integers is to make a list of the divisors for each given number, and then the gcd is simply the largest number common to both lists. Of course, this is virtually impossible if the two numbers are large, but it works well enough for small numbers. For instance, let us compute the gcd of the pair 51, 33 using this idea. The divisors of 49 are 1, 7, 49 and the divisors of 210 are 1, 2, 3, 5, 6, 7, 10, 14, 15, 21, 30, 42, 70, etc. The largest number that is common to both lists is 7, so 7 = gcd(49, 210). Another method is to factor each given number into its prime factorization. Although this is virtually impossible for very large numbers, it is pretty easy to do for small numbers. For instance, let us compute the gcd of the pair 209, 1368 using this idea. You can check with your calculator or by pen and paper that 209 = and 1368 = Thus it follows immediately that gcd(209, 1368) = 19. Note that this method, while better than the first method, still falls apart if we cannot find the prime factors of the numbers. (Please tell me the prime factors of if you doubt that this is a serious obstacle.) A third way to compute the gcd is to use the Euclidean algorithm. It turns out that for large numbers this third way is far and away the best, in terms of efficiency. For instance, to compute the gcd of two random 100 digit numbers by a digital computer using the first or second method would require so many divisions that even the fastest computer would not compute an answer in a reasonable time. (It would take many years, even for the fastest supercomputer.) However, even a desktop PC could obtain an answer to the same problem using the Euclidean algorithm in a second or so, because only a few hundred divisions would be required! Now that you are convinced the Euclidean algorithm is a great thing for mankind, let s examine how it works. A.5. Euclidean algorithm. Suppose you need to compute the gcd of integers a, b. For simplicity, assume both a, b > 0 and that a is the larger of the two. Repeatedly apply the division algorithm to get equations: a = bq + r (0 r < b) b = rq 1 + r 1 (0 r 1 < r) r = r 1 q 2 + r 2 (0 r 2 < r 1 )

3 CONSTRUCTION OF THE FINITE FIELDS Z p 3 r 1 = r 2 q 3 + r 3 (0 r 3 < r 2 ) The process terminates when you get a remainder of 0. The gcd of a, b is the last nonzero remainder in the above procedure. The Euclidean algorithm, probably one of the first algorithms ever discovered, is the fastest known algorithm for computing the gcd of any two given numbers. It has a surprising number of applications to computer science, and is extremely useful in cryptography. As an application of the Euclidean algorithm we have the following important result.. A.6. Theorem. Let a, b Z, not both zero. There exist integers s, t such that gcd(a, b) = sa + tb. (In other words, gcd(a, b) is expressible as an integral linear combination of a, b.) Proof. The Euclidean algorithm equations can be worked backwards, with one substituted into another, until you reach this expression. To be specific, start with the last equation in which the remainder is nonzero. This can be rewritten to express that last nonzero remainder (the gcd) as a linear combination of the two remainders which precede it: gcd(a, b) = r n = r n 2 r n 1 q n. This is the base step, and it expresses gcd(a, b) as a linear combination of r n 1 and r n 2. Similarly, there is an equation which expresses r n 1 as a linear combination of the two remainders which precede it: r n 1 = r n 3 r n 2 q n 1. and putting that linear combination into the gcd equation above and grouping terms gives us gcd(a, b) = r n 2 (r n 3 r n 2 q n 1 )q n = ( q n )r n 3 + (1 + q n 1 q n )r n 2 which shows that gcd(a, b) is expressible as a linear combination of r n 2 and r n 3. One can repeat the process by induction until one arrives at a linear combination of a and b.

4 4 S. R. DOTY A.7. Example. Here is an example which more clearly illustrates the proof of the previous theorem. Let s compute gcd(1521, 2004) using the Euclidean algorithm. Divide the bigger number by the smaller to get (1) 2004 = Here the quotient is 1 and the remainder is 483. Now we divide 1521 by 483 to obtain (2) 1521 = Continuing, we divide 483 by 72 to obtain (3) 483 = Dividing 72 by 51 we obtain (4) 72 = Dividing 51 by 21 we obtain (5) 51 = Finally, dividing 21 by 9 we obtain (6) 21 = The process stops here because we will obtain a remainder of zero on the next division. This proves that gcd(1521, 2004) = 3, which is the last nonzero remainder obtained by the process. Now we work the equations backwards to express gcd(1521, 2004) as a linear combination of 1521 and 2004, as follows. By the last equation (6) we have, solving for the remainder: 3 = Substitute 9 = , which comes from (5), to obtain 3 = 21 2( ) = ( 2)51 + (5)21; substitute 21 = 72 51, which comes from (4), to obtain 3 = ( 2)51 + (5)(72 51) = (5)72 + ( 7)51; substitute 51 = , which comes from (3), to obtain 3 = (5)72 + ( 7)( ) = ( 7)483 + (47)72; substitute 72 = , which comes from (2), to obtain 3 = ( 7)483 + (47)( ) = (47) ( 148)483; substitute 483 = , which comes from (1), to obtain 3 = (47) ( 148)( ) = ( 148) (195)1521.

5 CONSTRUCTION OF THE FINITE FIELDS Z p 5 This is the desired linear combination, since we have arrived at an expression gcd(1521, 2004) = 1521s+2004t with s = 195 and t = 148. Now we apply the theorem to prove a fundamental fact about divisibility in the integers. A.8. Lemma. (Euclid) If a (bc) and gcd(a, b) = 1 then a c. Proof. By Theorem A.6, there exist integers s, t such that 1 = as + bt. So c = cas + cbt. Since a bc, both summands in the right-hand-side of the preceding equality are divisible by a. Thus c is divisible by a, as desired. A.9. Definition. Let a, b Z. A common multiple of a, b is any integer m such that a m, b m. The least common multiple (lcm) of a, b is the smallest positive common multiple. For example, lcm(5, 12) = 60, lcm(16, 48) = 48, and lcm(18, 99) = 198. The relation between lcm and gcd is the following. A.10. Theorem. Let a, b Z. Then lcm(a, b) = ab/ gcd(a, b). Proof. Try to find your own proof of this theorem, as a useful test of your understanding of divisibility. Modular Arithmetic Next we come to the study of modular arithmetic and congruences. This is an important application of our brief study of number theory. Before giving the technical theory, it is perhaps worthwhile to make some comments on the intuition behind modular arithmetic. The basic idea in modular arithmetic is embodied in the ordinary 12 hour clock. We all know that if it is currently 11 o clock, then two hours from now will be 1 o clock, because at 12 o clock we start over again at zero. We can symbolize this situation by writing the equation = 1 (mod 12), or (mod 12). (Either notation is common.) To do modular arithmetic (that is, addition, subtraction, and multiplication) mod 12 we just compute as usual in Z taking into account that all multiples of 12 are the same as zero. Thus we have (mod 12), (mod 12), and (mod 12). Note that the preferred answer for any modular arithmetic calculation is a natural number between 0 and 11 (inclusive). These are the same as the numbers on the face of the clock, except that 12 has been replaced by zero.

6 6 S. R. DOTY Modular arithmetic mod n (a positive integer) works exactly the same way, except that we replace the number 12 by the number n. Thus the preferred answer for a modular arithmetic calculation mod n is an integer in the closed interval [0, n 1]. Such integers are called residues mod n. A.11. Definition. (Gauss) Let n be a given fixed positive integer. For a, b Z we say that a is congruent to b modulo n if n divides a b. Write a b (mod n) when this is so. Some folks write a = b (mod n) instead. A.12. Theorem. Congruence modulo n is an equivalence relation on the set Z. That is: (a) a a (mod n) (reflexivity) (b) a b (mod n) b a (mod n) (symmetry) (c) a b (mod n), b c (mod n) a c (mod n) (transitivity) for all a, b, c Z. Proof. The proof is routine, and left for you to check. A.13. Theorem. Suppose that a b (mod n) and c d (mod n). Then: (a) a + c b + d (mod n) (b) ac bd (mod n). Proof. Once again, the proof is a routine exercise. A.14. Theorem. If gcd(a, n) = 1 then the congruence ax b (mod n) is solvable, and its solution is uniquely determined modulo n. Proof. (Existence) Since gcd(a, n) = 1 we can find integers s, t such that 1 = as + nt. Then b = bas + bnt. Thus b abs (mod n). This proves that the integer x = bs is a solution. (Uniqueness) Suppose that we have two solutions x, x to the given congruence. Then ax b and ax b (mod n). Thus ax ax (mod n), so n (ax ax ), so n a(x x ). By Lemma A.8 we conclude that n (x x ), and so x x (mod n). It is important to notice that the proof not only shows that the congruence can be solved, but it actually tells us how to solve it, by means of the Euclidean algorithm. For instance, let us solve the congruence 121x 45 (mod 390). By the Euclidean algorithm or otherwise, we find that gcd(121, 390) = 1 and 1 = Multiplying by 45 as in the above proof we get that 45 = ,

7 CONSTRUCTION OF THE FINITE FIELDS Z p 7 so in other words 121( ) 45 (mod 390). So a solution to 121x 45 (mod 390) is given by x = ) = Since x 389 (mod 390) we can also use the simpler representative x = 389 to solve the congruence. (Any member of the equivalence class E( 3509) = {m Z m 3509 (mod 390)} will solve the problem, and 389 is a member of this class as you can easily check.) A.15. Definition. Any integer x such that ax 1 (mod n) is called a multiplicative inverse of a modulo n. When such an x exists we say that a is invertible modulo n. The preceding theorem says that whenever a is relatively prime to n then a is invertible modulo n. In fact, also conversely: if a is not relatively prime to n, then a is not invertible modulo n. A.16. Definition. (The integers modulo n) Since congruence modulo n is an equivalence relation on the set Z of integers, it determines a partition of Z into disjoint equivalence classes. We write a = E(a) for the equivalence class containing an integer a. Thus a = {b Z a b (mod n)} = {a + nk k Z}. Observe that an equivalence class simply collects together all the integers which leave the same remainder upon division by n. Let Z n = Z/ be the set of equivalence classes mod n. We can define binary operations, addition and multiplication, on the set Z n as follows: a + b = a + b; a b = ab. where on the right-hand-side of each equality we add or multiply as usual in Z. This definition formalizes the intuition of modular arithmetic discussed previously. It may be verified that these binary operations are well-defined (i.e. independent of choice of representatives). There are precisely n different equivalence classes in Z n. They correspond bijectively with the possible remainders (i.e., the residues) {0, 1,..., n 1} obtainable by division of an integer by n. Sometimes we use these numbers to denote the corresponding equivalence class. EXAMPLE. Consider the integers mod 2. The equivalence classes mod 2 are the even and odd integers: 0 = 0 = {2n n Z} and 1 = 1 = {2n + 1 n Z}. Mod 2 addition and multiplication can be

8 8 S. R. DOTY described in the following addition and multiplication tables Mod 2 arithmetic is often called binary arithmetic. It is fundamental in digital computers and mathematical logic. EXAMPLE. For another example, consider the integers mod 4. The equivalence classes mod 4 are the following: 0 = 0 = {4n n Z} 1 = 1 = {4n + 1 n Z} 2 = 2 = {4n + 2 n Z} 3 = 3 = {4n + 3 n Z}. Mod 4 addition and multiplication are summarized by the following addition and multiplication tables Commutative Rings and Number Fields Next I want to introduce two useful formal algebraic structures. The definitions are based on axioms abstracted from familiar properties of ordinary integers and real numbers. We will obtain interesting examples of such structures from modular arithmetic. This was our main objective all along, and the reason we studied number theory and modular arithmetic. A.17. Definition. Let A be a given set. A binary operation on the set A is a mapping f : A A A. Such a function has two arguments, that is, we have to write f(x, y) to denote the function value. A binary operation combines two given elements of A to give another element of A. Sometimes, if is a binary operation on a set A, we write x y instead of (x, y). For example, we always do that when is addition or multiplication, because writing +(x, y) instead of the more familiar x + y would look strange to us. Also, when is multiplication, we often abbreviate x y to xy, as usual. It is important to realize that

9 CONSTRUCTION OF THE FINITE FIELDS Z p 9 although such conventions are adopted for convenience and comfort, nevertheless we still have a binary operation, no matter how we choose to write it. A.18. Definition. A commutative ring is a set R with two binary operations, multiplication and addition +, such that for all a, b, c in the set R we have: (a) a + b = b + a; ab = ba (commutativity) (b) a + (b + c) = (a + b) + c; a(bc) = (ab)c (associativity) (c) a(b + c) = ab + ac (distributivity); moreover, there exist distinguished elements 0, 1 in R such that (d) a + 0 = a; a1 = a for all a (identity); and finally, for every a R, there exists some element a in R such that (e) a + ( a) = 0 (additive inverse). The element 0 is called the additive identity, while 1 is known as the multiplicative identity. The element a is the additive inverse of a, or the negative of a. We can subtract in a ring, because we can define a b = a + ( b). But division may not be possible in a ring. We can view a commutative ring as a set of objects along with a way to add, subtract, and multiply them, subject to the usual familiar properties of numbers. EXAMPLES: The set of integers Z is a commutative ring under ordinary addition and multiplication. So are the sets of rational numbers Q, real numbers R, and complex numbers C. The set Z n of equivalence classes mod n is a ring under modular addition and modular multiplication, as you can easily check. This ring is a finite ring since it contains just n different elements. The set N of natural numbers under ordinary addition and multiplication is not a ring, because axiom (e) fails. The ring Z 1 of integers mod 1 is quite strange: it lumps together all of Z into just one equivalence class. We have just one element in this ring, so 0 = 1 in this ring. This ring is sometimes called the zero ring or the trivial ring. It is not of much interest. Here are some formal consequences of the definition, which must hold in any ring R, for all a, b, c in R: (1) a0 = 0. (2) a( b) = (ab) = ( a)b. (3) ( a)( b) = ab.

10 10 S. R. DOTY (4) a(b c) = ab ac. (5) ( 1)a = a. The proof of these basic facts is an exercise. For instance, to prove (a) one would begin with the equality = 0 (which comes from axiom (d) by taking a = 0 there), multiply both sides by a, and so forth. A.19. Definition. An element a of a ring is said to be invertible if there is some b in the ring such that ab = ba = 1. If such an element b exists in the ring, we write a 1 = b. (Think of the inverse of a matrix.) An invertible element is also called a unit in the ring. EXAMPLES. In Z 4 the invertible elements are 1 and 3. In Z the invertible elements are 1 and 1. In the ring R of real numbers, every nonzero element is invertible. A.20. Definition. A field is a commutative ring F in which 0 1, and every nonzero element is invertible. EXAMPLES: Q, R, and C are all fields. The ring of integers Z is not a field. Is the ring Z n ever a field? The answer, which is provided by the following theorem, is quite satisfying. A.21. Theorem. Z n is a field if and only if n is prime. Proof. This follows immediately from Theorem A.14. Suppose that n is prime. Let a 0 in Z n. Then gcd(a, n) = 1 since a {1, 2,..., n 1} and thus p cannot divide a. Hence there exists some x Z such that ax 1 (mod n), so x is the inverse of a in Z n. This shows that Z n is a field if n is prime. On the other hand, if n is not prime then we can factor n in the form n = ab for some integers a, b < n. Then a will not be invertible in Z n since ab = 0 in Z n. (If you assume a is invertible then you can easily derive a contradiction from this.) NOTATION: In case n = p is prime, it is customary to write F p = Z p for this finite field of p elements. Notice that the proof of the above theorem provides a procedure by which we can compute the inverse of an invertible element of Z n, by solving the corresponding congruence. Looking back at the proof of A.14 we see that to solve the congruence we can use the Euclidean algorithm. (For a small modulus, it is simpler to use trial and error since there are only finitely many possibilities to check.)

11 CONSTRUCTION OF THE FINITE FIELDS Z p 11 EXAMPLE. You can check that 7919 is prime. Let s compute the inverse of a = 210 in the finite field Z The gcd of 210 and 7919 is 1, of course, and using the Euclidean algorithm we can find integers s and t such that 1 = 210s t. In fact, s = 1169 and t = 31 as you can check. Thus x = 1169 is a solution to the congruence 210x 1 (mod 7919), so the inverse of 210 in Z 7919 is the element = 1169 = You can check this by computing the residue of (mod 7919), which should be 1. In any field, we can define division by any nonzero element b, by setting a/b = ab 1. Intuitively, a field is a structure in which we have all the ordinary operations of arithmetic: addition, subtraction, multiplication, and division, such that these operations satisfy the usual properties of algebra. In addition to the familiar number fields Q, R, C we have the novel finite fields F p = Z p of p elements, for every prime number p. Exercises (1) (a) Use the Euclidean algorithm to compute gcd( , ). (Use your calculator.) (b) Find integers s, t such that gcd( , ) = s t. (2) Show that if gcd(a, n) 1 then a is not invertible modulo n. (3) Compute the following: (a) 2 1 (mod 7). (b) 4 1 (mod 15). (c) 23 1 (mod 275). (d) (mod 81799). (Use Euclidean algorithm.) (4) Use your answers to the preceding exercise to solve the congruences: (a) 2x 4 (mod 7). (b) 4x 13 (mod 15). (c) 23x 200 (mod 275). (d) 909x 8910 (mod 81799). Hint: Simply multiply by the inverse. (5) Let R be a commutative ring. Prove, using only the axioms listed in the definition of commutative ring, that for any elements a, b, c of R we have: (a) a0 = 0. (b) a( b) = (ab) = ( a)b. (c) ( a)( b) = ab. (d) a(b c) = ab ac. (e) ( 1)a = a. Note: b c = b + ( c) (definition).

12 12 S. R. DOTY (6) Show that the number of invertible elements in the ring Z n is ϕ(n), for any n. Here ϕ(n) is the number of integers in the range 1, 2,..., n which are relatively prime to n. The function ϕ is called Euler s phi function. (7) Prove that congruence mod n is an equivalence relation on Z (Theorem A.12). (8) Prove Theorem A.13. (9) Show that a congruence ax b (mod n) is solvable if and only if gcd(a, n) divides b. (10) Explain the contradiction at the end of the proof of A.21. In other words, what is contradicted if you have elements a 0, b 0, and c in a ring such that ac = 1 and ab = 0? (11) Prove Theorem A.10.

### MODULAR ARITHMETIC. a smallest member. It is equivalent to the Principle of Mathematical Induction.

MODULAR ARITHMETIC 1 Working With Integers The usual arithmetic operations of addition, subtraction and multiplication can be performed on integers, and the result is always another integer Division, on

### CHAPTER 5. Number Theory. 1. Integers and Division. Discussion

CHAPTER 5 Number Theory 1. Integers and Division 1.1. Divisibility. Definition 1.1.1. Given two integers a and b we say a divides b if there is an integer c such that b = ac. If a divides b, we write a

### CHAPTER 5: MODULAR ARITHMETIC

CHAPTER 5: MODULAR ARITHMETIC LECTURE NOTES FOR MATH 378 (CSUSM, SPRING 2009). WAYNE AITKEN 1. Introduction In this chapter we will consider congruence modulo m, and explore the associated arithmetic called

### Practice Problems for First Test

Mathematicians have tried in vain to this day to discover some order in the sequence of prime numbers, and we have reason to believe that it is a mystery into which the human mind will never penetrate.-

### Homework 5 Solutions

Homework 5 Solutions 4.2: 2: a. 321 = 256 + 64 + 1 = (01000001) 2 b. 1023 = 512 + 256 + 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = (1111111111) 2. Note that this is 1 less than the next power of 2, 1024, which

### 3. Applications of Number Theory

3. APPLICATIONS OF NUMBER THEORY 163 3. Applications of Number Theory 3.1. Representation of Integers. Theorem 3.1.1. Given an integer b > 1, every positive integer n can be expresses uniquely as n = a

### 12 Greatest Common Divisors. The Euclidean Algorithm

Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan 12 Greatest Common Divisors. The Euclidean Algorithm As mentioned at the end of the previous section, we would like to

### Algebraic Systems, Fall 2013, September 1, 2013 Edition. Todd Cochrane

Algebraic Systems, Fall 2013, September 1, 2013 Edition Todd Cochrane Contents Notation 5 Chapter 0. Axioms for the set of Integers Z. 7 Chapter 1. Algebraic Properties of the Integers 9 1.1. Background

### Kevin James. MTHSC 412 Section 2.4 Prime Factors and Greatest Comm

MTHSC 412 Section 2.4 Prime Factors and Greatest Common Divisor Greatest Common Divisor Definition Suppose that a, b Z. Then we say that d Z is a greatest common divisor (gcd) of a and b if the following

### Mathematics of Cryptography Modular Arithmetic, Congruence, and Matrices. A Biswas, IT, BESU SHIBPUR

Mathematics of Cryptography Modular Arithmetic, Congruence, and Matrices A Biswas, IT, BESU SHIBPUR McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Set of Integers The set of integers, denoted by Z,

### Further linear algebra. Chapter I. Integers.

Further linear algebra. Chapter I. Integers. Andrei Yafaev Number theory is the theory of Z = {0, ±1, ±2,...}. 1 Euclid s algorithm, Bézout s identity and the greatest common divisor. We say that a Z divides

### Course notes on Number Theory

Course notes on Number Theory In Number Theory, we make the decision to work entirely with whole numbers. There are many reasons for this besides just mathematical interest, not the least of which is that

### Chapter 6. Number Theory. 6.1 The Division Algorithm

Chapter 6 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,

### 1 Die hard, once and for all

ENGG 2440A: Discrete Mathematics for Engineers Lecture 4 The Chinese University of Hong Kong, Fall 2014 6 and 7 October 2014 Number theory is the branch of mathematics that studies properties of the integers.

### Mathematics of Cryptography

CHAPTER 2 Mathematics of Cryptography Part I: Modular Arithmetic, Congruence, and Matrices Objectives This chapter is intended to prepare the reader for the next few chapters in cryptography. The chapter

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

### 4. Number Theory (Part 2)

4. Number Theory (Part 2) Terence Sim Mathematics is the queen of the sciences and number theory is the queen of mathematics. Reading Sections 4.8, 5.2 5.4 of Epp. Carl Friedrich Gauss, 1777 1855 4.3.

### 8 Divisibility and prime numbers

8 Divisibility and prime numbers 8.1 Divisibility In this short section we extend the concept of a multiple from the natural numbers to the integers. We also summarize several other terms that express

### It is time to prove some theorems. There are various strategies for doing

CHAPTER 4 Direct Proof It is time to prove some theorems. There are various strategies for doing this; we now examine the most straightforward approach, a technique called direct proof. As we begin, it

### Continued Fractions and the Euclidean Algorithm

Continued Fractions and the Euclidean Algorithm Lecture notes prepared for MATH 326, Spring 997 Department of Mathematics and Statistics University at Albany William F Hammond Table of Contents Introduction

### Definition: Group A group is a set G together with a binary operation on G, satisfying the following axioms: a (b c) = (a b) c.

Algebraic Structures Abstract algebra is the study of algebraic structures. Such a structure consists of a set together with one or more binary operations, which are required to satisfy certain axioms.

### Congruences. Robert Friedman

Congruences Robert Friedman Definition of congruence mod n Congruences are a very handy way to work with the information of divisibility and remainders, and their use permeates number theory. Definition

### a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2.

Chapter 1 LINEAR EQUATIONS 1.1 Introduction to linear equations A linear equation in n unknowns x 1, x,, x n is an equation of the form a 1 x 1 + a x + + a n x n = b, where a 1, a,..., a n, b are given

### Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 5

CS 70 Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 5 Modular Arithmetic One way to think of modular arithmetic is that it limits numbers to a predefined range {0,1,...,N

### Handout NUMBER THEORY

Handout of NUMBER THEORY by Kus Prihantoso Krisnawan MATHEMATICS DEPARTMENT FACULTY OF MATHEMATICS AND NATURAL SCIENCES YOGYAKARTA STATE UNIVERSITY 2012 Contents Contents i 1 Some Preliminary Considerations

### MATH10040 Chapter 2: Prime and relatively prime numbers

MATH10040 Chapter 2: Prime and relatively prime numbers Recall the basic definition: 1. Prime numbers Definition 1.1. Recall that a positive integer is said to be prime if it has precisely two positive

### GREATEST COMMON DIVISOR

DEFINITION: GREATEST COMMON DIVISOR The greatest common divisor (gcd) of a and b, denoted by (a, b), is the largest common divisor of integers a and b. THEOREM: If a and b are nonzero integers, then their

### Discrete Mathematics, Chapter 4: Number Theory and Cryptography

Discrete Mathematics, Chapter 4: Number Theory and Cryptography Richard Mayr University of Edinburgh, UK Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 4 1 / 35 Outline 1 Divisibility

### Algebra for Digital Communication

EPFL - Section de Mathématiques Algebra for Digital Communication Fall semester 2008 Solutions for exercise sheet 1 Exercise 1. i) We will do a proof by contradiction. Suppose 2 a 2 but 2 a. We will obtain

### So let us begin our quest to find the holy grail of real analysis.

1 Section 5.2 The Complete Ordered Field: Purpose of Section We present an axiomatic description of the real numbers as a complete ordered field. The axioms which describe the arithmetic of the real numbers

### U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009. Notes on Algebra

U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009 Notes on Algebra These notes contain as little theory as possible, and most results are stated without proof. Any introductory

### CONTENTS 1. Peter Kahn. Spring 2007

CONTENTS 1 MATH 304: CONSTRUCTING THE REAL NUMBERS Peter Kahn Spring 2007 Contents 2 The Integers 1 2.1 The basic construction.......................... 1 2.2 Adding integers..............................

### 2 The Euclidean algorithm

2 The Euclidean algorithm Do you understand the number 5? 6? 7? At some point our level of comfort with individual numbers goes down as the numbers get large For some it may be at 43, for others, 4 In

### Today s Topics. Primes & Greatest Common Divisors

Today s Topics Primes & Greatest Common Divisors Prime representations Important theorems about primality Greatest Common Divisors Least Common Multiples Euclid s algorithm Once and for all, what are prime

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

### Section 4.2: The Division Algorithm and Greatest Common Divisors

Section 4.2: The Division Algorithm and Greatest Common Divisors The Division Algorithm The Division Algorithm is merely long division restated as an equation. For example, the division 29 r. 20 32 948

### Solutions to Homework Set 3 (Solutions to Homework Problems from Chapter 2)

Solutions to Homework Set 3 (Solutions to Homework Problems from Chapter 2) Problems from 21 211 Prove that a b (mod n) if and only if a and b leave the same remainder when divided by n Proof Suppose a

### Number Theory Hungarian Style. Cameron Byerley s interpretation of Csaba Szabó s lectures

Number Theory Hungarian Style Cameron Byerley s interpretation of Csaba Szabó s lectures August 20, 2005 2 0.1 introduction Number theory is a beautiful subject and even cooler when you learn about it

### = 2 + 1 2 2 = 3 4, Now assume that P (k) is true for some fixed k 2. This means that

Instructions. Answer each of the questions on your own paper, and be sure to show your work so that partial credit can be adequately assessed. Credit will not be given for answers (even correct ones) without

### Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.

Elementary Number Theory and Methods of Proof CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.edu/~cse215 1 Number theory Properties: 2 Properties of integers (whole

### Basic Properties of Rings

Basic Properties of Rings A ring is an algebraic structure with an addition operation and a multiplication operation. These operations are required to satisfy many (but not all!) familiar properties. Some

### Lecture 1: Elementary Number Theory

Lecture 1: Elementary Number Theory The integers are the simplest and most fundamental objects in discrete mathematics. All calculations by computers are based on the arithmetical operations with integers

### Homework until Test #2

MATH31: Number Theory Homework until Test # Philipp BRAUN Section 3.1 page 43, 1. It has been conjectured that there are infinitely many primes of the form n. Exhibit five such primes. Solution. Five such

### MTH 382 Number Theory Spring 2003 Practice Problems for the Final

MTH 382 Number Theory Spring 2003 Practice Problems for the Final (1) Find the quotient and remainder in the Division Algorithm, (a) with divisor 16 and dividend 95, (b) with divisor 16 and dividend -95,

### ABSTRACT ALGEBRA: A STUDY GUIDE FOR BEGINNERS

ABSTRACT ALGEBRA: A STUDY GUIDE FOR BEGINNERS John A. Beachy Northern Illinois University 2014 ii J.A.Beachy This is a supplement to Abstract Algebra, Third Edition by John A. Beachy and William D. Blair

### I. GROUPS: BASIC DEFINITIONS AND EXAMPLES

I GROUPS: BASIC DEFINITIONS AND EXAMPLES Definition 1: An operation on a set G is a function : G G G Definition 2: A group is a set G which is equipped with an operation and a special element e G, called

### Definition 1 Let a and b be positive integers. A linear combination of a and b is any number n = ax + by, (1) where x and y are whole numbers.

Greatest Common Divisors and Linear Combinations Let a and b be positive integers The greatest common divisor of a and b ( gcd(a, b) ) has a close and very useful connection to things called linear combinations

### The last three chapters introduced three major proof techniques: direct,

CHAPTER 7 Proving Non-Conditional Statements The last three chapters introduced three major proof techniques: direct, contrapositive and contradiction. These three techniques are used to prove statements

### Theorem (The division theorem) Suppose that a and b are integers with b > 0. There exist unique integers q and r so that. a = bq + r and 0 r < b.

Theorem (The division theorem) Suppose that a and b are integers with b > 0. There exist unique integers q and r so that a = bq + r and 0 r < b. We re dividing a by b: q is the quotient and r is the remainder,

### a = bq + r where 0 r < b.

Lecture 5: Euclid s algorithm Introduction The fundamental arithmetic operations are addition, subtraction, multiplication and division. But there is a fifth operation which I would argue is just as fundamental

### Review for Final Exam

Review for Final Exam Note: Warning, this is probably not exhaustive and probably does contain typos (which I d like to hear about), but represents a review of most of the material covered in Chapters

### SUM OF TWO SQUARES JAHNAVI BHASKAR

SUM OF TWO SQUARES JAHNAVI BHASKAR Abstract. I will investigate which numbers can be written as the sum of two squares and in how many ways, providing enough basic number theory so even the unacquainted

### Discrete Mathematics Lecture 3 Elementary Number Theory and Methods of Proof. Harper Langston New York University

Discrete Mathematics Lecture 3 Elementary Number Theory and Methods of Proof Harper Langston New York University Proof and Counterexample Discovery and proof Even and odd numbers number n from Z is called

### Applications of Fermat s Little Theorem and Congruences

Applications of Fermat s Little Theorem and Congruences Definition: Let m be a positive integer. Then integers a and b are congruent modulo m, denoted by a b mod m, if m (a b). Example: 3 1 mod 2, 6 4

### Lecture 13 - Basic Number Theory.

Lecture 13 - Basic Number Theory. Boaz Barak March 22, 2010 Divisibility and primes Unless mentioned otherwise throughout this lecture all numbers are non-negative integers. We say that A divides B, denoted

### Stanford University Educational Program for Gifted Youth (EPGY) Number Theory. Dana Paquin, Ph.D.

Stanford University Educational Program for Gifted Youth (EPGY) Dana Paquin, Ph.D. paquin@math.stanford.edu Summer 2010 Note: These lecture notes are adapted from the following sources: 1. Ivan Niven,

### Prime Numbers. Chapter Primes and Composites

Chapter 2 Prime Numbers The term factoring or factorization refers to the process of expressing an integer as the product of two or more integers in a nontrivial way, e.g., 42 = 6 7. Prime numbers are

### Mathematics of Cryptography Part I

CHAPTER 2 Mathematics of Cryptography Part I (Solution to Odd-Numbered Problems) Review Questions 1. The set of integers is Z. It contains all integral numbers from negative infinity to positive infinity.

### ORDERS OF ELEMENTS IN A GROUP

ORDERS OF ELEMENTS IN A GROUP KEITH CONRAD 1. Introduction Let G be a group and g G. We say g has finite order if g n = e for some positive integer n. For example, 1 and i have finite order in C, since

### V55.0106 Quantitative Reasoning: Computers, Number Theory and Cryptography

V55.0106 Quantitative Reasoning: Computers, Number Theory and Cryptography 3 Congruence Congruences are an important and useful tool for the study of divisibility. As we shall see, they are also critical

### Elementary Number Theory

Elementary Number Theory A revision by Jim Hefferon, St Michael s College, 2003-Dec of notes by W. Edwin Clark, University of South Florida, 2002-Dec L A TEX source compiled on January 5, 2004 by Jim Hefferon,

### Number Theory. Proof. Suppose otherwise. Then there would be a finite number n of primes, which we may

Number Theory Divisibility and Primes Definition. If a and b are integers and there is some integer c such that a = b c, then we say that b divides a or is a factor or divisor of a and write b a. Definition

### 3. QUADRATIC CONGRUENCES

3. QUADRATIC CONGRUENCES 3.1. Quadratics Over a Finite Field We re all familiar with the quadratic equation in the context of real or complex numbers. The formula for the solutions to ax + bx + c = 0 (where

### p 2 1 (mod 6) Adding 2 to both sides gives p (mod 6)

.9. Problems P10 Try small prime numbers first. p p + 6 3 11 5 7 7 51 11 13 Among the primes in this table, only the prime 3 has the property that (p + ) is also a prime. We try to prove that no other

### NUMBER THEORY AMIN WITNO

NUMBER THEORY AMIN WITNO ii Number Theory Amin Witno Department of Basic Sciences Philadelphia University JORDAN 19392 Originally written for Math 313 students at Philadelphia University in Jordan, this

### Students in their first advanced mathematics classes are often surprised

CHAPTER 8 Proofs Involving Sets Students in their first advanced mathematics classes are often surprised by the extensive role that sets play and by the fact that most of the proofs they encounter are

### The Laws of Cryptography Cryptographers Favorite Algorithms

2 The Laws of Cryptography Cryptographers Favorite Algorithms 2.1 The Extended Euclidean Algorithm. The previous section introduced the field known as the integers mod p, denoted or. Most of the field

### Math Review. for the Quantitative Reasoning Measure of the GRE revised General Test

Math Review for the Quantitative Reasoning Measure of the GRE revised General Test www.ets.org Overview This Math Review will familiarize you with the mathematical skills and concepts that are important

### Problem Set 7 - Fall 2008 Due Tuesday, Oct. 28 at 1:00

18.781 Problem Set 7 - Fall 2008 Due Tuesday, Oct. 28 at 1:00 Throughout this assignment, f(x) always denotes a polynomial with integer coefficients. 1. (a) Show that e 32 (3) = 8, and write down a list

### Notes on Chapter 1, Section 2 Arithmetic and Divisibility

Notes on Chapter 1, Section 2 Arithmetic and Divisibility August 16, 2006 1 Arithmetic Properties of the Integers Recall that the set of integers is the set Z = f0; 1; 1; 2; 2; 3; 3; : : :g. The integers

### EULER S THEOREM. 1. Introduction Fermat s little theorem is an important property of integers to a prime modulus. a p 1 1 mod p.

EULER S THEOREM KEITH CONRAD. Introduction Fermat s little theorem is an important property of integers to a prime modulus. Theorem. (Fermat). For prime p and any a Z such that a 0 mod p, a p mod p. If

### Quotient Rings and Field Extensions

Chapter 5 Quotient Rings and Field Extensions In this chapter we describe a method for producing field extension of a given field. If F is a field, then a field extension is a field K that contains F.

### There are 8000 registered voters in Brownsville, and 3 8. of these voters live in

Politics and the political process affect everyone in some way. In local, state or national elections, registered voters make decisions about who will represent them and make choices about various ballot

### Chapter Two. Number Theory

Chapter Two Number Theory 2.1 INTRODUCTION Number theory is that area of mathematics dealing with the properties of the integers under the ordinary operations of addition, subtraction, multiplication and

### Introduction to Diophantine Equations

Introduction to Diophantine Equations Tom Davis tomrdavis@earthlink.net http://www.geometer.org/mathcircles September, 2006 Abstract In this article we will only touch on a few tiny parts of the field

### Properties of Real Numbers

16 Chapter P Prerequisites P.2 Properties of Real Numbers What you should learn: Identify and use the basic properties of real numbers Develop and use additional properties of real numbers Why you should

### MATH 289 PROBLEM SET 4: NUMBER THEORY

MATH 289 PROBLEM SET 4: NUMBER THEORY 1. The greatest common divisor If d and n are integers, then we say that d divides n if and only if there exists an integer q such that n = qd. Notice that if d divides

### Lectures on Number Theory. Lars-Åke Lindahl

Lectures on Number Theory Lars-Åke Lindahl 2002 Contents 1 Divisibility 1 2 Prime Numbers 7 3 The Linear Diophantine Equation ax+by=c 12 4 Congruences 15 5 Linear Congruences 19 6 The Chinese Remainder

### Math 319 Problem Set #3 Solution 21 February 2002

Math 319 Problem Set #3 Solution 21 February 2002 1. ( 2.1, problem 15) Find integers a 1, a 2, a 3, a 4, a 5 such that every integer x satisfies at least one of the congruences x a 1 (mod 2), x a 2 (mod

### APPLICATIONS OF THE ORDER FUNCTION

APPLICATIONS OF THE ORDER FUNCTION LECTURE NOTES: MATH 432, CSUSM, SPRING 2009. PROF. WAYNE AITKEN In this lecture we will explore several applications of order functions including formulas for GCDs and

### Breaking The Code. Ryan Lowe. Ryan Lowe is currently a Ball State senior with a double major in Computer Science and Mathematics and

Breaking The Code Ryan Lowe Ryan Lowe is currently a Ball State senior with a double major in Computer Science and Mathematics and a minor in Applied Physics. As a sophomore, he took an independent study

### Problem Set 5. AABB = 11k = (10 + 1)k = (10 + 1)XY Z = XY Z0 + XY Z XYZ0 + XYZ AABB

Problem Set 5 1. (a) Four-digit number S = aabb is a square. Find it; (hint: 11 is a factor of S) (b) If n is a sum of two square, so is 2n. (Frank) Solution: (a) Since (A + B) (A + B) = 0, and 11 0, 11

### Number Theory: A Mathemythical Approach. Student Resources. Printed Version

Number Theory: A Mathemythical Approach Student Resources Printed Version ii Contents 1 Appendix 1 2 Hints to Problems 3 Chapter 1 Hints......................................... 3 Chapter 2 Hints.........................................

### Finite Fields and Error-Correcting Codes

Lecture Notes in Mathematics Finite Fields and Error-Correcting Codes Karl-Gustav Andersson (Lund University) (version 1.013-16 September 2015) Translated from Swedish by Sigmundur Gudmundsson Contents

### Continued fractions and good approximations.

Continued fractions and good approximations We will study how to find good approximations for important real life constants A good approximation must be both accurate and easy to use For instance, our

### An Introduction to Galois Fields and Reed-Solomon Coding

An Introduction to Galois Fields and Reed-Solomon Coding James Westall James Martin School of Computing Clemson University Clemson, SC 29634-1906 October 4, 2010 1 Fields A field is a set of elements on

### 11 Ideals. 11.1 Revisiting Z

11 Ideals The presentation here is somewhat different than the text. In particular, the sections do not match up. We have seen issues with the failure of unique factorization already, e.g., Z[ 5] = O Q(

### Unique Factorization

Unique Factorization Waffle Mathcamp 2010 Throughout these notes, all rings will be assumed to be commutative. 1 Factorization in domains: definitions and examples In this class, we will study the phenomenon

### 3. Equivalence Relations. Discussion

3. EQUIVALENCE RELATIONS 33 3. Equivalence Relations 3.1. Definition of an Equivalence Relations. Definition 3.1.1. A relation R on a set A is an equivalence relation if and only if R is reflexive, symmetric,

### CS 103X: Discrete Structures Homework Assignment 3 Solutions

CS 103X: Discrete Structures Homework Assignment 3 s Exercise 1 (20 points). On well-ordering and induction: (a) Prove the induction principle from the well-ordering principle. (b) Prove the well-ordering

### 9. The Pails of Water Problem

9. The Pails of Water Problem You have a 5 and a 7 quart pail. How can you measure exactly 1 quart of water, by pouring water back and forth between the two pails? You are allowed to fill and empty each

### Test1. Due Friday, March 13, 2015.

1 Abstract Algebra Professor M. Zuker Test1. Due Friday, March 13, 2015. 1. Euclidean algorithm and related. (a) Suppose that a and b are two positive integers and that gcd(a, b) = d. Find all solutions

### INTRODUCTION TO PROOFS: HOMEWORK SOLUTIONS

INTRODUCTION TO PROOFS: HOMEWORK SOLUTIONS STEVEN HEILMAN Contents 1. Homework 1 1 2. Homework 2 6 3. Homework 3 10 4. Homework 4 16 5. Homework 5 19 6. Homework 6 21 7. Homework 7 25 8. Homework 8 28

### CHAPTER 2. Inequalities

CHAPTER 2 Inequalities In this section we add the axioms describe the behavior of inequalities (the order axioms) to the list of axioms begun in Chapter 1. A thorough mastery of this section is essential

### CHAPTER 3 Numbers and Numeral Systems

CHAPTER 3 Numbers and Numeral Systems Numbers play an important role in almost all areas of mathematics, not least in calculus. Virtually all calculus books contain a thorough description of the natural,

### 5.1 Commutative rings; Integral Domains

5.1 J.A.Beachy 1 5.1 Commutative rings; Integral Domains from A Study Guide for Beginner s by J.A.Beachy, a supplement to Abstract Algebra by Beachy / Blair 23. Let R be a commutative ring. Prove the following

### The Prime Numbers. Definition. A prime number is a positive integer with exactly two positive divisors.

The Prime Numbers Before starting our study of primes, we record the following important lemma. Recall that integers a, b are said to be relatively prime if gcd(a, b) = 1. Lemma (Euclid s Lemma). If gcd(a,

### Chapter 9. Computational Number Theory. 9.1 The basic groups Integers mod N Groups

Chapter 9 Computational Number Theory 9.1 The basic groups We let Z = {..., 2, 1,0,1,2,...} denote the set of integers. We let Z + = {1,2,...} denote the set of positive integers and N = {0,1,2,...} the