Mathematical Induction Readings on induction. (a) Weiss, Sec. 7.2, page 233 (b) Course slides for lecture and notes recitation. Every criticism from a.

Slides:



Advertisements
Similar presentations
Mathematical Induction
Advertisements

22C:19 Discrete Structures Induction and Recursion Fall 2014 Sukumar Ghosh.
Proofs, Recursion and Analysis of Algorithms Mathematical Structures for Computer Science Chapter 2 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProofs,
1 Mathematical Induction. 2 Mathematical Induction: Example  Show that any postage of ≥ 8¢ can be obtained using 3¢ and 5¢ stamps.  First check for.
Induction and recursion
1.  The set N = {1,2,3,4,……..} is known as natural numbers or the set of positive integers  The natural numbers are used mainly for :  counting  ordering.
Induction Sections 41. and 4.2 of Rosen Fall 2008 CSCE 235 Introduction to Discrete Structures Course web-page: cse.unl.edu/~cse235 Questions:
Discussion #131/18 Discussion #13 Induction (the process of deriving generalities from particulars) Mathematical Induction (deductive reasoning over the.
Snick  snack CPSC 121: Models of Computation 2011 Winter Term 1 Revisiting Induction Steve Wolfman, based on work by Patrice Belleville and others 1.
Induction Sections 4.1 and 4.2 of Rosen Fall 2010
1 Intro to Induction Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong.
So far we have learned about:
1 Mathematical Induction. 2 Mathematical Induction: Example  Show that any postage of ≥ 8¢ can be obtained using 3¢ and 5¢ stamps.  First check for.
1 Recitation 10. Induction Introduction. Induction is useful in proving properties of recursive algorithms, like their execution times. It is also the.
1 Section 3.3 Mathematical Induction. 2 Technique used extensively to prove results about large variety of discrete objects Can only be used to prove.
CSE115/ENGR160 Discrete Mathematics 03/29/11 Ming-Hsuan Yang UC Merced 1.
Mathematical Induction
1 Mathematical Induction. 2 Mathematical Induction: Example  Show that any postage of ≥ 8¢ can be obtained using 3¢ and 5¢ stamps.  First check for.
Induction and Recursion by: Mohsin tahir (GL) Numan-ul-haq Waqas akram Rao arslan Ali asghar.
Induction and recursion
What it is? Why is it a legitimate proof method? How to use it?
Methods of Proof & Proof Strategies
Lecture 9. Arithmetic and geometric series and mathematical induction
Induction and recursion
Inductive Proof (the process of deriving generalities from particulars) Mathematical Induction (reasoning over the natural numbers)
Introduction to Proofs
1 Introduction to Abstract Mathematics Chapter 4: Sequences and Mathematical Induction Instructor: Hayk Melikya 4.1- Sequences. 4.2,
Chapter 1: Introduction Mathematical Proofs Mathematical Induction CS 340 Page 1.
Copyright © Peter Cappello Mathematical Induction Goals Explain & illustrate construction of proofs of a variety of theorems using mathematical induction.
Module #13: Inductive Proofs Rosen 5 th ed., § inference of a generalized conclusion from particular instances 2. mathematical demonstration of the.
INDUCTION Lecture 23 CS2110 – Spring 2015 A scientist gave a lecture on astronomy. He described how the earth orbits the sun, which, in turn, orbits the.
Copyright © Zeph Grunschlag, Induction Zeph Grunschlag.
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.
Module #15 – Inductive Proofs 12/6/2015(c) , Michael P. Frank1 Inductive Proofs: a brief introduction Rosen 5 th ed., §3.3 ~35 slides, ~1.5 lecture.
CompSci 102 Discrete Math for Computer Science March 1, 2012 Prof. Rodger Slides modified from Rosen.
Induction & Recursion Weiss: ch 7.1. Recursion –a programming strategy for solving large problems –Think “divide and conquer” –Solve large problem by.
CS 103 Discrete Structures Lecture 13 Induction and Recursion (1)
Foundations of Discrete Mathematics Chapters 5 By Dr. Dalia M. Gil, Ph.D.
1 INFO 2950 Prof. Carla Gomes Module Induction Rosen, Chapter 4.
Inductive Proofs and Inductive Definitions Jim Skon.
Mathematical Induction 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.
CSE373: Data Structures and Algorithms Lecture 2: Proof by Induction Linda Shapiro Winter 2015.
INDUCTION Slides of Ken Birman, Cornell University.
Mathematical Induction
Copyright © Zeph Grunschlag, Induction Zeph Grunschlag.
CompSci 102 Discrete Math for Computer Science March 13, 2012 Prof. Rodger Slides modified from Rosen.
INDUCTION Lecture 21 CS2110 – Spring 2014 A well-known scientist (Bertrand Russell?) once gave a public lecture on astronomy. He described how the earth.
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.
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 a particular.
INDUCTION Lecture 22 CS2110 – Fall 2009 A well-known scientist (some say it was Bertrand Russell) once gave a public lecture on astronomy. He described.
Algorithmic Foundations COMP108 COMP108 Algorithmic Foundations Mathematical Induction Prudence Wong
1 Discrete Mathematical Mathematical Induction ( الاستقراء الرياضي )
Mathematical Induction
3.3 Mathematical Induction 1 Follow me for a walk through...
Chapter 5 1. Chapter Summary  Mathematical Induction  Strong Induction  Recursive Definitions  Structural Induction  Recursive Algorithms.
Advanced Algorithms Analysis and Design
Induction and recursion
Mathematical Induction Recursion
Chapter 5 Induction and Recursion
CS201: Data Structures and Discrete Mathematics I
Discrete Mathematics and its Applications
Induction and recursion
CPSC 121: Models of Computation 2013W2
Induction Chapter
Advanced Analysis of Algorithms
Mathematical Induction
Induction Lecture 20 CS2110 – Spring 2013
Mathematical Induction
Agenda Proofs (Konsep Pembuktian) Direct Proofs & Counterexamples
Presentation transcript:

Mathematical Induction Readings on induction. (a) Weiss, Sec. 7.2, page 233 (b) Course slides for lecture and notes recitation. Every criticism from a good man is of value to me. What you hint at generally is very, very true: that my work will be grievously hypothetical, and large parts by no means worthy of being called induction, my commonest error being probably induction from too few facts. Charles R. Darwin

induction vs deduction Induction: 2a (1) : inference of a generalized conclusion from particular instances. 2a (2): a conclusion arrived at by induction 2b: mathematical demonstration of the validity of a law concerning all the ints 0, 1, 2, … by proving that (1) it holds for 0 and (2) if it holds for arbitrary int k then it holds for k+1 -- called mathematical induction. Deduction: 2a : the deriving of a conclusion by reason- ing; an inference in which the conclusion about particu- lars follows necessarily from general or universal premises --a proof? 2b: a conclusion reached by logical deduction.

Overview Recursion –a strategy for writing programs that compute in a “divide-and-conquer” fashion –solve a large problem by breaking it up into smaller problems of same kind Induction –a mathematical strategy for proving statements about integers (more generally, about sets that can be ordered in some fairly general ways) Induction and recursion are intimately related.

Defining Functions It is often useful to write a given function in different ways. Example: Let S:int  int be a function, where S(n) is the sum of the natural numbers from 0 to n. S(0) = 0, S(3) = = 6 –One definition: iterative form: S(n) = … + n –Second definition: recursive form: S(0) = 0 S(n) = S(n–1) + n for n ≥ 0 –Third definition: closed-form: S(n) = n(n+1)/2

Sn(0) = 0 S(n) = S(n–1) + n for n > 0 or S(n+1) = S(n) + (n+1) for n>= 0 Notation for recursive functions Base case Recursive case

S r (0) = 0 S r (n) = S r (n-1) + n for n > 0 S c (n) = n(n+1)/2 Can we show that these two definitions of S(n) are equal ? r: recursive c: closed-form

Dominoes Assume equally spaced dominoes, where spacing between dominoes is less than domino length. Argue that dominoes fall. Dumb argument: –Domino 0 falls because we push it over. –Domino 1 falls: domino 0 falls; it is longer than inter- domino spacing, so it knocks over domino 1. –Domino 2 falls: domino 1 falls; it is longer than inter- domino spacing, so it knocks over domino 2. –…… How do we do this argument nicely?

Mathematical induction Proof of P(n) for all n ≥ 0, where P(n): Domino n falls. –Base case: Domino 0 falls because we push it over. –Inductive case: Assume inductive hypothesis P(k) for any k ≥ 0 and prove P(k+1): Assume P(k): Domino k falls. Since length of domino k is greater than the inter- domino spacing, it knocks over domino k+1, so domino k+1 false, so P(k+1) holds. This is an inductive argument. This is called weak induction. There is also strong induction (see later). Compact argument, and it works even for an infinite number of dominoes!

Weak induction over integers Theorem: P(n) holds for all integers n ≥ 0. Proof by (weak) mathematical induction: Base case: Show that P(0) is true. Inductive case: Assume inductive hypothesis P(k) for any k ≥ 0 and, using P(k), prove P(k+1). To prove something by math induction, you HAVE to put in the form: Prove P(n) for all n ≥ 0.

S c (n) = n(n+1)/2 S r (0) = 0 S r (n) = S r (n-1) + n Let P(n) be the proposition that S r (n) = S c (n). Prove P(n), for n ≥ 0. base case Base case: Prove P(0) S c (0) = 0(0+1)/2 = 0 S r (0)

S c (n) = n(n+1)/2 S r (0) = 0 S r (n) = S r (n-1) + n base case inductive hyp inductive case Inductive case: Assume P(k), prove P(k+1) S r (k+1) = S r (k) + (k+1) = S c (k) + (k+1) = k(k+1)/2 + (k+1) = (k+1)(k+2)/2 = S c (k+1) S r (k+1) = S r (k+1–1) + k+1 P(k): S r (k) = S c (k) P(k+1): S r (k+1) = S c (k+1) S c (k+1) = (k+1)(k+1+1)/2

Another example of weak induction Prove: for all n, n ≥ 0, P(n) holds, where P(n): … + n = n(n+1)/2 Base case: Prove P(0): 0(0+1)/2 = 0 = … 0 Inductive case: Assume P(k), prove P(k+1) … + (k+1) = … + k + (k+1) = k(k+1)/2 + (k+1) = (k+1)(k+1+1)/2 P(k+1): … + (k+1) = (k+1)/(k+1+1)/2

S c (n) = n(n+1)/2 S r (0) = 0 S r (n) = S r (n-1) + n Inductive case: Assume P(k), prove P(k+1) S r (k+1) = S r (k) + (k+1) = S c (k) + (k+1) = k(k+1)/2 + (k+1) = (k+1)(k+2)/2 = S c (k+1) Goal in developing the inductive case: EXPOSE P(k) P(k): S r (k) = S c (k) Formula above has the LHS of P(k) in it. We have exposed P(k); we have made it possible to use it.

Note on base case In some problems, we are interested in showing some proposition is true for integers greater than or equal to some lower bound (say b) Intuition: we knock over domino b; dominoes before it are not knocked over. Not interested in dominoes 0,1,…,(b-1). In general, base case in induction does not have to be 0. If base case is some integer b, induction proves proposition for n = b,b+1,b+2,…. Does not say anything about n = 0,1,…,b

Weak induction: non-zero base case Theorem. for all n ≥ b, P(n) holds. Proof. Base case: Prove P(b) Inductive case: Assume inductive hypothesis P(k) for any k ≥ b and prove P(k+1). or inductive case: Assume inductive hypothesis P(k- 1) for k > b and prove P(k).

Proof about n-gons convex polygon (triangle) convex polygon not-convex polygon polygon is convex if the line between any two points in it is entirely within the polygon. Or, if all its angles are < 180 degrees. n-gon: convex polygon with n sides

Theorem. The angles in an n-gon add up to 180(n-2) Theorem. For all n ≥ 3, P(n) holds: P(n): (sum of angles of an n-gon) = 180(n-2) Proof. Base case: P(3): (sum of angles of a 3-gon) = 180(3-2) We accept as a fact that the sum of the angles of a 3-gon —a triangle— is 180 degrees. Assume it has been proven.

Theorem. The angles in an n-gon add up to 180(n-2) Theorem. For all n ≥ 3, P(n) holds: P(n): (sum of angles of an n-gon) = 180(n-2) Inductive case: Assume P(k): (sum of angles k-gon) = 180(k-2). Prove P(k+1): (sum of angles (k+1)-gon) = 180(k-1) (n+1)-gon To expose P(k) we have to find an n- gon within the (n+1)-gon. How do we do it?

Theorem. The angles in an n-gon add up to 180(n-2) Theorem. For all n ≥ 3, P(n) holds: P(n): (sum of angles of an n-gon) = 180(n-2) Inductive case: Assume P(k): (sum of angles k-gon) = 180(k-2). Prove P(k+1): (sum of angles (k+1)-gon) = 180(k-1) n-gon + 3-gon sum of angles in (n+1)-gon = (angle-sum: 3-gon) + (angle-sum: n-gon) = (n-2) = 180(n+1-2)

Using stamps for money We have lots of 3-cent and 5-cent stamps. Show that any amount of money that is at least 8 cents can be made using 3- cent and 5-cent stamps. Theorem. For all n ≥ 8, P(n) holds, where P(n): n can be made using 3-cent and 5-cent stamps. or P(n): n = b*3 + c*5 for some natural numbers b and c

Using stamps for money Theorem. For all n ≥ 8, P(n) holds, where P(n): n can be made using 3-cent and 5-cent stamps. Proof. Base cases: P(8) and P(9). Make 8 using a 3-cent and a 5-cent stamp. Make 9 using three 3-cent stamps. Sometimes, it helps to have more than one base case!!!

Using stamps for money Theorem. For all n ≥ 8, P(n) holds, where P(n): n can be made using 3-cent and 5-cent stamps. Inductive case: Assume inductive hypothesis P(n) for n≥9. Prove P(n+1): Case 1: The pile that adds up to n has a 5-cent stamp. Take out one 5-cent stamp and put in two 3-cent stamps. Pile now adds up to n+1 Case 2: The pile that adds up to n has no 5-cent stamps. Since n≥9, the pile has at least three 3-cent stamps. Take three of them out and put in two 5-cent stamps. Pile no add up to n+1. Q.E.D. Quit.End.Done.

When induction fails Sometimes, an inductive proof strategy for some proposition may fail. This does not necessarily mean that the proposition is wrong. –It just means that the inductive strategy you are trying fails. A different induction or a different proof strategy altogether may succeed.

Strong induction Prove P(n) for all n≥0. Proof by weak induction: –Base case: prove P(0). –Inductive case: Assume P(k) for k≥0 and prove P(k+1). Proof by strong induction: –Base case: prove P(0), –Inductive case: Assume P(1), P(2), …, P(k) for k≥0 and prove P(k+1). Both techniques are equally powerful (but proof by strong induction is sometimes easier)!!!! No big deal, whether you use one or the other. So forget about the difference between them!

Theorem: every int > 1 is divisible by a prime Definition: n is a prime if n ≥ 2 and the only positive ints that divide n are 1 and n. Theorem: For all n ≥ 2, P(n) holds, where P(n): n is divisible by a prime. Proof: Base cases: P(p) where p is a prime!!!!!!!! Since p is a prime, it is divisible by itself. Inductive cases: Prove P(k) for non-prime k, using the inductive hypotheses P(2), P(3), …, P(k-1). Since k is not a prime, by definition, it is divisible by some int b (say) in 2..k-1. P(b) holds, so some prime divides b. Since b divides k, that prime divides k as well. Q.E.D.

Editorial comments Induction is a powerful technique for proving propositions. We used recursive definition of functions as a step towards formulating inductive proofs. However, recursion is useful in its own right. There are closed-form expressions for sum of cubes of natural numbers, sum of fourth powers etc. (see any book on number theory).