3 is \u0398 3 10 Tutorial exercise 1 Solution To prove \u0398 we need to prove for both \u039f

3 is θ 3 10 tutorial exercise 1 solution to prove θ

This preview shows page 10 - 14 out of 18 pages.

3 is Θ ? 3 . 10
Tutorial exercise 1 Solution To prove Θ , we need to prove for both Ο and Ω . ? ? = ? + log ? 3 As 0 ≤ log ? ≤ ? , ? 3 ≤ ? ? 2? 3 If we pick ? 0 = 1, ? 1 = 1, ? 2 = 8 , then ∀? > ? 0 , 0 < ? 1 ? 3 ≤ ? ? ≤ ? 2 ? 3 Hence ? ? is Θ ? 3 . 11
Part II Q3a)Derive a recursive algorithm that find maximum value in array A as follow.If the array has only one element, output the element directlyIf the array has two elements, make one comparison and output the maximumIf there are more than two elements in the array, split the array into two halves 𝐴and 𝐴Find the maximum values for 𝐴?and 𝐴𝑟respectivelyCompare the two maximumsb)Let ?(?)be the number of array element comparisons made, assuming ? = 2?for some integer ? > 0, derive a recurrence equation for ?? .c)Solve ?? ? 𝑟 . 12
13

You've reached the end of your free preview.

Want to read all 18 pages?

• Fall '14
• lim, Computational complexity theory