This preview shows pages 1–9. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1-1More Advanced Induction ExamplesLast updated April 27, 20102-1The problems on the following page aretaken from the COMP170 Final Exam,Fall 2007.3-1Assume thatnis a nonnegative power of3.Iff(n)andg(n)are functions, to prove thatf(n) =O(g(n)),you must prove that there exist somen≥andc >suchthat∀n > n,f(n)≤cg(n)3-2Assume thatnis a nonnegative power of3.Iff(n)andg(n)are functions, to prove thatf(n) =O(g(n)),you must prove that there exist somen≥andc >suchthat∀n > n,f(n)≤cg(n)(a)T(n)≤2T(n3)+ 4n,Prove thatT(n) =O(n).(b)T(n)≤3T(n3)+ 4n, Prove thatT(n) =O(nlogn).(c)T(n)≤9T(n3)+ 4n,Prove thatT(n) =O(n2).For all 3 problems that follow, assumeT(1) = 9.If, forn >1,4-1(a)T(1) = 9,and∀n >1,T(n)≤2T(n3)+ 4nProveT(n) =O(n).4-2(a)T(1) = 9,and∀n >1,T(n)≤2T(n3)+ 4nProveT(n) =O(n).Letn= 0. In order thatT(1)≤cnwe must havec≥9.4-3(a)T(1) = 9,and∀n >1,T(n)≤2T(n3)+ 4nProveT(n) =O(n).Letn= 0. In order thatT(1)≤cnwe must havec≥9.Now suppose that the statementT(n)≤cnis correct foralln= 3j,j= 0,1,2,...,i-1. Whenn= 3iwe use theinductive hypothesis to getT(n)≤2Tn3+ 4n≤2cn3+ 4n=2c3+ 4nAs long as2c3+4≤c,i.e.,12≤c, we then haveT(n)≤cn.4-4(a)T(1) = 9,and∀n >1,T(n)≤...
View Full Document