[SOLVED] CH08-320201-Homework 2 Merge Sort and Recurrences

25.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon 02_homeworkAlgo-2-vcbo1t.zip (6310 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
Rate this product

Problem 1: Merge Sort                                                                                                                                     

  • Implement a variant of Merge Sort that does not divide the problem all the way down to subproblems of size 1. Instead, when reaching subsequences of length k it applies Insertion Sort on these n/k
  • Apply it to the different sequences from Problem 2 (from last homework) for different numbers of k. Add the computation times to the plots you had generated in Problem 2.
  • How do the different values of k change the best-, average-, and worst-case asymptotic time complexities for this variant? Explain/proove your answer.
  • Based on the results from (b) and (c), how would you choose k in practice? Briefly explain.

Problem 2: Recurrences                                                                                                                                    

Use substitution method, recursion tree, or master method to derive upper and lower bounds for T(n) in each of the following recurrences. Make the bounds as tight as possible. Assume that T(n) is constant for n≤ 2.

  • T(n) = 36T(n/6) + 2n.
  • T(n) = 5T(n/3) + 17n1.2.
  • T(n) = 12T(n/2) + n2 lgn.
  • T(n) = 3T(n/5) + T(n/2) + 2n.
  • T(n) = T(2n/5) + T(3n/5) + Θ(n).
  • 02_homeworkAlgo-2-vcbo1t.zip