This section demonstrates some different techniques of proving some general statements.

Similar documents
WOLLONGONG COLLEGE AUSTRALIA. Diploma in Information Technology

Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University

CS 103X: Discrete Structures Homework Assignment 3 Solutions

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

MATHEMATICAL INDUCTION. Mathematical Induction. This is a powerful method to prove properties of positive integers.

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

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

15 Prime and Composite Numbers

8 Divisibility and prime numbers

Homework until Test #2

Today s Topics. Primes & Greatest Common Divisors

WRITING PROOFS. Christopher Heil Georgia Institute of Technology

3. Mathematical Induction

5544 = = = Now we have to find a divisor of 693. We can try 3, and 693 = 3 231,and we keep dividing by 3 to get: 1

Handout #1: Mathematical Reasoning

Chapter 11 Number Theory

8 Primes and Modular Arithmetic

GCDs and Relatively Prime Numbers! CSCI 2824, Fall 2014!

Grade 6 Math Circles March 10/11, 2015 Prime Time Solutions

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

Quotient Rings and Field Extensions

6.2 Permutations continued

Prime Factorization 0.1. Overcoming Math Anxiety

MATH10040 Chapter 2: Prime and relatively prime numbers

CONTINUED FRACTIONS AND PELL S EQUATION. Contents 1. Continued Fractions 1 2. Solution to Pell s Equation 9 References 12

Tests for Divisibility, Theorems for Divisibility, the Prime Factor Test

Mathematical Induction

ALGEBRAIC APPROACH TO COMPOSITE INTEGER FACTORIZATION

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES

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

Discrete Mathematics, Chapter 4: Number Theory and Cryptography

Section 4.2: The Division Algorithm and Greatest Common Divisors

Mathematical Induction. Mary Barnes Sue Gordon

Factoring Whole Numbers

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

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

DIVISIBILITY AND GREATEST COMMON DIVISORS

The Euclidean Algorithm

Math 319 Problem Set #3 Solution 21 February 2002

k, then n = p2α 1 1 pα k

Session 6 Number Theory

Basic Proof Techniques

Math 3000 Section 003 Intro to Abstract Math Homework 2

Full and Complete Binary Trees

def: An axiom is a statement that is assumed to be true, or in the case of a mathematical system, is used to specify the system.

Mathematical Induction. Lecture 10-11

MATH 289 PROBLEM SET 4: NUMBER THEORY

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

Math Circle Beginners Group October 18, 2015

Elementary Number Theory

Clock Arithmetic and Modular Systems Clock Arithmetic The introduction to Chapter 4 described a mathematical system

Cartesian Products and Relations

SUBGROUPS OF CYCLIC GROUPS. 1. Introduction In a group G, we denote the (cyclic) group of powers of some g G by

Cubes and Cube Roots

Lemma 5.2. Let S be a set. (1) Let f and g be two permutations of S. Then the composition of f and g is a permutation of S.

An Introductory Course in Elementary Number Theory. Wissam Raji

RSA and Primality Testing

FACTORS, PRIME NUMBERS, H.C.F. AND L.C.M.

SECTION 10-2 Mathematical Induction

1. Give the 16 bit signed (twos complement) representation of the following decimal numbers, and convert to hexadecimal:

Math Workshop October 2010 Fractions and Repeating Decimals

Solutions for Practice problems on proofs

Properties of Real Numbers

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

Chapter 4, Arithmetic in F [x] Polynomial arithmetic and the division algorithm.

Handout NUMBER THEORY

Session 7 Fractions and Decimals

Page 331, 38.4 Suppose a is a positive integer and p is a prime. Prove that p a if and only if the prime factorization of a contains p.

Theorem3.1.1 Thedivisionalgorithm;theorem2.2.1insection2.2 If m, n Z and n is a positive

Chapter 4. Polynomial and Rational Functions. 4.1 Polynomial Functions and Their Graphs

An Introduction to Number Theory Prime Numbers and Their Applications.

11 Ideals Revisiting Z

MATH 22. THE FUNDAMENTAL THEOREM of ARITHMETIC. Lecture R: 10/30/2003

Grade 7 & 8 Math Circles October 19, 2011 Prime Numbers

Lecture 13 - Basic Number Theory.

The Fundamental Theorem of Arithmetic

SUM OF TWO SQUARES JAHNAVI BHASKAR

1. Prove that the empty set is a subset of every set.

Matrix Algebra. Some Basic Matrix Laws. Before reading the text or the following notes glance at the following list of basic matrix algebra laws.

CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs

Real Roots of Univariate Polynomials with Real Coefficients

Notes on Factoring. MA 206 Kurt Bryan

Grade 7/8 Math Circles Fall 2012 Factors and Primes

Introduction. Appendix D Mathematical Induction D1

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics

Stupid Divisibility Tricks

CONTENTS 1. Peter Kahn. Spring 2007

Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan

3 Some Integer Functions

Answer Key for California State Standards: Algebra I

Continued Fractions and the Euclidean Algorithm

of Nebraska - Lincoln

Congruent Number Problem

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

s = s = s =

Lesson 4. Factors and Multiples. Objectives

SOLUTIONS FOR PROBLEM SET 2

Previously, you learned the names of the parts of a multiplication problem. 1. a. 6 2 = 12 6 and 2 are the. b. 12 is the

God created the integers and the rest is the work of man. (Leopold Kronecker, in an after-dinner speech at a conference, Berlin, 1886)

Primes in Sequences. Lee 1. By: Jae Young Lee. Project for MA 341 (Number Theory) Boston University Summer Term I 2009 Instructor: Kalin Kostadinov

Transcription:

Section 4. Number Theory 4.. Introduction This section demonstrates some different techniques of proving some general statements. Examples: Prove that the sum of any two odd numbers is even. Firstly you should check a few examples to confirm (for yourself) that the statement is true. 3 + 5 = 8; 9 + 7 = 6; 7 + = 8 Write down what you are asked to prove in mathematical language (if it is not already). a, b, a, b are odd a + b is even Next, write down everything you know [related to the problem] and what they mean. Note that this also includes what you can assume such as Claim(k) in Mathematical Induction. a is odd k, a = 2k + () b is odd l, b = 2l + (2) WUCT2 Numbers 74

Write down what you are trying to prove, and what that means (i.e. what you have to get to ). Prove that a + b is even, that is s, a + b = 2s What you do at this point varies from proof to proof. Whenever you have an equality, it is often best to start with the LHS and work to the RHS. LHS = a + b = = 2 ( 2k + ) + ( 2l + ) = 2l + 2k + 2 ( l + k + ) = 2s s = RHS a + b is even by (), (2) Distributivity = l + k + WUCT2 Numbers 75

Prove that 2 is the only even prime. Clearly, 2 is an even number and a prime number. To prove that 2 is the only even prime requires a proof by contradiction. We must suppose the opposite of what we are proving, then follow the logical arguments to arrive at a contradictory statement. Suppose there exists another even prime, n, such that n > 2. Then, k, n = 2k. Now, 2 > 0 and 2. Also, k > 0 (as n > 2) and k. [If k were equal to, then n = 2. However, we know that n > 2.] Therefore, we have positive numbers 2 and k where and k, 2. n = 2k Thus, by definition, n is composite. This is a contradiction, as we said n is prime. Therefore, there does not exist an even prime n such that n > 2, and so 2 is the only even prime. WUCT2 Numbers 76

Exercise: Determine if the following statements are true or false. In each case prove your answer n, n is prime n is odd a, b, a = b a = b 2 2 Note: You MUST give a counterexample. A general disproof doesn t work as the values a = b = 0 are a counterexample to the disproof. WUCT2 Numbers 77

4.2. Divisibility 4.2.. Definition: Divisibility If n and d are integers and d 0, then n is divisible by d if and only if n = d k for some k. We write d n and say that d is a divisor of n. Alternative expressions include: d is a factor of n. d divides n. n is a multiple of d. n is divisible by d. When n is not divisible by d we write Exercise: d / n Write the definition of divisibility using logic notation. WUCT2 Numbers 78

Examples: Is 6 a divisor of 32? Yes. 32 = 6 ( 2), 2. If l and l 0, does l 0? Yes. 0 = l 0, 0. Find all values of a such that a. We need to show k, = ak a =. k Need k = ± giving a = = ±. k ± What is the relationship between a and b if a b and b a, for a, b? b a = bl = b k ak = bl kl = ( k = l = ) ( k = l = ) ( k = l = ) ( a = b) ( k = l = ) ( a = b) a = ± b a = b k = kl WUCT2 Numbers 79

Exercises: If a, b, is 3 a + 3b divisible by 3? Let a, b, c, x, y. If b a and b c, does ( ax cy) b +? Why? a, b, is it true that a b implies a b? Does 4 5? WUCT2 Numbers 80

4.2.2. Definition: Transitivity of Divisibility For all integers a, b and c, if a b and b c, then a c. Exercise: Write the definition of transitivity of divisibility using logic notation. Proof: We know: a b k, b = ka b c l, c = bl ( ) ( 2) Show that a c, that is, find m such that c = ma. Now, c = = bl ( ka) l = ( kl) a = ma a c by(2) by() by associativity and commutativity wherem = kl WUCT2 Numbers 8

4.2.3. Theorem: Divisibility by a Prime Every integer n > is divisible by some prime number. Exercise: Write the theorem of divisibility by a prime using logic notation. Proof: We need to show: Let n, n >. n,( n > a primenumber p, p n) Then there are two possibilities: a. If n is prime, let p = n. Then p n and the result follows. b. If n is not prime, then r, s, < r < n and < s < n n = r. s WUCT2 Numbers 82

Consider r, again there are two possibilities: > A. If r is prime, let p = r. Then p r and r n so p n by transitivity of divisibility B. If r is not prime, then r, < s < r 2 s2, < r 2 < r and r =. r2 s2 Consider r, again there are two possibilities 2 > A. If r 2 is prime, let p = r 2. Then p r 2 and r 2 r and r n so p n by transitivity of divisibility. B. If r 2 is not prime, then we factorise as with r and n. We continue in this way until we find a prime factor. This process will finish after a finite number of steps because each new factor is less than the previous one and greater than. 2 WUCT2 Numbers 83

Thus, we obtain the listr r 2 r 3, K, r k where n > r K > > r 2 > r 3 > r k and each n The list ends when r k is prime. r i. Therefore, let p = r k, then p n and the result follows. Example: Find a prime factor of 693. 693 = 9 77 9 and 77 are not prime Let r = 9 9 = 3 3 3 is prime Let p = 3 Exercise: Find a prime factor of 48. WUCT2 Numbers 84

4.2.4. Theorem: Infinite Number of Primes The number of primes is infinite. Proof: Suppose there is a finite number of primes; that is, we can list all prime numbers as follows: Therefore, p n is the largest prime number. Consider X p p p K p. Clearly Since = 2 3 n + X > pn. p =, p = 3,, 2 2 K pn p n is the largest prime, X must be composite so, by the Theorem of Divisibility by a Prime, X is divisible by a prime. Consider: Similarly, X p X p 2 = p2 p3 K pn + p. p 2 2, so p / X = p p3 K pn +., so p 2 / X p p p 3 / X. p 4 / X,, p n / X. Therefore, no prime number divides X. This is a contradiction, so our assumption must be incorrect. Therefore, since the number of primes is not finite, it must be infinite. WUCT2 Numbers 85

4.3. Quotient Remainder Theorem Exercise: Evaluate the following division without using decimals. (Nor a calculator!) 4 We can express the previous division as = 4 2 + 3. Note that the remainder, 3, is less than 4. 4.3.. Theorem: The Quotient-Remainder Theorem. If n and d > 0 are both integers, then there exist unique integers q and r such that n = dq + r and 0 r < d. Proof: We know that n, d, and d > 0. The proof of this theorem involves proving two main things: WUCT2 Numbers 86

A. Existence: Prove that: q, r, n = dq + r, 0 r < d. Let S = { n dk n dk 0, k } :. We want to show S is nonempty. If n 0, we can select k = 0: n 0 d = n 0 d n S 0 If n < 0, we can select k = n: ( d ) n n d = n 0, since n < 0 and d 0 n n d S Therefore S is nonempty. Note that S 0 and that 0 is well-ordered. Therefore by the well-ordering principle, S contains a least element r. Then for some specific integer n dq = r n = dq + r k = q WUCT2 Numbers 87

We prove Suppose r < d by contradiction. r d. n d( q + ) = n dq d = r d 0 Since n dq = r, n d( q +) would be a nonnegative integer in S that would be smaller than r. But r is the smallest integer in S. We have a contradiction. Therefore our assumption, r < d. r d, was wrong, and so B. Uniqueness: Prove that for n = dq + r, r and q are unique. Suppose that: n n = = dq + r dq + r q q, r r (2) () 0 = d( q q d( q q ) + r r ) = r r () (2) Now q,q and q q q q.. WUCT2 Numbers 88

r r d since r r (3) i.e. and r 0 r < d d < r 0 0 r d < r r < d < d r < d This contradicts (3), so our assumption is wrong. q = q r =, r Therefore for n = dq + r, r and q are unique. Summary of Proof: The proof of this theorem involved proving two main things: Existence: q, r, n = dq + r, 0 r < d Let S = { n dk n dk 0 and k } :. Apply well-ordering to get a least value r with corresponding k = q, so that n dq = r. Prove that r < d by assuming r d and showing that this gives a smaller element of S, which contradicts the fact that r is the least element of S. WUCT2 Numbers 89

Uniqueness: For n = dq + r, r and q are unique. (i.e. the only ones). Assume that there are two values each for q and r, and prove by contradiction that the values are really the same. The Quotient-Remainder Theorem says that when we divide any integer n by any positive integer d, there will be a quotient q and a remainder r, where 0 r < d. Example: Find values for q, r, such that n = dq + r, 0 r < d, for the following: n = 54, d = 4 54 = 4 3 + 2 q = 3, r = 2 n = 32, d = 9 32 = 9 ( 4) + 4 q = 4, r = 4 WUCT2 Numbers 90

Exercises: Find values for q, r, such that n = dq + r, 0 r < d, for the following: n = 54, d = 4 n = 54, d = 70 WUCT2 Numbers 9

4.3.2. Result: Even or Odd Every integer is either even or odd. Proof: We must prove the statement n, n is even n is odd i.e. n, ( k, n = 2k) ( l, n = 2l + ) Let n. Now, n and 2 > 0 are integers, so we apply the Quotient- Remainder Theorem to get: q, r, n = 2q + r, 0 r < 2. For 0 r < 2 to be true, r = 0 or r =. Therefore, n = 2 q + 0 = 2q or n = 2 q + and the result follows. WUCT2 Numbers 92

4.4. The Fundamental Theorem of Arithmetic 4.4.. Theorem: The Fundamental Theorem of Arithmetic If a and a > then a can be factorised in a unique way in the form where p p, a = p p α p α2 2 p α3 3... α p k k, 2, K k are each prime numbers and α i for each i =, 2, K, k. Example: Write the following numbers in terms of their prime factors. 32 32 2 6 2 8 2 4 5 32 = 2 2 2 WUCT2 Numbers 93

924 924 2 462 2 23 3 77 924 = 2 2 3 7 7 Exercises: Write the following numbers in terms of their prime factors. 300 WUCT2 Numbers 94

2772 5093 WUCT2 Numbers 95

4.5. Finding Prime Numbers 4.5.. Algorithm: The Sieve of Eratosthenes. The Sieve of Eratosthenes is a method of finding primes up to n as follows. A. List all the primes up to n B. Write down all integers from to n, noting the listed primes C. Delete all multiples of the listed primes D. The remaining values are the prime numbers up to n. Note: x is the floor function and is defined as: x is the greatest integer that is less than or equal to x. That is x = n, where n, n x < n + Example: 7 = 0.82 = 0 Exercise: Find 200 WUCT2 Numbers 96

Example: Find all primes between and 00. A. 00 = 0. Primes to 0 are: 2, 3, 5, 7 B. List the numbers 00 noting the primes 2, 3, 5, 7. 2 3 4 5 6 7 8 9 0 2 3 4 5 6 7 8 9 20 2 22 23 24 25 26 27 28 29 30 3 32 33 34 35 36 37 38 39 40 4 42 43 44 45 46 47 48 49 50 5 52 53 54 55 56 57 58 59 60 6 62 63 64 65 66 67 68 69 70 7 72 73 74 75 76 77 78 79 80 8 82 83 84 85 86 87 88 89 90 9 92 93 94 95 96 97 98 99 00 WUCT2 Numbers 97

C. (i) Delete multiples of 2 2 3 4 5 6 7 8 9 0 2 3 4 5 6 7 8 9 20 2 22 23 24 25 26 27 28 29 30 3 32 33 34 35 36 37 38 39 40 4 42 43 44 45 46 47 48 49 50 5 52 53 54 55 56 57 58 59 60 6 62 63 64 65 66 67 68 69 70 7 72 73 74 75 76 77 78 79 80 8 82 83 84 85 86 87 88 89 90 9 92 93 94 95 96 97 98 99 00 (ii) Delete multiples of 3 2 3 4 5 6 7 8 9 0 2 3 4 5 6 7 8 9 20 2 22 23 24 25 26 27 28 29 30 3 32 33 34 35 36 37 38 39 40 4 42 43 44 45 46 47 48 49 50 5 52 53 54 55 56 57 58 59 60 6 62 63 64 65 66 67 68 69 70 7 72 73 74 75 76 77 78 79 80 8 82 83 84 85 86 87 88 89 90 9 92 93 94 95 96 97 98 99 00 WUCT2 Numbers 98

(iii) Delete multiples of 5 2 3 4 5 6 7 8 9 0 2 3 4 5 6 7 8 9 20 2 22 23 24 25 26 27 28 29 30 3 32 33 34 35 36 37 38 39 40 4 42 43 44 45 46 47 48 49 50 5 52 53 54 55 56 57 58 59 60 6 62 63 64 65 66 67 68 69 70 7 72 73 74 75 76 77 78 79 80 8 82 83 84 85 86 87 88 89 90 9 92 93 94 95 96 97 98 99 00 (iv) Delete multiples of 7 2 3 4 5 6 7 8 9 0 2 3 4 5 6 7 8 9 20 2 22 23 24 25 26 27 28 29 30 3 32 33 34 35 36 37 38 39 40 4 42 43 44 45 46 47 48 49 50 5 52 53 54 55 56 57 58 59 60 6 62 63 64 65 66 67 68 69 70 7 72 73 74 75 76 77 78 79 80 8 82 83 84 85 86 87 88 89 90 9 92 93 94 95 96 97 98 99 00 WUCT2 Numbers 99

D. Primes: 2, 3, 5, 7,, 3, 7, 9, 23, 29, 3, 37, 4, 43, 47, 53, 59, 6, 67, 7, 73, 79, 83, 89, 97. Exercise: Find all primes between 0 and 200. A. B. C. 0 02 03 04 05 06 07 08 09 0 2 3 4 5 6 7 8 9 20 2 22 23 24 25 26 27 28 29 30 3 32 33 34 35 36 37 38 39 40 4 42 43 44 45 46 47 48 49 50 5 52 53 54 55 56 57 58 59 60 6 62 63 64 65 66 67 68 69 70 7 72 73 74 75 76 77 78 79 80 8 82 83 84 85 86 87 88 89 90 9 92 93 94 95 96 97 98 99 200 D. WUCT2 Numbers 00