Solutions of Final 2

Solutions of Final 2 - .. T(2)-T(0) = log(2) The sum of all...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Solutions of Final 2 Question 2 a. T(n) = T(n/2) + T (n 1/2 ) + n Let n 1/2 = m T(m 2 ) = T(m 2 /2) + T(m) + m 2 T(m 2 /2) - m 2 = T(m) Therefore, T(m) = O(m 2 ) By Re-Substituting, T(n 1/2 ) = O(n) T(n) = O(n 2 ) b. T(n) =T(n-2) + log n T(n) – T(n-2) = log (n) T(n-2)-T(n-4)=log(n-2) T(n-4)-T(n-6)=log(n-4)
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: .. T(2)-T(0) = log(2) The sum of all of these equations is T(n) T(0) = log(n) + log(n-2)++log(2) //using telescopic summation T(n) T(0)=log(n*(n-2)*(n-4). .) Assume that T(0) is constant, therefore T(n) =O( log(n!))...
View Full Document

This note was uploaded on 11/09/2010 for the course CS 11841 taught by Professor Dr.ayman during the Spring '09 term at Alexandria University.

Page1 / 2

Solutions of Final 2 - .. T(2)-T(0) = log(2) The sum of all...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online