Chapter 4 Properties of the integers: mathematical induction Yen-Liang Chen Dept of IM NCU.

Slides:



Advertisements
Similar presentations
Mathematical Induction
Advertisements

Copyright © Cengage Learning. All rights reserved. CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION.
5.1 Number Theory. The study of numbers and their properties. The numbers we use to count are called the Natural Numbers or Counting Numbers.
Sets, Combinatorics, Probability, and Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides.
1 Section 2.4 The Integers and Division. 2 Number Theory Branch of mathematics that includes (among other things): –divisibility –greatest common divisor.
Chapter Primes and Greatest Common Divisors ‒Primes ‒Greatest common divisors and least common multiples 1.
February 19, 2015Applied Discrete Mathematics Week 4: Number Theory 1 The Growth of Functions Question: If f(x) is O(x 2 ), is it also O(x 3 )? Yes. x.
Copyright © 2013, 2010, and 2007, Pearson Education, Inc.
NUMBER THEORY Chapter 1: The Integers. The Well-Ordering Property.
Basic properties of the integers
Induction and recursion
Induction Sections 41. and 4.2 of Rosen Fall 2008 CSCE 235 Introduction to Discrete Structures Course web-page: cse.unl.edu/~cse235 Questions:
Discrete Mathematics Lecture 4 Harper Langston New York University.
Induction Sections 4.1 and 4.2 of Rosen Fall 2010
Chapter II. THE INTEGERS
Discrete Structures Chapter 2 Part B Mathematical Induction
Theory of Computation Transparency No. 1-1 Chapter 2 Introduction to Number Theory and Its applications Cheng-Chia Chen October 2002.
Lecture 4 Discrete Mathematics Harper Langston. Algorithms Algorithm is step-by-step method for performing some action Cost of statements execution –Simple.
Properties of the Integers: Mathematical Induction
Fall 2002CMSC Discrete Structures1 Let us get into… Number Theory.
The Integers and Division
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 3 (Part 2): The Fundamentals: Algorithms, the.
1 Properties of Integers Objectives At the end of this unit, students should be able to: State the division algorithm Apply the division algorithm Find.
9/2/2015Discrete Structures1 Let us get into… Number Theory.
Sequences and Series (T) Students will know the form of an Arithmetic sequence.  Arithmetic Sequence: There exists a common difference (d) between each.
Induction and recursion
Discrete Mathematics, 1st Edition Kevin Ferland
Mathematics Review Exponents Logarithms Series Modular arithmetic Proofs.
Mathematical Induction. F(1) = 1; F(n+1) = F(n) + (2n+1) for n≥ F(n) n F(n) =n 2 for all n ≥ 1 Prove it!
Numbers MST101. Number Types 1.Counting Numbers (natural numbers) 2.Whole Numbers 3.Fractions – represented by a pair of whole numbers a/b where b ≠ 0.
The Integers. The Division Algorithms A high-school question: Compute 58/17. We can write 58 as 58 = 3 (17) + 7 This forms illustrates the answer: “3.
CompSci 102 Discrete Math for Computer Science
Copyright © Zeph Grunschlag, Basic Number Theory Zeph Grunschlag.
Rational Numbers and Fields
Copyright © 2009 Pearson Education, Inc. Chapter 5 Section 1 - Slide 1 Chapter 1 Number Theory and the Real Number System.
Copyright © Zeph Grunschlag, Induction Zeph Grunschlag.
Chapter 2 (Part 1): The Fundamentals: Algorithms, the Integers & Matrices The Integers and Division (Section 2.4)
Section 3.3: Mathematical Induction Mathematical induction is a proof technique that can be used to prove theorems of the form:  n  Z +,P(n) We have.
Foundations of Discrete Mathematics Chapter 4 By Dr. Dalia M. Gil, Ph.D.
CS 103 Discrete Structures Lecture 13 Induction and Recursion (1)
Module #9 – Number Theory 1/5/ Algorithms, The Integers and Matrices.
Application: Algorithms Lecture 20 Section 3.8 Wed, Feb 21, 2007.
Direct Proof and Counterexample III
CSCI 115 Chapter 1 Fundamentals. CSCI 115 §1.1 Sets and Subsets.
CompSci 102 Discrete Math for Computer Science March 13, 2012 Prof. Rodger Slides modified from Rosen.
Chapter 5. Section 5.1 Climbing an Infinite Ladder Suppose we have an infinite ladder: 1.We can reach the first rung of the ladder. 2.If we can reach.
Slide Copyright © 2009 Pearson Education, Inc. 5.1 Number Theory.
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications Kenneth H. Rosen (5 th Edition) Chapter 2 The Fundamentals: Algorithms,
Chapter 4 With Question/Answer Animations 1. Chapter Summary Divisibility and Modular Arithmetic - Sec 4.1 – Lecture 16 Integer Representations and Algorithms.
Ch04-Number Theory and Cryptography 1. Introduction to Number Theory Number theory is about integers and their properties. We will start with the basic.
Number Theory Lecture 1 Text book: Discrete Mathematics and its Applications, 7 th Edition.
Fuw-Yi Yang1 Textbook: Introduction to Cryptography 2nd ed. By J.A. Buchmann Chap 1 Integers Department of Computer Science and Information Engineering,
Chapter 5 1. Chapter Summary  Mathematical Induction  Strong Induction  Recursive Definitions  Structural Induction  Recursive Algorithms.
Dr Nazir A. Zafar Advanced Algorithms Analysis and Design Advanced Algorithms Analysis and Design By Dr. Nazir Ahmad Zafar.
Number Theory. Introduction to Number Theory Number theory is about integers and their properties. We will start with the basic principles of divisibility,
Advanced Algorithms Analysis and Design
CMSC Discrete Structures
Induction and recursion
MATH301- DISCRETE MATHEMATICS Copyright © Nahid Sultana Dr. Nahid Sultana Chapter 4: Number Theory and Cryptography.
Applied Discrete Mathematics Week 3: Algorithms
Applied Discrete Mathematics Week 4: Number Theory
Foundations of Discrete Mathematics
Applied Discrete Mathematics Week 9: Integer Properties
CMSC 203, Section 0401 Discrete Structures Fall 2004 Matt Gaston
Copyright © Zeph Grunschlag,
Applied Discrete Mathematics Week 10: Introduction to Counting
Number Theory.
Three. The Induction Principle and Properties of Integers
From the last time: gcd(a, b) can be characterized in two different ways: It is the least positive value of ax + by where x and y range over integers.
Sets, Combinatorics, Probability, and Number Theory
Presentation transcript:

Chapter 4 Properties of the integers: mathematical induction Yen-Liang Chen Dept of IM NCU

4.1. The well-ordered principle: mathematical induction Z + ={x  Z  x  1} but Q + ={x  Q  x>0} and R + ={x  R  x>0}. Z + is different from Q + and R + in the following property. –The well-ordering principle: Every nonempty subset of Z + contains a smallest element.

The principle of mathematical induction (a) If S(1) is true and (b) If S(k) is true, then S(k+1) is true, (c) then S(n) is true for all n  Z +. The condition (a) is referred to as basis step, while that in part (b) is called the inductive step. The basis step can begin with any integer number, even negative.

Ex 4.1 For all n  Z +, S(n)=1+2+…+n=n(n+1)/ 2 Basis: it is true for n=1 Hypothesis: it is true for S(n) Induction: Adding n+1 to S(n), we find S(n+1) is also true.

Ex 4.4 For all n  Z +, S(n)= …+n 2 =n (n+1) (2n+1)/6 Basis: it is true for n=1 Hypothesis: it is true for S(n)

Ex 4.6 S(n)=1+2+…+n=(n 2 +n+2)/2 Obviously, this formula is wrong. However, we find that S(k)  S(k+1). Although S(k)  S(k+1) but S(1) is not true, S(n) is not true either. This example indicates the need to establish the basis step.

Ex 4.8 For all n  6, 4n<(n 2 -7) Basis: it is true for n=6 Hypothesis: it is true for n=k Induction: it is also true n=k+1.

Ex 4.9 Harmonic number H n =1+(1/2)+…+(1/n) For all n  Z +, Basis: it is true for n=1 Hypothesis: it is true for n=k

Ex 4.10 binary search principle For all A n  R with  A n  =2 n and the elements of A n are listed in ascending order. To determine if r exist in A n or not, we must compare r with no more than n+1 elements in A n. Basis: it is true for A 0 and A 1. Hypothesis: it is true for A n. Induction: it is also true A n+1.

Ex 4.12 For all k  1, S(k): k has 2 k-1 compositions. Basis: S(1) is true. Given the composition of k, we can produce the composition of k+1 by: –the last summand of k is added by 1. –We append a new summand “1” after the last summand of k. Therefore, the number of composition of k+1 is twice the number of k.

Ex 4.13 for all n  14, S(n): n can be written as a sum of 3’s and/or 8’s Basis: 14=3+3+8 Hypothesis: S(k) is true. Induction: Let us consider k. –If there is one 8 in the sum that equals k, then we can replace this as –If there is no 8, then since k  14, there are at least five 3’s as summands, which can be replaced by two 8’s.

Alternative form of mathematical induction (a) If S(n 0 ), S(n 0 +1), S(n 0 +2),…, S(n 1 -1), S(n 1 ) are true, and (b) If S(n 0 ), S(n 0 +1), …, S(k-1), S(k) are true for some k  n 1, then S(k+1) is also true, (c) then S(n) is true for all n  n 0.

Ex 4.15 a 0 =1, a 1 =2, a 2 =3, a n =a n-1 +a n-2 +a n-3 for n  3. S(n): a n  3 n for all n  N. Basis: it is true for n=0, n=1 and n=2. Hypothesis: S(n) is true for n  k.

4.2. Recursive definition In example 4.15, we have a recursive definition

Ex 4.16 Given the definition that (1) the conjunction of p 1, p 2 by p 1  p 2, (2) p 1  p 2  …  p n  p n+1  (p 1  p 2  …  p n )  p n+1. Show that (p 1  p 2  …  p r )  (p r+1  p r+2  …  p k ) = (p 1  p 2  …  p r+1  p r+2  …  p k ).

Ex 1.47 Given the definition that (1) the union of A 1, A 2 by A 1  A 2, (2) A 1  A 2  …  A n  A n+1  (A 1  A 2  …  A n )  A n+1. Show (A 1  A 2  …  A r )  (A r+1  A r+2  …  A k ) = (A 1  A 2  …  A r+1  A r+2  …  A k ).

Ex 4.18 (A 1  A 2  …  A k+1 ) c =A 1 c  A 2 c  …  A k+1 c Basis: it is true for n=2 Hypothesis: it is true for n=k (A 1  A 2  …  A k ) c =A 1 c  A 2 c  …  A k c

Ex 4.19 The Fibonacci numbers are defined as –F 0 =0, F 1 =1 and –F n =F n-1 +F n-2 for n  2. Show that

Ex 4.20 Lucas numbers: (1) L 0 =2, L 1 =1; and (2) L n =L n-1 +L n-2 for n  2. Then L n =F n-1 +F n+1.

Ex 4.21 Eulerian numbers a m, k are defined: (1) a m, k = (m- k)a m-1, k-1 +(k+1)a m-1, k for 0  k  m-1. (2) a 0,0 =1, a m, k =0 for k  m, a m, k =0 for k<0.

4.3. The division algorithm: prime number Definition 4.1. b  a if and only if a=bn Theorem 4.3.

Ex 4.23 Do there exists an integer x, y, z such that 6x+9y+15z=107 Since 3  6, 3  9 and 3  15, 3 is a divisor of 107. But since 3 is not a divisor of 107, there does not exist such x, y, z.

Ex 4.24 If 17  2a+3b, then 17  9a+5b 17  2a+3b  17  (-4)(2a+3b). 17  17  17  17a+17b 17  (-4)(2a+3b) +17a+17b  17  9a+5b

Prime Prime: integers that have exactly two divisors. Composite number: integers that are not primes. for any composite n, there is a prime p such that p  n. (Why?) There are infinitely many primes. (Theorem 4.4)

Proof of Theorem 4.4 Let p 1, p 2,…,p k be the set of all primes. Let B= p 1  p 2  …  p k +1 and B is a composite. There exists p j such that p j  B and p j  p 1  p 2  …  p k. By Theorem 4.3(e), p j  1 ; so, this is a contradiction.

Theorem 4.5. The division algorithm in Fig 4.10 If a, b  Z, then there exist unique q, r  Z with a=qb+r, 0  r<b. Here q is called quotient, r remainder, b divisor and a dividend.

4.4. The greatest common divisor: the Euclidean algorithm Common divisor, Definition 4.2 Greatest common divisor c, Definition 4.3 (a) c  a and c  b, (b) For any common divisor d of a and b, d  c Theorem 4.6. gcd(a, b) is unique (Why?) –Let S={a  s+b  t  s,t  Z, a  s+b  t>0}. The least element in S is the greatest common divisor of a, b.

Proof of Theorem 4.6 Since c=ax+by, if d  a and d  b, then d  c=ax+by. Def 4.3(b) if c can not divide a, then a=qc+r where 0<r<c. So, we have r=a-qc=a-q(ax+by)=(1-qx)a+(-qy)b, meaning r  S. This is a contradiction to the fact that c is the smallest one in S. Hence, c  a and c  b. Def 4.3(a) If c 1 and c 2 both satisfy the above two conditions, let us designate c 1 as the gcd(a, b), then we have c 2  c 1. By reversing the role, we have c 1  c 2. So, we conclude that c 1 =c 2.

Properties gcd(a, b) is the smallest positive integer we can write as a linear combination of a and b. gcd(a, b)= gcd(b, a); gcd(a, b)= gcd(a, - b)= gcd(-a, b)= gcd(-a, -b); gcd(a, 0) =  a  gcd(0, 0) not defined. We call a and b relatively prime if gcd(a, b)=1.

Theorem 4.7. Euclidean algorithm.

Proof If d  r 0 and d  r 1  d  r 2 d  r 1 and d  r 2  d  r 3 d  r n-2 and d  r n-1  d  r n This satisfies Def 4.3(b) From the last equation, r n  r n-1. So, r n  r n-2 because r n-2 =q n-1 r n-1 +r n r n  r n-1 and r n  r n-2  r n  r n-3 r n  r n-2 and r n  r n-3  r n  r n-4 r n  r 2 and r n  r 1  r n  r 0 This satisfies Def 4.3(a)

Examples Ex Find the gcd of 250 and 111. Ex Show that 8n+3 and 5n+2 are relatively prime. Ex How can we measure exactly one ounce by two containers with capacities 17 ounces and 55 ounces respectively.

Least common multiple Definition 4.4. lcm(a, b) the least common multiple lcm(1, n)=lcm(n, 1)=n lcm(c, n  a)=n  a If n  m, lcm(a m, a n )=a n. If c=lcm(a,b) and d is a common multiple of a, b, then c  d. a  b=lcm(a,b)  gcd(a, b)

4.5. The fundamental theorem of arithmetic Lemma 4.2. If p is prime and p  ab, then p  a or p  b. –If p  a, we are finished. –If not, then gcd(p, a)=1. px+ay=1 b=p(bx)+(ab)y Since p  ab and p  p, we have p  b. Lemma 4.3. If p is prime and p  a 1 a 2 …a n, then p  a i for some i. (Why)

is irrational If not, then we have =a/b, where a and b are relatively prime, gcd(a, b)=1. 2=a 2 /b 2  2b 2 =a 2  2  a 2  2  a 2  a  a=2c 2b 2 =a 2 =(2c) 2 =4c 2  b 2 =2c 2 b 2 =2c 2  2  b 2  2  b Since 2  a and 2  b, gcd(a, b)  2

Theorem Every integer can be written as a product of primes uniquely. (1) the existence of a prime factorization. (2)The factorization is uniqueness. The first part is proved by contradiction. Consider the smallest integer m that can not be factorized. The second part is proved by induction. It is true for 2 and for n-1. Now we prove it holds for n.

Examples Ex The prime factorization for Ex How to count the number of divisors of n? Ex Determine the gcd(a, b) and lcm(a, b) by factorization.