This preview shows pages 1–13. 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 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 DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 11COMP170Discrete Mathematical Toolsfor Computer ScienceDiscrete Math for Computer ScienceK. Bogart, C. Stein and R.L. DrysdaleSection 4.5, pp. 189193Advanced InductionVersion 2.0: Last updated, May 13, 2007Slidesc2005 by M. J. Golin and G. Trippen21Note: We have skipped section 4.4 of the textbook becausethe material it contains, especially theMaster Theorem, willbe taught in later classes, e.g., COMP27131More Advanced Induction•Induction, as we’ve seen it so far, was aboutdefining a statementp(n), and then proving•In “practice”, in some real induction proofs,p(n)might not be fullly definedbeforewe start theproof and will only be fully describedduringthedescription of the proof•In some cases it also helps to use astrongerinduction hypothesis than the “natural” one.p(n1)⇒p(n)or(p(1)∧p(2)∧ ··· ∧p(n1))⇒p(n)41IfT(n)≤2T(n/2) +cnfor some constantc,thenT(n) =O(nlogn).IfT(n)≤T(n/3) +cnfor some constantc,thenT(n) =O(n).We will illustrate these concepts with three example proofs:Example 1Example 2Examples 1 & 2will illustrate how to derive the inductionstatementp(n)while provingp(n)42IfT(n)≤2T(n/2) +cnfor some constantc,thenT(n) =O(nlogn).IfT(n)≤T(n/3) +cnfor some constantc,thenT(n) =O(n).IfT(n)≤4T(n/2) +cnfor some constantc,thenT(n) =O(n2).We will illustrate these concepts with three example proofs:Example 1Example 3Example 2Examples 1 & 2will illustrate how to derive the inductionstatementp(n)while provingp(n)Example 3will illustrate what is meant by using astrongerinduction hypothesis.51ifT(n)≤2T(n/2) +cnfor some constantc,thenT(n) =O(nlogn).Example 1:52From definition of bigOwe need to show thatifT(n)≤2T(n/2) +cnfor some constantc,thenT(n) =O(nlogn).∃n, ksuch that∀n > n, T(n)≤knlognExample 1:53As before we will assume thatnis a power of2From definition of bigOwe need to show thatifT(n)≤2T(n/2) +cnfor some constantc,thenT(n) =O(nlogn).∃n, ksuch that∀n > n, T(n)≤knlognExample 1:54As before we will assume thatnis a power of2From definition of bigOwe need to show thatA naive induction proof would assume that(*)T(n)≤knlognwas true forn= 2i1and then prove that(*)was also true forn= 2iifT(n)≤2T(n/2) +cnfor some constantc,thenT(n) =O(nlogn).∃n, ksuch that∀n > n, T(n)≤knlognExample 1:55As before we will assume thatnis a power of2From definition of bigOwe need to show thatA naive induction proof would assume that(*)T(n)≤knlognwas true forn= 2i1and then prove that(*)was also true forn= 2iifT(n)≤2T(n/2) +cnfor some constantc,thenT(n) =O(nlogn).∃n, ksuch that∀n > n, T(n)≤knlognOur problem is that wedo not know whatkisso we can’t prove(*)Example 1:61We want to prove that if, for alln= 2i,T(n)≤2T(n/2) +cnfor some constantc,⇒ ∀n > n, T(n)≤knlogn(*)62We want to prove that if, for alln= 2i,T(n)≤2T(n/2) +cnfor some constantc,⇒ ∀n > n, T(n)≤knlognOur proof will be by induction,but with a twist....
View Full
Document
 Spring '10
 M.J.Golin
 Computer Science

Click to edit the document details