Induction Rosen 5 Lecture 8: Oct 29, 30.

Slides:



Advertisements
Similar presentations
Mathematical Induction
Advertisements

PROOF BY CONTRADICTION
Mathematical induction Isaac Fung. Announcement ► Homework 1 released ► Due on 6 Oct 2008 (in class)
Mathematical Induction II Lecture 14: Nov
Mathematical Induction
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 Lecture 5: Sep 21 (chapter of the book and chapter of the notes)
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:
1 Intro to Induction Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong.
1 Mathematical Induction. 2 Mathematical Induction: Example  Show that any postage of ≥ 8¢ can be obtained using 3¢ and 5¢ stamps.  First check for.
CSE115/ENGR160 Discrete Mathematics 03/22/12 Ming-Hsuan Yang UC Merced 1.
Strong Induction, WOP and Invariant Method Leo Cheung.
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.
Methods of Proof Lecture 4: Sep 16 (chapter 3 of the book)
1 Strong Mathematical Induction. Principle of Strong Mathematical Induction Let P(n) be a predicate defined for integers n; a and b be fixed integers.
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 (chapter of the book and chapter of the notes)
Induction and recursion
Induction and recursion
Introduction to 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!
1 Introduction to Abstract Mathematics Chapter 4: Sequences and Mathematical Induction Instructor: Hayk Melikya 4.1- Sequences. 4.2,
Methods of Proof. This Lecture Now we have learnt the basics in logic. We are going to apply the logical rules in proving mathematical theorems. Direct.
Discrete Mathematics Tutorial 11 Chin
Methods of Proof Lecture 3: Sep 9. This Lecture Now we have learnt the basics in logic. We are going to apply the logical rules in proving mathematical.
Mathematical Induction I Lecture 4: Sep 16. This Lecture Last time we have discussed different proof techniques. This time we will focus on probably 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.
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)
1 INFO 2950 Prof. Carla Gomes Module Induction Rosen, Chapter 4.
1 Mathematical Induction CS 202 Epp, chapter 4. 2.
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.
Mathematical Induction
Copyright © Zeph Grunschlag, Induction Zeph Grunschlag.
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 I Lecture 5: Sep 20 (chapter of the textbook and chapter of the course notes)
Section 1.7. Definitions A theorem is a statement that can be shown to be true using: definitions other theorems axioms (statements which are given as.
Methods of Proof Lecture 4: Sep 20 (chapter 3 of the book, except 3.5 and 3.8)
1 Discrete Mathematical Mathematical Induction ( الاستقراء الرياضي )
Mathematical Induction EECS 203: Discrete Mathematics Lecture 11 Spring
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.
Induction (chapter of the book and chapter of the notes)
Chapter 1 Logic and Proof.
Hubert Chan (Chapters 1.6, 1.7, 4.1)
The Foundations: Logic and Proofs
Advanced Algorithms Analysis and Design
Mathematical Induction II
Induction and recursion
Predicate Calculus Validity
CSE 311: Foundations of Computing
Hubert Chan (Chapters 1.6, 1.7, 4.1)
Gray Code Can you find an ordering of all the n-bit strings in such a way that two consecutive n-bit strings differed by only one bit? This is called the.
Chapter 5 Induction and Recursion
Discrete Mathematics and its Applications
Induction and recursion
Exercise Use mathematical induction to prove the following formula.
Methods of Proof Rosen 1.7, 1.8 Lecture 4: Sept 24, 25.
Module #13: Inductive Proofs
Induction Chapter
Advanced Analysis of Algorithms
Discrete Mathematics and its Applications
Agenda Proofs (Konsep Pembuktian) Direct Proofs & Counterexamples
Methods of Proof Rosen 1.7, 1.8 Lecture 4: Sept, 2019.
Presentation transcript:

Induction Rosen 5 Lecture 8: Oct 29, 30

Odd Powers Are Odd Fact: If m is odd and n is odd, then nm is odd. Proposition: for an odd number m, mk is odd for all non-negative integer k. Let P(i) be the proposition that mi is odd. Idea of induction. P(1) is true by definition. P(2) is true by P(1) and the fact. P(3) is true by P(2) and the fact. P(i+1) is true by P(i) and the fact. So P(i) is true for all i.

Divisibility by a Prime Theorem. Any integer n > 1 is divisible by a prime number. Let n be an integer. If n is a prime number, then we are done. Otherwise, n = ab, both are smaller than n. If a or b is a prime number, then we are done. Otherwise, a = cd, both are smaller than a. If c or d is a prime number, then we are done. Otherwise, repeat this argument, since the numbers are getting smaller and smaller, this will eventually stop and we have found a prime factor of n. We have seen this Example already!

Idea of Induction Objective: Prove This is to prove The idea of induction is to first prove P(0) unconditionally, then use P(0) to prove P(1) then use P(1) to prove P(2) and repeat this to infinity…

Much easier to prove with P(n) as an assumption. The Induction Rule 0 and (from n to n +1), proves 0, 1, 2, 3,…. P (0), P (n)P (n+1) mN. P (m) Much easier to prove with P(n) as an assumption. Very easy to prove For any n>=0 Like domino effect…

Proof by Induction Let’s prove: Statements in green form a template for inductive proofs. Proof: (by induction on n) The induction hypothesis, P(n), is:

Proof by Induction Induction Step: Assume P(n) for some n  0 and prove P(n + 1): Have P (n) by assumption: So let r be any number  1, then from P (n) we have How do we proceed?

Proof by Induction adding r n+1 to both sides, But since r  1 was arbitrary, we conclude, that which is P (n+1). This completes the induction proof.

Proving an Equality Let P(n) be the induction hypothesis that the statement is true for n. Base case: P(1) is true Induction step: assume P(n) is true, prove P(n+1) is true. by induction

Proving a Property Base Case (n = 1): Induction Step: Assume P(i) for some i  1 and prove P(i + 1): Assume is divisible by 3, prove Is divisible by 3. Divisible by 3 Divisible by 3 by induction

Proving an Inequality Base Case (n = 3): Induction Step: Assume P(i) for some i  3 and prove P(i + 1): Assume , prove by induction since i >= 3

Unstacking Game a b a+b Start: a stack of boxes Move: split any stack into two stacks of sizes a,b>0 Scoring: ab points Keep moving: until stuck Overall score: sum of move scores a b a+b

Unstacking Game n n-1 1 What is the best way to play this game? Suppose there are n boxes. What is the score if we just take the box one at a time? n n-1 1

Not better than the first strategy! Unstacking Game What is the best way to play this game? n 2n Suppose there are n boxes. What is the score if we cut the stack into half each time? Not better than the first strategy! Say n=8, then the score is 1x4x4 + 2x2x2 + 4x1 = 28 first round second third Say n=16, then the score is 8x8 + 2x28 = 120

Unstacking Game Base case n = 0: Claim: Every way of unstacking gives the same score. Claim: Starting with size n stack, final score will be Proof: by Induction with Claim(n) as hypothesis Base case n = 0: score = 0 Claim(0) is okay.

Unstacking Game Inductive step. assume for n-stack, and then prove C(n+1): (n+1)-stack score = Case n+1 = 1. verify for 1-stack: score = 0 C(1) is okay.

Unstacking Game Case n+1 > 1. So split into an a-stack and b-stack, where a + b = n +1. (a + b)-stack score = ab + a-stack score + b-stack score by induction: a-stack score = b-stack score =

Unstacking Game (a + b)-stack score = ab + a-stack score + b-stack score so C(n+1) is okay. We’re done!

Puzzle Goal: tile the squares, except one in the middle for Bill.

Puzzle There are only L-shaped tiles covering three squares: For example, for 8 x 8 puzzle might tile for Bill this way:

Puzzle Theorem: For any 2n x 2n puzzle, there is a tiling with Bill in the middle. Did you remember that we proved is divisble by 3? Proof: (by induction on n) P(n) ::= can tile 2n x 2n with Bill in middle. Base case: (n=0) (no tiles needed)

Puzzle Induction step: assume can tile 2n x 2n, prove can handle 2n+1 x 2n+1. 1 2 + n Now what??

Strong Induction Prove P(0). Strong induction Then prove P(n+1) assuming all of P(0), P(1), …, P(n) (instead of just P(n)). Conclude n.P(n) Strong induction equivalent Ordinary induction 0  1, 1  2, 2  3, …, n-1  n. So by the time we got to n+1, already know all of P(0), P(1), …, P(n)

Prime Products Claim: Every integer > 1 is a product of primes. Proof: (by strong induction) Base case is easy. Suppose the claim is true for all 2 <= i < n. Consider an integer n. If n is prime, then we are done. So n = k·m for integers k, m where n > k,m >1. Since k,m smaller than n, By the induction hypothesis, both k and m are product of primes k = p1 p2   p94 m = q1 q2   q214

n = k m = p1 p2   p94 q1 q2   q214 Prime Products Claim: Every integer > 1 is a product of primes. …So n = k m = p1 p2   p94 q1 q2   q214 is a prime product.  This completes the proof of the induction step.

Postage by Strong Induction Available stamps: 5¢ 3¢ What amount can you form? Theorem: Can form any amount  8¢ Prove by strong induction on n. P(n) ::= can form (n +8)¢. Challenge for the Bored!