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

Similar documents
MATH 115, SUMMER 2012 LECTURE 12

Part V. Chapter 19. Congruence of integers

CSE 20 DISCRETE MATH. Winter

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?

Modular Arithmetic Instructor: Marizza Bailey Name:

Lecture Notes. Advanced Discrete Structures COT S

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. Congruences. Congruence: definitions and properties

MODULAR ARITHMETIC KEITH CONRAD

Lecture 4: Constructing the Integers, Rationals and Reals

Relations. Relations. Definition. Let A and B be sets.

STEP Support Programme. Hints and Partial Solutions for Assignment 17

CSE 20 DISCRETE MATH. Fall

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

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

MA257: INTRODUCTION TO NUMBER THEORY LECTURE NOTES

3.7 Non-linear Diophantine Equations

CSE 20 DISCRETE MATH. Winter

Modern Algebra Prof. Manindra Agrawal Department of Computer Science and Engineering Indian Institute of Technology, Kanpur

AN ALGEBRA PRIMER WITH A VIEW TOWARD CURVES OVER FINITE FIELDS

Chapter 5. Number Theory. 5.1 Base b representations

Error Correcting Codes Prof. Dr. P Vijay Kumar Department of Electrical Communication Engineering Indian Institute of Science, Bangalore

MATH 2200 Final Review

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

The next sequence of lectures in on the topic of Arithmetic Algorithms. We shall build up to an understanding of the RSA public-key cryptosystem.

* 8 Groups, with Appendix containing Rings and Fields.

Chapter 1 Review of Equations and Inequalities

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 3

1. multiplication is commutative and associative;

Grade 11/12 Math Circles Rational Points on an Elliptic Curves Dr. Carmen Bruni November 11, Lest We Forget

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

Applied Cryptography and Computer Security CSE 664 Spring 2018

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

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

Basic elements of number theory

Basic elements of number theory

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

Discrete Mathematics for CS Spring 2007 Luca Trevisan Lecture 27

Math 31 Lesson Plan. Day 5: Intro to Groups. Elizabeth Gillaspy. September 28, 2011

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

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

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

Congruences. September 16, 2006

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

Math 109 HW 9 Solutions

= 1 2x. x 2 a ) 0 (mod p n ), (x 2 + 2a + a2. x a ) 2

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

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

3.2 Solving linear congruences. v3

FERMAT S TEST KEITH CONRAD

Lecture 2. The Euclidean Algorithm and Numbers in Other Bases

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

Discrete Mathematics and Probability Theory Summer 2014 James Cook Note 5

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?

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

ABSTRACT ALGEBRA: A STUDY GUIDE FOR BEGINNERS

4. Congruence Classes

MA3H1 TOPICS IN NUMBER THEORY PART III

Chapter VI. Relations. Assumptions are the termites of relationships. Henry Winkler

MATH 361: NUMBER THEORY FOURTH LECTURE

MATH Fundamental Concepts of Algebra

Lecture 6: Finite Fields

Clock Arithmetic and Euclid s Algorithm

Factoring Algorithms Pollard s p 1 Method. This method discovers a prime factor p of an integer n whenever p 1 has only small prime factors.

ORDERS OF ELEMENTS IN A GROUP

Definitions. Notations. Injective, Surjective and Bijective. Divides. Cartesian Product. Relations. Equivalence Relations

Elementary Properties of the Integers

Adam Blank Spring 2017 CSE 311. Foundations of Computing I. * All slides are a combined effort between previous instructors of the course

Number Theory Homework.

1. Introduction to commutative rings and fields

Beautiful Mathematics

2 Elementary number theory

Lecture Notes Math 371: Algebra (Fall 2006) by Nathanael Leedom Ackerman

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

CHAPTER 1. REVIEW: NUMBERS

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

Number Theory. Modular Arithmetic

Continuing discussion of CRC s, especially looking at two-bit errors

Checkpoint Questions Due Monday, October 1 at 2:15 PM Remaining Questions Due Friday, October 5 at 2:15 PM

Chapter 2 - Relations

Mathematical Foundations of Cryptography

Elementary Number Theory. Franz Luef

Mathematics for Cryptography

Section 0. Sets and Relations

Chapter 14: Divisibility and factorization

MATH 215 Sets (S) Definition 1 A set is a collection of objects. The objects in a set X are called elements of X.

ACCESS TO SCIENCE, ENGINEERING AND AGRICULTURE: MATHEMATICS 1 MATH00030 SEMESTER /2018

Math 5330 Spring Notes Congruences

Number Theory in Problem Solving. Konrad Pilch

Scott Taylor 1. EQUIVALENCE RELATIONS. Definition 1.1. Let A be a set. An equivalence relation on A is a relation such that:

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

UMASS AMHERST MATH 300 SP 05, F. HAJIR HOMEWORK 8: (EQUIVALENCE) RELATIONS AND PARTITIONS

The Chinese Remainder Theorem

Lecture Notes Math 371: Algebra (Fall 2006) by Nathanael Leedom Ackerman

Writing proofs for MATH 51H Section 2: Set theory, proofs of existential statements, proofs of uniqueness statements, proof by cases

1 Take-home exam and final exam study guide

Polynomial analogues of Ramanujan congruences for Han s hooklength formula

Lecture 11 - Basic Number Theory.

Part IA Numbers and Sets

Transcription:

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 into primes. To make sure you don t take this for granted, consider the following example. Example 0.1. (Number system without unique factorization) Let R be the set of all numbers of the form a + b 5. It s a subset of C. In this number system, we can add and multiply and subtract, which makes it a ring (more on rings later). It contains Z. There is also a notion of primes in this ring. The usual integers 2 and 3 are prime, but there are other primes too. The number 6 has two factorizations: 6 = 2 3 = (1 + 5)(1 5), so the Fundamental Theorem of Arithmetic fails for this number system! 1. Congruences - What are They? Congruence is a relationship between two integers - it s like equality, but a little looser. Before defining congruence, let s consider an informal example. Say we re studying an integer - we ve called it x, but we don t know exactly what it is (maybe it s a potential solution to some equation or something like that). If we find out that x = 5, then there is no more to say - there is one and only one value for x. But sometimes equations can have more than one solution, and we would still like to know about them, even though in this case we can t pin them down exactly (since there are many possibilities). This is where congruence comes in handy. In such a situation, we might find, for instance, that x 5 mod 7, which we read in English as x is congruent to 5 modulo 7. This means that x can be any one of the numbers 5, 12, 19, 26, 33, 40,..., or even in the negative range: 2, 9, 16,.... In other words, x is almost equal to 5, but ambiguous up to multiples of 7. This ambiguity may seem annoying, but it s already familiar from high school: If you have to solve the equation cos x = 2/2, you will say x = π/4 or x = 7π/4, and actually π/4 or 7π/4 plus any multiple of 2π will work, too. So you ve found two basic solutions, but there are a bunch of 1

2 JAMES MCIVOR others obtained by adding or subtracting copies of 2π. Thus what you ve found is that x π/4 mod 2π or x 7π/4 mod 2π Definition 1. If a and b are two integers, and m is a positive integer 1, when we say a is congruent to b modulo m, written a b mod m, we mean that a = b + km for some integer k. An equivalent way to state this is that a and b are congruent modulo m if m divides their difference, i.e., m b a. I prefer the above definition because intuitively, if we ignore the multiples of m, then a = b. So some would say congruent mod m means equal up to multiples of m. Let s see some examples of this notion in familiar settings. Examples 1.1. (1) Even-ness and odd-ness (referred to as parity) can be expressed with congruences: an integer n is even iff it is congruent to 0 modulo 2. For n is even iff 2 divides n iff 2 divides n-0 iff n 0 mod 2. Similarly, the odd integers are exactly those which are congruent to 1 mod 2. (2) As you know, we write integers in base 10 notation, so the different digits correspond to different powers of ten. Intuitively, working mod 10 means ignoring all the multiples of 10, so if we take a number, say 38854727, we see that it is congruent to 7 modulo 10, since 38854727 = 7 + 3885472 10. Similarly, when working modulo 100, we may just omit the digits in the hundreds place and beyond: since 38854727 = 27 + 388547 100, we have 38854727 27 mod 100. 2. Properties Let s now see some properties of congruences. You should pay attention to which properties they have in common with equality, and also which properties of equality don t hold for congruence. In the following, a, b, c, d are arbitrary integers, m a positive integer. (1) (Symmetry) If a b mod m, then b a mod m. (2) (Transitivity) If a b mod m and b c mod m, then a c mod m. (3) (Reflexivity) a a mod m. (4) (Subtraction Rule) If a b mod m, then a b 0 mod m. (5) (Addition Rule) If a b mod m and c d mod m, then a + c b + d mod m. (6) (Multiplication Rule) If a b mod m and c d mod m, then ac bd mod m. (7) (Reduction of Modulus Rule) If a b mod m and d m, d > 1, then a b mod d. (8) (Scalar Multiplication Rule) If a b mod m and c > 0, then ac bc mod mc. 1 Technically, we could allow m to be negative as well, but we don t gain anything extra from doing so.

MATH 115, SUMMER 2012 LECTURE 4 THURSDAY, JUNE 21ST 3 (9) (Polynomial Substitution Rule) If a b mod m and f(x) is a polynomial with integer coefficients, then f(a) f(b) mod m The first three properties can be summarized by saying that congruence modulo m is an equivalence relation. The fourth was an observation we made above. The names of the remaining properties I just made up, but hopefully they help you remember them. Notice in (8) that the modulus m ALSO gets multiplied by c! It s also true that ac bc mod m but the statement in 8 is stronger. Let s prove (6) and (8) to give you an idea of how to work with congruences: Proof. (of (6)) If a b mod m and c d mod m, then by the definition we have a = b + km and c = d + lm for some integers k and l. What we want to show is that ac bd is a multiple of m. So let s write it out and replace a and c using the above equations: ac bd = (b + km)(d + lm) bd = dkm + blm + klm 2 = (dk + bl + klm)m, which shows that ac bd is a multiple of m, hence ac bd mod m. Proof. (of (8)) Let a b mod m and c > 0; to show ac bc mod mc, we have to show that ac bc is a multiple of mc. But we know that a b = km for some k, so multiplying this equation through by c does it. Notice that it even works for c negative - the only reason we say c > 0 in the statement is that in our definition of congruence we took the modulus m to always be positive. Since congruence is a way of talking about divisibility, it is natural to ask how it relates to the gcd. This is related to a very important point: the main reason congruence is different from equality is that you cannot always cancel something from both sides! For example, when dealing with equalities, if we know that 5x = 5y, then it follows that x = y. We can cancel any nonzero number from an equality and obtain another valid equality. This is not true for congruence! For example, but 5 2 5 4 mod 10, 2 4 mod 10. But sometimes it works... For example and here we can cancel the three and get 3 4 3 14 mod 10 4 14 mod 10, which is true. So why can we cancel the 5 and not the 3? The reason is that 5 shares a common factor with the modulus 10, which can sometimes cause a problem. What we can say about cancelling terms from a congruence is the following: Theorem 1. If ax ay mod m and (a, m) = 1, then we can cancel the a and get x y mod m. More generally, ax ay if and only if x y mod (m/(a, m)).

4 JAMES MCIVOR Informal version: If a is relatively prime to the modulus, we may divide both sides by a. If not, we have to divide the modulus m by the gcd of a and m in order to cancel the a. Let s see how this latter statement fixes our problem with 5s above. From the congruence 5 2 5 4 mod 10, we cannot conclude that 2 4 mod 10, but we get a valid congruence if we divide the modulus by the gcd of 5 and 10, namely 5, giving 2 4 mod 2, which is true. Proof - see textbook. Another useful and easy fact is the following: Lemma 1. If two integers a and b are congruent mod m, then (a, m) = (b, m). You should be able to prove this yourself, using the definition of congruence and properties of the gcd. If you get stuck it s in the book. 3. Residue Systems You should think of the integers as the number line - just a bunch of dots lined up, one for each integer. You should think of congruence modulo m as collapsing the number line: we treat all the numbers congruent to zero as one point, all those congruent to one as another point, all those congruent to two as another, and so on, all the way up to m 1. For when we get to m, it s not there - we already collapsed it into the same point as 0, since 0 m mod m.......... 3 2 1 0 1 2 3 4 5... In the diagram above, all the hollow circles are congruent to 1 mod 3 - we identify them all. The collapsed number line mod 3 looks simply like this: 0 1 2 This is one reason why congruence is great: it reduces the study of integers (an infinite set) to the study of a finite set. Of course, we lose some information when we do so, namely, when working modulo 3 we can t tell 5 apart from 8 or from -4, etc., since they all get collapsed together. Let s try to make this collapsing a bit more rigorous. We mentioned above, under Properties, that congruence modulo m is an equivalence relation on the set Z of integers. This means it divides up the integers into disjoint subsets, whose union is all of Z. These subsets are called congruence classes, or residue classes modulo m. For example, working mod 3 as above, there are three congruence classes: {... 3, 0, 3, 6,...} {..., 2, 1, 4, 7,...} {..., 1, 2, 5, 8,...} Clearly these three are disjoint subsets whose union is all 2 of Z. Now rather than write them out like this every time, it is convenient to just work with a representative of each congruence class. Usually we would just use 0,1,2, but in fact we may choose one from each class arbitrarily. The set obtained by picking exactly 2 If S is any set, a collection of disjoint subsets S whose union is S is called a partition of S.

MATH 115, SUMMER 2012 LECTURE 4 THURSDAY, JUNE 21ST 5 one representative for each congruence class is called a complete residue system modulo 3. The same goes for other moduli besides 3. So {0, 1, 2} is a complete residue system, and so are {8, 6, 10} and {n, n+1, n+2}, where n could be any integer. Notice that once we have a complete residue system, ifwe take any arbitrary integer, it will be congruent to exactly one of the representatives in the system, because every integer falls into exactly one congruence class.