241-303 Discrete Maths: Induction/1 1 Discrete Maths Objective – –to introduce mathematical induction through examples 241-303, Semester 1 2014-2015 1.

Slides:



Advertisements
Similar presentations
Mathematical Induction
Advertisements

PROOF BY CONTRADICTION
Lecture 11 Mathematical Induction CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Proofs, Recursion and Analysis of Algorithms Mathematical Structures for Computer Science Chapter 2 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProofs,
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
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.
1 Intro to Induction Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong.
TR1413: INTRO TO DISCRETE MATHEMATICS LECTURE 2: MATHEMATICAL INDUCTION.
Data Structures, Spring 2006 © L. Joskowicz 1 Data Structures – LECTURE 3 Recurrence equations Formulating recurrence equations Solving recurrence equations.
CSS342: Induction1 Professor: Munehiro Fukuda. CSS342: Induction2 Today’s Topics Review of sequence and summations Mathematical induction Strong form.
Problems to Solve Involving Induction Proof by Induction Basis Step: Does it work for n=0?
Copyright © Cengage Learning. All rights reserved.
Copyright © 2007 Pearson Education, Inc. Slide 8-1.
Discrete Maths Objective to show the close connection between recursive definitions and recursive functions , Semester 2, Recursion.
Algorithm Design and Analysis (ADA)
What it is? Why is it a legitimate proof method? How to use it?
ICS 253 Presents Mathematical Induction Sultan Almuhammadi muhamadi
MATH 224 – Discrete Mathematics
Inductive Proof (the process of deriving generalities from particulars) Mathematical Induction (reasoning over the natural numbers)
Discrete Maths Objective to introduce mathematical induction through examples , Semester 2, Mathematical Induction 1.
MATH 224 – Discrete Mathematics
9.4 Mathematical Induction
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.
Mathematical Background and Linked Lists. 2 Iterative Algorithm for Sum Find the sum of the first n integers stored in an array v : sum (v[], n) temp_sum.
Proofs, Induction and Recursion Basic Proof Techniques Mathematical Induction Recursive Functions and Recurrence Relations.
Analysis of Algorithms CS 477/677 Instructor: Monica Nicolescu Lecture 3.
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.
Chapter 1: Introduction
Inductive Proofs and Inductive Definitions Jim Skon.
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.
1 2/21/2016 MATH 224 – Discrete Mathematics Sequences and Sums A sequence of the form ar 0, ar 1, ar 2, ar 3, ar 4, …, ar n, is called a geometric sequence.
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.
Proofs, Recursion and Analysis of Algorithms Mathematical Structures for Computer Science Chapter 2 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProofs,
Discrete Maths: Invariant/2 1 Discrete Maths Objectives – –to show the use of induction for proving properties of code involving loops use induction.
Mathematical Induction I Lecture 5: Sep 20 (chapter of the textbook and chapter of the course notes)
Section 8.4 Mathematical Induction. Mathematical Induction In this section we are going to perform a type of mathematical proof called mathematical induction.
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.
1 Discrete Mathematical Mathematical Induction ( الاستقراء الرياضي )
Mathematical Induction EECS 203: Discrete Mathematics Lecture 11 Spring
Mathematical Induction What it is? Why is it a legitimate proof method? How to use it?
Fall 2002CMSC Discrete Structures1 Chapter 3 Sequences Mathematical Induction Recursion Recursion.
Advanced Algorithms Analysis and Design By Dr. Nazir Ahmad Zafar Dr Nazir A. Zafar Advanced Algorithms Analysis and Design.
Proof by Induction CSC 172 SPRING 2002 LECTURE 7.
Mathematical Induction. The Principle of Mathematical Induction Let S n be a statement involving the positive integer n. If 1.S 1 is true, and 2.the truth.
Induction (chapter of the book and chapter of the notes)
Hubert Chan (Chapters 1.6, 1.7, 4.1)
11.7 – Proof by Mathematical Induction
MATH 224 – Discrete Mathematics
Analysis of Algorithms CS 477/677
CSE 311: Foundations of Computing
Hubert Chan (Chapters 1.6, 1.7, 4.1)
Mathematical Induction Recursion
Chapter 5 Induction and Recursion
CSE373: Data Structures and Algorithms Lecture 2: Proof by Induction
Induction and recursion
Applied Discrete Mathematics Week 9: Integer Properties
Mathematical Induction
Follow me for a walk through...
Chapter 11: Further Topics in Algebra
Copyright © Cengage Learning. All rights reserved.
Follow me for a walk through...
Agenda Proofs (Konsep Pembuktian) Direct Proofs & Counterexamples
11.4 Mathematical Induction
Presentation transcript:

Discrete Maths: Induction/1 1 Discrete Maths Objective – –to introduce mathematical induction through examples , Semester Mathematical Induction

Discrete Maths: Induction/1 2 Overview 1. Motivation 2. Induction Defined 3.Maths Notation Reminder 4.Four Examples 5.More General Induction Proofs 6.A Fun Tiling Problem 7.Further Information

Discrete Maths: Induction/ Motivation Induction is used in mathematical proofs of many recursive algorithms – –e.g. quicksort, binary search Induction is used to mathematically define recursive data structures – –e.g. lists, trees, graphs continued

Discrete Maths: Induction/1 4 Induction is often used to derive mathematical estimates of program running time – – timings based on the size of input data e.g. time increases linearly with the number of data items processed – –timings based on the number of times a loop executes

Discrete Maths: Induction/ Induction Defined Induction is used to solve problems such as: – –is S(n) correct/true for all n values? usually for all n >= 0 or all n >=1 Example: – –let S(n) be "n > 0" – –is S(n) true for all n >= 1? continued S(n) can be much more complicated, such as a program that reads in a n value.

Discrete Maths: Induction/1 6 How do we prove (disprove) S(n)? One approach is to try every value of n: – –is S(1) true? – –is S(2) true? – –... – –is S(10,000) true? – –... forever!!! Not very practical

Discrete Maths: Induction/1 7 Induction to the Rescue Induction is a technique for quickly proving S(n) true or false for all n – –we only have to do two things First show that S(1) is true – –do that by calculation as before continued

Discrete Maths: Induction/1 8 Second, assume that S(n) is true, and use it to show that S(n+1) is true – –mathematically, we show that S(n) --> S(n+1) Now we know S(n) is true for all n>=1. Why? continued "--> stands for "implies"

Discrete Maths: Induction/1 9 With S(1) and S(n) --> S(n+1) then S(2) is true – –S(1) --> S(2) when n == 1 With S(2) and S(n) --> S(n+1) then S(3) is true – –S(2) --> S(3) when n == 2 With S(3) and S(n) --> S(n+1) then S(4) is true – –S(3) --> S(4) when n == 3 and so on, for all n

Discrete Maths: Induction/1 10 Let’s do it Prove S(n): "n > 0" for all n >= 1. First task: show S(1) is true – –S(1) == == 2, which is > 0 – –so S(1) is true Second task: show S(n+1) is true by assuming S(n) is true continued

Discrete Maths: Induction/1 11 Assume S(n) is true, so n 2 +1 > 0 Prove S(n+1) – –S(n+1) == (n+1) == n 2 + 2n == (n 2 + 1) + 2n + 1 – –since n > 0, then (n 2 + 1) + 2n + 1 > 0 – –so S(n+1) is true, by assuming S(n) is true – –so S(n) --> S(n+1) continued

Discrete Maths: Induction/1 12 We have used induction to show two things: – –S(1) is true – –S(n) --> S(n+1) is true From these it follows that S(n) is true for all n >= 1

Discrete Maths: Induction/1 13 Induction More Formally Three pieces: – –1. A statement S(n) to be proved the statement must be about an integer n – –2. A basis for the proof. This is the statement S(b) for some integer. Often b = 0 or b = 1. continued

Discrete Maths: Induction/ An inductive step for the proof. We prove the statement “S(n) --> S(n+1)” for all n. – –The statement S(n), used in this proof, is called the inductive hypothesis – –We conclude that S(n) is true for all n >= b S(n) might not be true for some n < b

Discrete Maths: Induction/ Maths Notation Reminder Summation: means …+n – –e.g.means …+m 2 Product: means 1*2*3*…*n

Discrete Maths: Induction/ Example 1 Prove the statement S(n): for all n >= 1 – –e.g = (4*5)/2 = 10 Basis. S(1), n = 1 so 1 = (1*2)/2 continued (1)

Discrete Maths: Induction/1 17 Induction. Assume S(n) to be true. Prove S(n+1), which is: Notice that: (2) (3) continued

Discrete Maths: Induction/1 18 Substitute the right hand side (rhs) of (1) for the first operand of (3), to give: = (n 2 + n + 2n + 2) /2 = (n 2 +3n+2)/2 which is (2)

Discrete Maths: Induction/1 19 Example 2 Prove the statement S(n): for all n >= 0 – –e.g = 16-1 Basis. S(0), n = 0 so 2 0 = continued (1)

Discrete Maths: Induction/1 20 Induction. Assume S(n) to be true. Prove S(n+1), which is: Notice that: (2) (3) continued

Discrete Maths: Induction/1 21 Substitute the right hand side (rhs) of (1) for the first operand of (3), to give: = 2*(2 n+1 ) - 1 which is (2) +1

Discrete Maths: Induction/1 22 Example 3 Prove the statement S(n): n! >= 2 n-1 for all n >= 1 – –e.g. 5! >= 2 4, which is 120 >= 16 Basis. S(1), n = 1:1! >= 2 0 so 1 >= 1 continued (1)

Discrete Maths: Induction/1 23 Induction. Assume S(n) to be true. Prove S(n+1), which is: (n+1)! >= 2 (n+1)-1 >= 2 n (2) Notice that: (n+1)! = n! * (n+1)(3) continued

Discrete Maths: Induction/1 24 Substitute the right hand side (rhs) of (1) for the first operand of (3), to give: (n+1)! >= 2 n-1 * (n+1) >= 2 n-1 * 2 since (n+1) >= 2 (n+1)! >= 2 n which is (2) why?

Discrete Maths: Induction/1 25 Example 4 Prove the statement S(n): for all n >= 1 – –This proof can be used to show that. the limit of the sum: is 1 Basis. S(1), n = 1 so 1/2 = 1/2 continued (1)

Discrete Maths: Induction/1 26 Induction. Assume S(n) to be true. Prove S(n+1), which is: Notice that: (2) (3) continued

Discrete Maths: Induction/1 27 Substitute the right hand side (rhs) of (1) for the first operand of (3), to give: = which is (2)

Discrete Maths: Induction/ More General Inductive Proofs There can be more than one basis case. We can do a complete induction (or “strong” induction) where the proof of S(n+1) may use any of S(b), S(b+1), …, S(n) – –b is the lowest basis value

Discrete Maths: Induction/1 29 Example We claim that every integer >= 24 can be written as 5a+7b for non-negative integers a and b. – –note that some integers < 24 cannot be expressed this way (e.g. 16, 23). Let S(n) be the statement (for n >= 24) “n = 5a + 7b, for a >= 0 and b >= 0” continued

Discrete Maths: Induction/1 30 Basis. The 5 basis cases are 24 through 28. – –24 = (5*2) + (7*2) – –25 = (5*5) + (7*0) – –26 = (5*1) + (7*3) – –27 = (5*4) + (7*1) – –28 = (5*0) + (7*4) continued

Discrete Maths: Induction/1 31 Induction: Let n+1 >= 29. Then n-4 >= 24, the lowest basis case. – –Thus S(n-4) is true, and we can write n - 4 = 5a + 7b – –Thus, n+1 = 5(a+1) + 7b, proving S(n+1)

Discrete Maths: Induction/ A Fun Tiling Problem A right tromino is a “corner” shape: Use induction to proof that right trominos can be used to tile (cover) any n*n size board, where n is a power of 2 and the board has 1 square missing. continued

Discrete Maths: Induction/1 33 For example, a 4*4 board (2 2 *2 2 ), minus 1 square:

Discrete Maths: Induction/ Further Information DM: section 1.6