This preview shows pages 1–7. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 1 COMP170 Discrete Mathematical Tools for Computer Science Discrete Math for Computer Science K. Bogart, C. Stein and R.L. Drysdale Section 4.5, pp. 189193 Advanced Induction Version 2.0: Last updated, May 13, 2007 Slides c 2005 by M. J. Golin and G. Trippen 2 Note: We have skipped section 4.4 of the textbook because the material it contains, especially the Master Theorem , will be taught in later classes, e.g., COMP271 3 More Advanced Induction • Induction, as we’ve seen it so far, was about defining a statement p ( n ) , and then proving • In “practice”, in some real induction proofs, p ( n ) might not be fullly defined before we start the proof and will only be fully described during the description of the proof • In some cases it also helps to use a stronger induction hypothesis than the “natural” one. p ( n 1) ⇒ p ( n ) or ( p (1) ∧ p (2) ∧ ··· ∧ p ( n 1)) ⇒ p ( n ) 4 If T ( n ) ≤ 2 T ( n/ 2) + cn for some constant c , then T ( n ) = O ( n log n ) . If T ( n ) ≤ T ( n/ 3) + cn for some constant c , then T ( n ) = O ( n ) . If T ( n ) ≤ 4 T ( n/ 2) + cn for some constant c , then T ( n ) = O ( n 2 ) . We will illustrate these concepts with three example proofs: Example 1 Example 3 Example 2 Examples 1 & 2 will illustrate how to derive the induction statement p ( n ) while proving p ( n ) Example 3 will illustrate what is meant by using a stronger induction hypothesis. 5 As before we will assume that n is a power of 2 From definition of big O we need to show that A naive induction proof would assume that (*) T ( n ) ≤ kn log n was true for n = 2 i 1 and then prove that (*) was also true for n = 2 i if T ( n ) ≤ 2 T ( n/ 2) + cn for some constant c , then T ( n ) = O ( n log n ) . ∃ n , k such that ∀ n > n , T ( n ) ≤ kn log n Our problem is that we do not know what k is so we can’t prove (*) Example 1: 6 We want to prove that if, for all n = 2 i , T ( n ) ≤ 2 T ( n/ 2) + cn for some constant c , ⇒ ∀ n > n , T ( n ) ≤ kn log n Our proof will be by induction,...
View
Full
Document
 Spring '10
 M.J.Golin
 Computer Science

Click to edit the document details