Mathematical Induction What it is? Why is it a legitimate proof method? How to use it?

Slides:



Advertisements
Similar presentations
PROOF BY CONTRADICTION
Advertisements

Prof. Shachar Lovett Clicker frequency: CA CSE 20 Discrete math Prof. Shachar Lovett
Recursive Definitions and Structural Induction
MA/CSSE 473/474 How (not) to do an induction proof.
Copyright © Cengage Learning. All rights reserved. CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION.
Induction and Recursion. Odd Powers Are Odd Fact: If m is odd and n is odd, then nm is odd. Proposition: for an odd number m, m k is odd for all non-negative.
Induction and recursion
CSE115/ENGR160 Discrete Mathematics 04/03/12 Ming-Hsuan Yang UC Merced 1.
Induction Sections 41. and 4.2 of Rosen Fall 2008 CSCE 235 Introduction to Discrete Structures Course web-page: cse.unl.edu/~cse235 Questions:
Recursive Definitions Rosen, 3.4. Recursive (or inductive) Definitions Sometimes easier to define an object in terms of itself. This process is called.
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.
CSE115/ENGR160 Discrete Mathematics 03/22/12 Ming-Hsuan Yang UC Merced 1.
CSE115/ENGR160 Discrete Mathematics 03/31/11
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.
Induction and recursion
What it is? Why is it a legitimate proof method? How to use it?
Methods of Proof & Proof Strategies
Recursive Definitions and Structural Induction
Making an Argument The goal of communication is to achieve the desired affect on the target audience. Often we want to convince the audience of something.
Mathematical Maxims and Minims, 1988
Induction and recursion
Chapter 6 Mathematical Induction
Discrete Mathematics, 1st Edition Kevin Ferland
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
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!
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Chapter 4 Induction and Recursion 歐亞書局.
1 Introduction to Abstract Mathematics Chapter 4: Sequences and Mathematical Induction Instructor: Hayk Melikya 4.1- Sequences. 4.2,
Copyright © Peter Cappello Mathematical Induction Goals Explain & illustrate construction of proofs of a variety of theorems using mathematical induction.
MATH 224 – Discrete Mathematics
Chapter 4: Induction and Recursion
Section 5.3. Section Summary Recursively Defined Functions Recursively Defined Sets and Structures Structural Induction.
March 3, 2015Applied Discrete Mathematics Week 5: Mathematical Reasoning 1Arguments Just like a rule of inference, an argument consists of one or more.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Discrete Mathematics Tutorial 11 Chin
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
Module #13: Inductive Proofs Rosen 5 th ed., § inference of a generalized conclusion from particular instances 2. mathematical demonstration of the.
4.3 Recursive Definitions and Structural Induction Sometimes it is difficult to define an object explicitly. However, it may be easy to define this object.
Induction Proof. Well-ordering A set S is well ordered if every subset has a least element. [0, 1] is not well ordered since (0,1] has no least element.
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.
ICS 253: Discrete Structures I Induction and Recursion King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl 1/18 Module.
CompSci 102 Discrete Math for Computer Science March 1, 2012 Prof. Rodger Slides modified from Rosen.
CS 103 Discrete Structures Lecture 13 Induction and Recursion (1)
Foundations of Discrete Mathematics Chapters 5 By Dr. Dalia M. Gil, Ph.D.
1 Recursive Definitions and Structural Induction CS 202 Epp section ??? Aaron Bloomfield.
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.
Copyright © Zeph Grunschlag, Induction Zeph Grunschlag.
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.
Mathematical Induction
6/12/2016 Prepared by Dr.Saad Alabbad1 CS100 : Discrete Structures Proof Techniques(2) Mathematical Induction & Recursion Dr.Saad Alabbad Department of.
Chapter 5 With Question/Answer Animations 1. Chapter Summary Mathematical Induction - Sec 5.1 Strong Induction and Well-Ordering - Sec 5.2 Lecture 18.
Section Recursion 2  Recursion – defining an object (or function, algorithm, etc.) in terms of itself.  Recursion can be used to define sequences.
Fall 2002CMSC Discrete Structures1 Chapter 3 Sequences Mathematical Induction Recursion Recursion.
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.
Chapter 4: Induction and Recursion
Chapter 4 (Part 1): Induction & Recursion
CS2210:0001Discrete Structures Induction and Recursion
Chapter 3 The Real Numbers.
Induction and recursion
Induction and Recursion
Mathematical Induction Recursion
Chapter 5 Induction and Recursion
Induction and recursion
Applied Discrete Mathematics Week 9: Integer Properties
Copyright © Cengage Learning. All rights reserved.
Mathematical Induction
Presentation transcript:

Mathematical Induction What it is? Why is it a legitimate proof method? How to use it?

Induction Proofs Outline Foundation: logic background the well-ordering principle. What is the principle of Mathematical induction? Induction in Action How not to do induction proofs Strong Induction

Implication: A  B, where A and B are boolean values. If A, then B –If it rains today, I will use my umbrella. When is this statement true? –When I use my umbrella –When it does not rain When is it false? –Only when it rains and I do not use my umbrella. Some Logic Background ABABAB TTT TFF FTT FFT

Conclusions: –If we know that A  B is true, and B is false, then A must be … –Another expression that is equivalent to A  B: ¬ A OR B (think about the truth table for ¬A OR B ) –What similar expression is equivalent to ¬(A  B)? Implication: A  B ABABAB TTT TFF FTT FFT If A  B is true, and B is false, then A must be false Answer to last question: A AND ¬ B

¬B  ¬A is called the contrapositive of A  B Notice that the third and sixth columns of the truth table are the same. Thus an implication is true if and only if its contrapositive is true. Contrapositive of A  B ABABAB¬B¬A¬B  ¬A TTTFFT TFFTFF FTTFTT FFTTTT

If A is a boolean value, the value of the expression A AND ¬A is _____. This expression is known as a contradiction. Putting this together with what we saw previously, if B  (A AND ¬A) is True, what can we say about B? This is the basis for “proof by contradiction”. –To show that B is true, we find an A for which we can show that ¬B  (A AND ¬A) is true. –This is the approach we will use in our proof that Mathematical induction works. Contradictions Answer to question: False:

It's an axiom, not something that we can prove. WOP: Every non-empty set of non-negative integers has a smallest element. Note the importance of "non-empty", "non-negative", and "integers". –The empty set does not have a smallest element. –A set with no lower bound (such as the set of all integers) does not have a smallest element. In the statement of WOP, we can replace "positive" with "has a lower bound" –Unlike integers, a set of rational numbers can have a lower bound but no smallest member: {1/3, 1/5, 1/7, 1/9, … } Assuming the well-ordering principle, we will prove that the principle of mathematical induction is true. The Well-ordering principle

In this course, it will usually be a property of positive integers (or non-negative integers, or integers larger than some specific number). A property p(n) is a boolean statement about the integer n. [ p: int  boolean ] –Example: p(n) could be "n is an even number". –Then p(4) is true, but p(3) is false. If we believe that some property p is true for all positive integers, induction gives us a way of proving it. What kind of things do we try to prove via Mathematical Induction?

To prove that p(n) is true for all n  n 0 : Show that p(n 0 ) is true. Show that for all k  n 0, p(k) implies p(k+1). I.e, show that whenever p(k) is true, then p(k+1) is true also. The Principle of Mathematical Induction

To prove that p(n) is true for all n  n 0 : Show that p(n 0 ) is true. Show that for all k  n 0, p(k) implies p(k+1). I.e, if p(k) is true, then p(k+1) is true also Why does induction work? (Informal look) Pictures from Ralph Grimaldi's discrete math book. First bullet, third picture. Second bullet, second picture. They all fall down!

Next we focus on a formal proof of this, because: –Some people may not be convinced by the informal one –The proof itself illustrates some important proof techniques Why does induction work?

Let p be a property (p: int  boolean). Hypothesis: a)p(n 0 ) is true. b)For all k  n 0, p(k) implies p(k+1). I.e, if p(k) is true, then p(k+1) is true also Desired C onclusion: If n is any integer with n  n 0, then p(n) is true. If we can prove this, then induction is a legitimate proof method. Proof that the conclusion follows from the hypothesis: Let S be the set {n  n 0 : p(n) is false}. It suffices to show that S is empty. We do it by contradiction. –Assume that S is non-empty and show that this leads to a contradiction. Proof that induction works (Overview)

Hypothesis: a)p(n 0 ) is true. b)For all k  n 0, p(k) implies p(k+1). Desired C onclusion: If n is any integer with n  n 0, then p(n) is true. If this conclusion is true, induction is a legitimate proof method. Proof: Assume a) and b). Let S be the set {n  n 0 : p(n) is false}. We want to show that S is empty; we do it by contradiction. –Assume that S is non-empty. Then the well-ordering principle says that S has a smallest element (call it s min ). We try to show that this leads to a contradiction. – Note that p(s min ) has to be false. Why? –s min cannot be n 0, by hypothesis (a). Thus s min must be > n 0. Why? –Thus smin-1  n 0. Since s min is the smallest element of S, s min -1 cannot be an element of S. What does this say about p (s min – 1)? p(s min -1) is true. –By hypothesis (b), using the k= s min -1 case, p(s min ) is also true. This contradicts the previous statement that p(s min ) is false. –Thus the assumption that led to this contradiction (S is nonempty) must be false. –Therefore S is empty, and p(n) is true for all n  n 0. Proof that induction works (more details)

To prove that p(n) is true for all n  n 0 : a)Show that p(n 0 ) is true. b)Show that for all k  n 0, p(k) implies p(k+1). I.e, show that whenever p(k) is true, then p(k+1) is true also. Let’s do it! Recap: The Principle of Mathematical Induction

To prove: What is the base case? Induction hypothesis? What do we need to show in the induction step? Procedural matters: –Start with one side of the equation/inequality and work toward the other side. –DO NOT use the “ write what we want to prove and do the same thing to both sides of the equation to work backwards to what we are assuming" approach. –Clearly indicate the step in which you use the induction hypothesis. Induction example Details on next slide

Induction example More etails on next slide

Induction Example continued Note that every step proceeds in the same direction. We never "do the same thing" to both sides of an equation.

When we write a recursive program, we make it work for the base case(s). –Then, assuming that it works for smaller values, we use the solution for a smaller value to construct a solution for a larger value. To prove that a property p(n) is true for all n>0 using (strong) mathematical induction, –we show that it is true for the base case (typically n=0 or n=1), and that the truth of p(k) for larger values of k can be derived from the truth of p(j) for all j with n 0  j < k. Induction is like Recursion

STRONG INDUCTION

The following are sufficient to prove that p(n) is true for all n  n 0 (i) p(n 0 ) is true. (ii) for every k>n 0, if p(j) is true for all j with n 0  j < k, then p(k) is also true. Note that we can prove this directly from the Well- Ordering Principle. –You may be asked to do that in the homework –The proof is almost the same as the proof of ordinary induction. Also note that ordinary induction is a special case of strong induction, in which we only assume the truth of p for j=k-1. Strong induction

How do we actually construct a proof by strong induction? To show that p(n) is true for all n  n 0 : –Step 0: Believe in the "magic." You will show that it's not really magic at all. But you have to believe. If, when you are in the middle of an induction proof, you begin to doubt whether the principle of mathematical induction itself is true, you are sunk! So even if you have some trouble understanding the proof of the principle of mathematical induction, you must believe its truth if you are to be successful in using it to prove things. Proving Something Using Strong Induction

How do we actually construct a proof by strong induction? To show that p(n) is true for all n  n 0 : Step 1 (base case): Show that p(n 0 ) is true. – Depending on the nature of the induction step (ii), it may also be necessary to show some other base cases as well. –For example, an induction proof involving Fibonacci numbers may need two base cases, because the recursive part of the Fibonacci definition expresses F(n) as the sum of two previous values. Proving Something Using Strong Induction

How do we actually construct a proof by induction? To show that p(n) is true for all n  n 0 : Step 2 (induction step) –Let k be any number that is greater than n 0. You can't pick some specific k, you have to do this step for a generic k that is greater than n 0. –Assume that p(j) is true for all j that are less than k (and also  n 0, of course). – This is called the induction assumption, and is akin to the assumption that recursive calls to a procedure will work correctly. –Then show that p(k) must also be true, using the induction assumption somewhere along the way. Proving Something Using Strong Induction

Every integer n≥1 is a product of zero or more prime integers Proof by strong induction: Base case. n=1 is a product of zero prime integers Induction step. Let k be an integer that is greater than 1 The induction assumption is that every positive integer smaller than k is a product of prime integers We must show that k is a product of prime integers –If k is prime, then clearly k is the product of one prime integer –Otherwise k is a composite integer: i.e., k = j*m, where integers j and m are both greater than one –Since j and m are both larger than 1, j<k and m<k –Thus by the induction assumption, m and j are both products of prime integers, and so k = jm is a product of prime integers This would be very difficult to prove using ordinary induction Example

A Binary Tree is either –empty, or –consists of: a distinguished node called the root, which contains an element, and A left subtree T L, which is a binary tree A right subtree T R, which is a binary tree root TLTL TRTR Binary Tree: Recursive definition

Figure Recursive view of the node height calculation: H T = Max (H L + 1, H R + 1) Data Structures & Problem Solving using JAVA/2E Mark Allen Weiss © 2002 Addison Wesley

Example: a property of binary trees Let H(T) be the height of a binary tree T. Let N(T) be the size (number of nodes) of T. Then N(T) ≤ 2 H(T) Proof by strong induction: Base case: H(T) = -1 (tree is empty). –Left side of inequality is 0 –Right side is = 0 –Inequality is true.

A Binary Tree is either –empty, or –consists of: a distinguished node called the root, which contains an element, and A left subtree T L, which is a binary tree A right subtree T R, which is a binary tree root TLTL TRTR Binary Tree: Recursive definition

A Binary Tree is either –empty, or –consists of: a distinguished node called the root, which contains an element, and A left subtree T L, which is a binary tree A right subtree T R, which is a binary tree root TLTL TRTR Binary Tree: Recursive definition

Induction step Let T be a tree with j > 0 nodes. Assume that the property is true for all smaller trees. In particular, it is true for T's two subtrees. Thus N(T) = 1 + N(T L )+N(T R ) [every node is the root or is in a subtree] ≤ h(T L ) h(T R ) [induction assumption] = 2 h(T L ) h(T R ) [rearrange and combine constants] ≤ 2 h(T) + 2 h(T) -1 [height of tallest subtree is one less than height of T] = 2(2 h(T) ) - 1 = h(T) – 1 = 2 h(T)+1 – 1 [Algebra]