Proofs. Methods of Proof Divisibility Floor and Ceiling Contradiction & Contrapositive Euclidean Algorithm. Reading (Epp s textbook)

Similar documents
Ch 4.2 Divisibility Properties

Introduction to Number Theory

1. (16 points) Circle T if the corresponding statement is True or F if it is False.

The set of integers will be denoted by Z = {, -3, -2, -1, 0, 1, 2, 3, 4, }

INTEGERS. In this section we aim to show the following: Goal. Every natural number can be written uniquely as a product of primes.

3 The fundamentals: Algorithms, the integers, and matrices

Applied Cryptography and Computer Security CSE 664 Spring 2017

Introduction to Sets and Logic (MATH 1190)

cse547, math547 DISCRETE MATHEMATICS Professor Anita Wasilewska

Chapter 2. Divisibility. 2.1 Common Divisors

Integers and Division

Math.3336: Discrete Mathematics. Primes and Greatest Common Divisors

4 Number Theory and Cryptography

Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Spring 2006

Mat Week 8. Week 8. gcd() Mat Bases. Integers & Computers. Linear Combos. Week 8. Induction Proofs. Fall 2013

Direct Proof MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Direct Proof Fall / 24

Student Responsibilities Week 8. Mat Section 3.6 Integers and Algorithms. Algorithm to Find gcd()

4 Powers of an Element; Cyclic Groups

PRACTICE PROBLEMS: SET 1

Sets. We discuss an informal (naive) set theory as needed in Computer Science. It was introduced by G. Cantor in the second half of the nineteenth

M381 Number Theory 2004 Page 1

CISC-102 Fall 2017 Week 6

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

Exercises Exercises. 2. Determine whether each of these integers is prime. a) 21. b) 29. c) 71. d) 97. e) 111. f) 143. a) 19. b) 27. c) 93.

Name CMSC203 Fall2008 Exam 2 Solution Key Show All Work!!! Page (16 points) Circle T if the corresponding statement is True or F if it is False.

not to be republished NCERT REAL NUMBERS CHAPTER 1 (A) Main Concepts and Results

Mathematics for Computer Science Exercises for Week 10

Course: CS1050c (Fall '03) Homework2 Solutions Instructor: Prasad Tetali TAs: Kim, Woo Young: Deeparnab Chakrabarty:

5: The Integers (An introduction to Number Theory)

Introduction to Number Theory. The study of the integers

Chapter 5. Number Theory. 5.1 Base b representations

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

Math 110 FOUNDATIONS OF THE REAL NUMBER SYSTEM FOR ELEMENTARY AND MIDDLE SCHOOL TEACHERS

NOTES ON SIMPLE NUMBER THEORY

2 Elementary number theory

Lecture 3. Logic Predicates and Quantified Statements Statements with Multiple Quantifiers. Introduction to Proofs. Reading (Epp s textbook)

Euclidean Domains. Kevin James

Discrete Structures Lecture Primes and Greatest Common Divisor

Number Theory Proof Portfolio

MATH 271 Summer 2016 Practice problem solutions Week 1

Number Theory and Divisibility

1. Given the public RSA encryption key (e, n) = (5, 35), find the corresponding decryption key (d, n).

8. Given a rational number r, prove that there exist coprime integers p and q, with q 0, so that r = p q. . For all n N, f n = an b n 2

4. Number Theory (Part 2)

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

ECE 646 Lecture 5. Mathematical Background: Modular Arithmetic

The Euclidean Algorithm and Multiplicative Inverses

(e) Commutativity: a b = b a. (f) Distributivity of times over plus: a (b + c) = a b + a c and (b + c) a = b a + c a.

Module 1. Integers, Induction, and Recurrences

Basic Proof Examples

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

Chapter 1 A Survey of Divisibility 14

REAL NUMBERS. Any positive integer a can be divided by another positive integer b in such a way that it leaves a remainder r that is smaller than b.

Final Exam Review. 2. Let A = {, { }}. What is the cardinality of A? Is

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

Discrete Mathematics GCD, LCM, RSA Algorithm

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

Chapter 3 Basic Number Theory

18 Divisibility. and 0 r < d. Lemma Let n,d Z with d 0. If n = qd+r = q d+r with 0 r,r < d, then q = q and r = r.

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

MATH 145 Algebra, Solutions to Assignment 4

SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION

1 Predicates and Quantifiers

MATH 2200 Final Review

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

COT 3100 Applications of Discrete Structures Dr. Michael P. Frank

PUTNAM TRAINING NUMBER THEORY. Exercises 1. Show that the sum of two consecutive primes is never twice a prime.

University of Ottawa CSI 2101 Midterm Test Instructor: Lucia Moura. February 9, :30 pm Duration: 1:50 hs. Closed book, no calculators

NOTES ON INTEGERS. 1. Integers

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

Contribution of Problems

Number Theory Marathon. Mario Ynocente Castro, National University of Engineering, Peru

Chapter 3: The Euclidean Algorithm and Diophantine. Math 138 Burger California State University, Fresno

Introduction to Information Security

The following is an informal description of Euclid s algorithm for finding the greatest common divisor of a pair of numbers:

Number Theory Marathon. Mario Ynocente Castro, National University of Engineering, Peru

USA Mathematical Talent Search Round 3 Solutions Year 20 Academic Year

CS250: Discrete Math for Computer Science

Chapter 5: The Integers

Chapter 1 : The language of mathematics.

Chapter 14: Divisibility and factorization

Olympiad Number Theory Through Challenging Problems

C-N Math 207 Discrete Math

C-N Math 207 Discrete Math

2. THE EUCLIDEAN ALGORITHM More ring essentials

2k n. k=0. 3x 2 7 (mod 11) 5 4x 1 (mod 9) 2 r r +1 = r (2 r )

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

CSE 311: Foundations of Computing. Lecture 12: Two s Complement, Primes, GCD

CSE 1400 Applied Discrete Mathematics Proofs

Chapter 5.1: Induction

EUCLID S ALGORITHM AND THE FUNDAMENTAL THEOREM OF ARITHMETIC after N. Vasiliev and V. Gutenmacher (Kvant, 1972)

Mathematical Induction

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

DISCRETE MATH: FINAL REVIEW

Remainders. We learned how to multiply and divide in elementary

PROBLEMS ON CONGRUENCES AND DIVISIBILITY

1. Consider the conditional E = p q r. Use de Morgan s laws to write simplified versions of the following : The negation of E : 5 points

Writing Assignment 2 Student Sample Questions

WORKSHEET MATH 215, FALL 15, WHYTE. We begin our course with the natural numbers:

Chapter 3: Polynomial and Rational Functions

Transcription:

Proofs Methods of Proof Divisibility Floor and Ceiling Contradiction & Contrapositive Euclidean Algorithm Reading (Epp s textbook) 4.3 4.8 1

Divisibility The notation d n is read d divides n. Symbolically, if n and d are integers and d 0: d n an integer k such that n = dk. When d divides n we say that d is a factor of n and that n is a multiple of d. We write dd nn when d does not divide n. For all integers n and d, dd nn nn dd is not an integer. 2

Divisibility Theorems For integers a, b, and c it is true that If a b and a c, then a (b + c) Example: 3 6 and 3 9, so 3 15. If a b, then a bc for all integers c Example: 5 10, so 5 20, 5 30, 5 40, If a b and b c, then a c (Transitivity) Example: 4 8 and 8 24, so 4 24. 3

Primes and Divisibility A positive integer p greater than 1 is called prime if the only positive factors of p are 1 and p. A positive integer that is greater than 1 and is not prime is called composite. Any integer n > 1 is divisible by a prime number. The fundamental theorem of arithmetic: Every positive integer can be written uniquely as a product of primes (p1, p2,..., pk), and positive integers e1, e2,..., ek such that: nn = ppp eee ppp eee ppp eee pppp eeee 4

Fundamental Theorem of Arithmetic: Examples 75 = 3 5 5 = 3 5 2 100 = 2 2 5 5 = 2 2 5 2 15 = 3 5 33 = 3 11 12 = 2 2 3 = 2 2 3 28 = 2 2 7 = 2 2 7 512 = 2 2 2 2 2 2 2 2 2 = 2 9 5

Quotient Remainder Theorem Given any integer n and positive integer d, there exist unique integers q and r such that: In the above equation, d is called the divisor, n is called the dividend, q is called the quotient, and r is called the remainder. n = dq + r and 0 r < d. Note that the remainder cannot be negative! Examples where d = 5 17 = 5 x 3 + 2. -13 = 5 x (-3) + 2. 6

div, mod and Parity property Symbolically, if n and d are integers and d > 0, then n div d = q and n mod d = r n = dq + r where q and r are integers and 0 r < d. Thus n = d (n div d) + n mod d, and so n mod d = n d (n div d). By the quotient-remainder theorem (with d = 2), there exist unique integers q and r such that n = 2q + r and 0 r < 2. n = 2q + 0 (even) or n = 2q + 1 (odd). Any two consecutive integers have opposite parity. 7

Proof by Division into Cases To prove a statement of the form If A1 or A2 or... or An, then C, prove all of the following: If A1, then C, If A2, then C,... If An, then C. This process shows that C is true regardless of which of A1, A2,..., An happens to be the case. 8

Floor and Ceiling Given any real number x, the floor of x, denoted xx, is defined as follows: xx = that unique integer n such that n x < n + 1. Given any real number x, the ceiling of x, denoted xx, is defined as follows: xx = that unique integer n such that n 1 < x n. 9

Proving/Disproving a property of floor Is the following statement true or false? xx, yy RR, xx + yy = xx + yy Counterexample Is the following statement true or false? xx RR aaaaaa mm ZZ, xx + mm = xx + mm. Let n = xx and direct proof 10

Proof by Contradiction 1. Suppose the statement to be proved is false. That is, suppose that the negation of the statement is true. 2. Show that this supposition leads logically to a contradiction. 3. Conclude that the statement to be proved is true. Theorem There is no integer that is both even and odd. Proof by Contradiction: 1) Suppose not. Assume that there is at least one integer n that is both even and odd. 2) By definition: n = 2b + 1 and n = 2a, for some integers a and b. Then 2b + 1 = 2a 1 = 2a 2b (a b) = 1/2. (Contradiction?) 3) The supposition is false and, hence, the theorem is true. 11

Proof by Contraposition Express the statement to be proved in the form x in D, if P(x) then Q(x). Rewrite this statement in the contrapositive form x in D, if Q(x) is false then P(x) is false. Prove the contrapositive by a direct proof. a. Suppose x is a (particular but arbitrarily chosen) element of D such that Q(x) is false. b. Show that P(x) is false. 12

Relation between Contradiction & Contraposition Express the statement to be proved in the form x in D, if P(x) then Q(x). Suppose x is arbitrary element of D such that ~Q(x). Sequence of steps ~P(x) Proof by Contraposition Suppose x in D such that P(x) and ~Q(x). Same sequence of steps Proof by Contradiction Contradiction: P(x) and ~P(x) 13

Example For all integers n, if nn 2 is even then n is even. Proof by Contraposition: Suppose n is any odd integer. By definition of odd n = 2k + 1 for some integer k. nn 2 = (2kk + 1) 2 = 4kk 2 + 4kk + 1 = 2 2kk 2 + 2kk + 1. But 2kk 2 + 2kk is an integer because products and sums of integers are integers. So nn 2 = 2 (an integer) + 1, and thus, by definition of odd, nn 2 is odd. Proof by Contradiction: Suppose not. That is, suppose there is an integer n such that nn 2 is even and n is not even. Hence, n is odd, and thus, by definition n = 2k + 1 for some integer k. (Same sequence of steps) 14

Greatest Common Divisors Let a and b be integers, not both zero. The largest integer d such that d a and d b is called the greatest common divisor of a and b. The greatest common divisor of a and b is denoted by gcd(a, b). Example 1: What is gcd(48, 72)? The positive common divisors of 48 and 72 are 1, 2, 3, 4, 6, 8, 12, 16, and 24, so gcd(48, 72) = 24. Example 2: What is gcd(19, 72)? The only positive common divisor of 19 and 72 is 1, so gcd(19, 72) = 1. 15

Greatest Common Divisors Theorem of arithmetic: x = p 1a 1 p 2a 2 p na n, y = p 1b 1 p 2b 2 p nb n, where p 1 < p 2 < < p n are primes and a i, b i N for 1 i n gcd(x, y) = p 1 min(a 1, b 1 ) p 2 min(a 2, b 2 ) p n min(a n, b n ) Example: a = 60 = 2 2 3 1 5 1 b = 54 = 2 1 3 3 5 0 gcd(a, b) = 2 1 3 1 5 0 = 6 16

Least Common Multiples The least common multiple of the positive integers a and b is the smallest positive integer that is divisible by both a and b. We denote the least common multiple of a and b by lcm(a, b). Examples: lcm(3, 7) = 21 lcm(4, 6) = 12 lcm(5, 10) = 10 17

Theorem of arithmetic: Least Common Multiples a = p 1a 1 p 2a 2 p na n, b = p 1b 1 p 2b 2 p nb n, where p 1 < p 2 < < p n are primes and a i, b i N for 1 i n lcm(a, b) = p 1 max(a 1, b 1 ) p 2 max(a 2, b 2 ) p n max(a n, b n ) Example: a = 60 = 2 2 3 1 5 1 b = 54 = 2 1 3 3 5 0 lcm(a, b) = 2 2 3 3 5 1 = 4 x 27 x 5 = 540 18

GCD and LCM a = 60 = 2 2 3 1 5 1 b = 54 = 2 1 3 3 5 0 gcd(a, b) = 2 1 3 1 5 0 = 6 lcm(a, b) = 2 2 3 3 5 1 = 540 Theorem: a b = gcd(a,b) lcm(a,b) 19

The Euclidean Algorithm Lemma: If a and b are any integers not both zero, and if q and r are any integers such that a = bq + r, then gcd(a, b) = gcd(b, r ). The Euclidean Algorithm finds the greatest common divisor of two integers a and b. 1. Let A and B be integers with A > B 0. 2. Repeatedly apply the Lemma since the pair (B, r) is smaller than (A, B) until r = 0. 20

The Euclidean Algorithm For example, if we want to find gcd(287, 91), we divide 287 by 91: 287 = 91 3 + 14 Apply the Lemma, gcd(287, 91) = gcd(91, 14). In the next step, we divide 91 by 14: 91 = 14 6 + 7 This means that gcd(91,14) = gcd(14, 7). So we divide 14 by 7: 14 = 7 2 + 0 We find that 7 14, and thus gcd(14, 7) = 7. Therefore, gcd(287, 91) = 7. 21

The Euclidean Algorithm In pseu-docode, the algorithm can be implemented as follows: procedure gcd(a, b: positive integers) x := a y := b while y 0 begin r := x mod y x := y y := r end {x is gcd(a, b)} 22